37 Commits

Author SHA1 Message Date
saltbo dfc8c708d5 docs: switch license to AGPLv3 2026-05-06 12:41:02 -04:00
saltbo 64774b9039 ci(cf-deploy): auto-provision R2 public-images bucket + URL secret
Three new workflow steps turn the CF deploy into fully zero-touch for
the avatar/logo feature:

1. Ensure R2 bucket exists — `wrangler r2 bucket list --json` → create if
   missing. Idempotent; prior deploys skip creation.
2. Enable managed public URL — `PUT /r2/buckets/.../domains/managed`
   with {enabled:true}. CF returns the same pub-<hash>.r2.dev on every
   call once enabled, so this is idempotent too. Then GET the domain
   from the same endpoint and capture into step output.
3. Upsert `PUBLIC_IMAGES_URL` as a Worker secret via
   `wrangler secret put`. Always overwritten to keep in sync with the
   managed domain (which is stable but this is defensive).

Order: bucket/URL steps run BEFORE `wrangler deploy` so the binding
declared in wrangler.toml (new `[[r2_buckets]] binding = "PUBLIC_IMAGES"`)
references an existing bucket. The secret step runs AFTER deploy —
wrangler secret put requires the Worker to exist.

`wrangler.toml`: new `[[r2_buckets]]` for production and
`[[env.staging.r2_buckets]]` for the staging environment. Staging uses
a distinct bucket (`zpan-public-images-staging`) so preview deploys
don't mix objects into production.

README updated: `CLOUDFLARE_API_TOKEN` now requires
**R2 Storage: Edit** in addition to Workers Scripts + D1. The workflow
surfaces an actionable error message when this scope is missing.

User experience on a fresh fork: add the 2 GitHub secrets (ACCOUNT_ID
+ API_TOKEN with the 3 scopes), push. Workflow creates D1, creates R2,
enables public URL, migrates, builds, deploys, sets both BETTER_AUTH_SECRET
(random) and PUBLIC_IMAGES_URL (from R2). Avatars + org logos work
immediately — no trip to Admin → Storages required.

