20 Commits

Author SHA1 Message Date
saltbo 30bc6e1a12 build: migrate project to pnpm 2026-06-01 10:44:33 -04:00
Jasper Van 8005defd97 feat: v2.5.0 T1 — libSQL (Turso) platform adapter + Docker Turso opt-in (#326)
* feat: add libSQL (Turso) platform adapter and Docker opt-in

- server/platform/libsql.ts: createLibsqlPlatform() using @libsql/client +
  drizzle-orm/libsql; accepts plain env record; async migrate at boot;
  authToken optional for file:// URLs
- server/entry-node.ts: select platform at startup — libsql when
  TURSO_DATABASE_URL is set, otherwise existing SQLite via createNodePlatform()
- drizzle.config.ts: switch to turso dialect when TURSO_DATABASE_URL is set
- vitest.libsql.config.ts + server/platform/libsql.libsql-test.ts: smoke suite
  covering connect, migrations, insert/select against users + storages tables
- package.json: add @libsql/client dependency; add test:libsql script;
  externalize @libsql/client in build:node tsup command
- vitest.config.ts: exclude *.libsql-test.ts from coverage
- docs/deploy/docker.md: document Turso opt-in with copy-pasteable
  docker-compose snippet
- CONTRIBUTING.md: add Turso migrate path paragraph under Database Migrations

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

* refactor: turn bootstrap.ts into a Platform-accepting factory

- server/bootstrap.ts: replace singleton module-scope script with
  exportable createBootstrap(platform) async factory; reads
  BETTER_AUTH_SECRET/BETTER_AUTH_URL/TRUSTED_ORIGINS from platform.getEnv
  so every future entry (Lambda, Vercel, Netlify, Azure) can reuse it
- server/entry-node.ts: slim down to platform selection + createBootstrap
  call; no more duplicate auth/app wiring
- server/dev.ts: thin vite-dev-server entry that creates NodePlatform and
  calls createBootstrap; replaces the former default export in bootstrap.ts
- vite.config.ts: update node dev server entry to server/dev.ts
- server/platform/libsql.ts: fix getEnv to check env record before
  falling back to process.env, matching the cloudflare.ts pattern

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

* style: apply biome auto-fixes for pre-existing lint issues

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

---------

Co-authored-by: Bob <aibob@mails.agent-kanban.dev>
2026-04-22 00:48:21 -04:00
saltbo 33ca372bdb fix(dev): fix D1 local database name and add db:migrate:d1 script
db-reset.ts referenced non-existent 'zpan-db-local'; update to
'zpan-db-staging' with --env staging to match wrangler.toml. Add
npm run db:migrate:d1 shortcut and update CONTRIBUTING.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 14:50:13 -04:00
saltbo ecba0b5f8d docs: enforce CONTRIBUTING.md compliance and document admin test credentials
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 14:14:07 -04:00
saltbo c25dece231 fix(docs): use reviewer account for public staging credentials
Admin credentials must not be public. CONTRIBUTING.md now documents
a regular reviewer account for preview verification. Admin access
is maintainer-only via .dev.vars.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 13:34:13 -04:00
saltbo 9183520b76 docs: add staging admin account for preview verification
Document the shared staging admin credentials in CONTRIBUTING.md
for contributors to use during preview verification and regression
testing. Also update dev commands to reflect current setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 13:31:54 -04:00
saltbo 4f9483bd1f refactor(deploy): flatten wrangler config and rename preview to staging
- Top-level config is now production (no more [env.production])
- Remove local-only D1 binding with fake database_id that broke Workers Builds
- Rename [env.preview] to [env.staging]
- Update vitest cloudflare config to use top-level instead of env.production

Dashboard config:
- Deploy command: npx wrangler deploy
- Version command: npx wrangler versions upload --env staging

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:39:29 -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 942a9ed9cf docs: clarify preview verification is reviewer's responsibility
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 01:29:56 -04:00
saltbo 1353badf9c docs: require preview verification for PRs and update dev commands
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 00:14:33 -04:00
saltbo 67475be340 feat: replace SVAR with custom file manager, path-based navigation, sidebar folder tree
- Replace @svar-ui/react-filemanager with custom file manager built on
  @tanstack/react-table, @dnd-kit, and shadcn/ui (ContextMenu, Breadcrumb,
  Table, Checkbox, ToggleGroup, Collapsible)
- List view with sortable columns (folders-first), Grid view with card layout
- Right-click context menu, row dropdown actions, drag-and-drop file moving
- Dialogs: rename, new folder, delete confirm, move (with folder picker)
- URL-based path navigation (?path=folder/subfolder), breadcrumb from URL
- Backend: parent field stores materialized path instead of folder ID,
  cascade rename/move updates all descendants, self-move protection
- Backend: type filter API (?type=photos|videos|music|documents) for
  cross-folder file browsing by MIME type
- Sidebar: My Files with lazy-loading folder tree (auto-expands to current
  path), Photos/Videos/Music/Documents categories, Trash
- Settings moved to user avatar dropdown menu
- Migrate pnpm references to npm across docs and config
- i18n: all new keys in en.json and zh.json

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 11:26:52 -04:00
saltbo 175c52a548 feat: fix CF Pages deployment and update project docs
- Restructure for wrangler Workers mode (main + [assets] + run_worker_first)
- Move wrangler.toml to project root, add nodejs_compat flag
- Move migrations to root, managed by wrangler d1 migrations
- Web builds to root dist/, wrangler bundles worker entry directly
- Update CONTRIBUTING.md with full dev workflow and quality gates
- CLAUDE.md indexes docs instead of duplicating content

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 11:09:18 -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
saltbo 9e23250af4 chore: update the go version
Signed-off-by: saltbo <saltbo@foxmail.com>
2023-07-25 22:12:51 +08:00
saltbo 83bd87e03e refactor: repalce the statik by the go1.16 embedfs 2021-02-19 02:12:25 +08:00
Zwlin 54d956b269 fix: dep should be mod in the Makefile (#48) 2020-10-28 11:37:33 +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 73d2326493 docs: update the README.md 2020-09-02 00:26:56 +08:00
saltbo ff286a824d feat: update the code by the goproject template 2020-08-07 00:33:37 +08:00