Commit Graph

5 Commits

Author SHA1 Message Date
saltbo d5517f3b73 fix(ci): align username signup test with generated usernames 2026-04-14 20:40:59 -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 310e4950b3 refactor: flatten monorepo to single-package CF Pages Functions structure
Replace pnpm workspace monorepo (packages/server, packages/web, packages/shared)
with a flat single-package layout following Hono's pages-stack pattern. Switch from
pnpm to npm and from Workers+Assets to CF Pages Functions deployment model.

- Move source: packages/server/src/ → server/, packages/web/src/ → src/, packages/shared/src/ → shared/
- Add functions/api/[[route]].ts as CF Pages Functions entry (replaces entry-cloudflare.ts)
- Update 22 import paths: server uses relative, web uses @shared/@server aliases
- Merge three package.json into one, switch to npm
- Update wrangler.toml: remove main/assets (Pages auto-detects functions/ dir)
- Add per-directory tsconfig.json for VS Code type resolution
- Simplify Dockerfile for flat layout
- Fix react-pdf CSS import path (dist/esm/ → dist/)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 00:27:38 -04:00
saltbo 941e642af8 fix: commit routeTree.gen.ts for CI typecheck
TanStack Router generates this file via Vite plugin. CI needs it
for typecheck since there's no standalone generate command.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 10:21:03 -04:00
saltbo 6b937948df feat: add project infrastructure — testing, CI, linting, logging
- Vitest unit/integration tests for server (22 tests) and shared (14 tests)
- Cloudflare Workers integration tests via @cloudflare/vitest-pool-workers (9 tests)
- Playwright E2E config with auto webServer startup
- GitHub Actions CI: lint → typecheck → test (Node + CF) → E2E
- Biome for linting + formatting (replaces ESLint + Prettier)
- Unified access log middleware for all API routes
- Lefthook pre-commit hooks: lint, typecheck, test
- Coverage threshold enforced at 90% (currently 96.9%)
- Drizzle D1 migrations generated from schema
- Fix pre-existing typecheck errors across all packages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 10:11:03 -04:00