Non-CF deployments continue to require a user-added mode='public'
storage (no change to those paths).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 22:56:35 -04:00
Jasper Van b5be4c5ebd feat: v2.5.0 T2 — AWS Lambda deployment (entry + SAM + workflow + docs) (#331)
- server/entry-lambda.ts: Hono app via hono/aws-lambda handle(); lazy init
  pattern for CJS compatibility and warm-start reuse; serves SPA static
  files from dist/ with MIME detection and index.html fallback
- deploy/aws-lambda/template.yaml: SAM template with Function URL (no API
  Gateway), Node 22, TURSO_* / BETTER_AUTH_SECRET / APP_URL env vars,
  minimal IAM (AWSLambdaBasicExecutionRole)
- .github/workflows/deploy-aws-lambda.yml: 8-step contract (guard upstream,
  check secrets with exact names, resolve tag, checkout, ensure SAM artifact
  bucket, apply Turso migrations, build + sam deploy, post-deploy auto-gen
  BETTER_AUTH_SECRET + patch BETTER_AUTH_URL + write URL to summary)
- package.json: build:lambda script (tsup CJS, external @libsql/client)
- docs/deploy/aws-lambda.md: Prerequisites / Secrets / Trigger /
  First-boot storage / Cost sections
- README.md, V2_ROADMAP.md: link new doc

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

Co-authored-by: Bob <aibob@mails.agent-kanban.dev>
2026-04-22 01:28:05 -04:00
saltbo 10f0ea0378 docs: add step-by-step RustFS setup guide to README
Document the full setup flow based on E2E testing:
- Create bucket in RustFS console
- Register user (first user gets admin)
- Configure storage with correct endpoint
- Important note: endpoint must be browser-accessible

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-21 21:29:20 -04:00
saltbo ae7a0d003f docs: update Docker deploy instructions with user-facing compose files
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-21 20:33:56 -04:00
saltbo 2aa6ab40fd fix(ci): use --json flag for wrangler d1/secret list commands
wrangler v4 uses --json, not --format json.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-21 20:08:42 -04:00
saltbo 3d8f51f175 ci: add fork-based deploy workflow for Cloudflare Workers
- Add deploy.yml: auto-deploys latest upstream release tag on fork sync
- Support manual trigger with optional version override
- Auto-create D1 database, apply migrations, and set BETTER_AUTH_SECRET
- Only runs on forks (skipped on saltbo/zpan)
- Validate required secrets with clear error message
- Update README with fork + GitHub Actions deploy instructions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-21 19:57:04 -04:00
saltbo c376f2eb1b feat(ci): add Codecov coverage reporting and badge
Add json/json-summary reporters to vitest config, upload coverage
to Codecov after test step in CI, and add coverage badge to README.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 15:07:29 -04:00
saltbo 3697fce462 docs(readme): add CI, Release, version, and Docker badges
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 10:52:47 -04:00
saltbo 3b80eff413 feat: migrate from CF Pages to Workers with one-click deploy button
- Replace Pages Functions with Workers entry (`workers/bootstrap.ts`)
- Add Deploy to Cloudflare button in README
- Integrate `@cloudflare/vite-plugin` for CF dev with HMR
- Integrate `@hono/vite-dev-server` for Node dev with HMR
- `npm run dev` now defaults to CF Workers mode
- Add `run_worker_first = ["/api/*"]` so static assets stay free
- Extract shared Node bootstrap (`server/bootstrap.ts`) for reuse
- Update all docs from Pages to Workers references

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 10:40:15 -04:00
saltbo b817cab2c1 feat: ZPan v2.0 roadmap, architecture, and repo reset
Remove the Go v1 codebase (preserved in the v1 branch) and establish
the foundation for v2 — a complete rewrite in TypeScript (server) and
Rust (CLI/desktop). This commit includes the product roadmap (v2.0–v2.9),
technical architecture document, and updated project documentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:57:15 -04:00
Ambor 691fc11fae Update README.md 2021-08-09 23:28:21 +08:00
Ambor c249cba846 Update README.md 2021-07-28 12:50:27 +08:00
Ambor add3c92782 Update README.md 2021-07-28 12:47:54 +08:00
Ambor a159b5e879 Update README.md 2021-07-12 18:01:37 +08:00
Ambor affcb0d86a Update README.md 2021-02-21 02:19:09 +08:00
Ambor 4bea406728 Update README.md 2020-11-18 19:18:34 +08:00
saltbo fa461e0846 docs: update the README.md 2020-10-18 22:37:35 +08:00
saltbo 5c4f2b1baf docs: update the docs for the v1.4 2020-10-15 01:19:58 +08:00
saltbo 1d62dd6113 docs: update the README and LICENSE 2020-10-13 01:50:40 +08:00
saltbo 20d526e57b docs: update the README.md 2020-09-09 02:12:50 +08:00
Ambor 833a70faf2 Merge branch 'master' into add-license-scan-badge 2020-09-07 21:51:37 +08:00
saltbo 0ff1fdf2f0 chore: update the default roles 2020-09-06 21:47:47 +08:00
saltbo 337a60061c docs: update the README.md and install.sh 2020-09-03 22:09:43 +08:00
saltbo 2f3ef9d063 chore: update the release.yml and README.md 2020-09-02 23:09:14 +08:00
saltbo 312bc8a297 chore: update the deployment files 2020-09-02 23:02:11 +08:00
saltbo 73d2326493 docs: update the README.md 2020-09-02 00:26:56 +08:00
fossabot af847da723 Add license scan report and status
Signed off by: fossabot <badges@fossa.com>
2020-08-27 02:21:40 -05:00
saltbo b545dfc233 docs: update the README.md 2020-08-07 10:09:20 +08:00
saltbo ff286a824d feat: update the code by the goproject template 2020-08-07 00:33:37 +08:00
saltbo 99d6e46a42 chore: add scripts to build and release 2019-10-27 11:29:04 +08:00
saltbo 3a5447bf6f docs: update the Readme 2019-10-13 12:32:30 +08:00
saltbo b0d2bae972 docs: update the Readme 2019-10-13 12:23:25 +08:00
saltbo ecc02f4047 docs: update the Readme 2019-10-13 12:21:03 +08:00
saltbo 812e6c10d3 Update README.md 2019-10-13 11:09:14 +08:00
saltbo 173bcef3f3 docs: update the Readme 2019-10-07 15:58:30 +08:00
saltbo edcfaaf686 Initial commit 2019-09-28 12:39:58 +08:00