Replace Next.js/Supabase/Vercel stack with a self-hostable setup: Vite+React frontend, Fastify+Drizzle+PostgreSQL backend with own JWT auth, deploy via git pull + rsync + systemd (checkout/service separated, updates pulled from Gitea). Adds a reference auth route (register/login/me) as the canonical pattern for new routes. Updates all skills/rules/agents/docs to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BMdBJfD9TT6XUU2NqGG1PN
1.7 KiB
1.7 KiB
Backend Implementation Checklist
Core Checklist
- Checked existing tables/routes via git before creating new ones
- Database tables added to Drizzle schema (
backend/src/db/schema.ts) - Migration generated (
npm run db:generate) and applied (npm run db:migrate) - Indexes created on performance-critical columns
- Foreign keys set with appropriate
onDeletebehavior - All planned endpoints implemented in
backend/src/routes/— follow the pattern inbackend/src/routes/auth.ts(ZodsafeParse, typed JWT payload viatypes.d.ts,app.authenticatepreHandler) - Authentication verified (no access without a valid JWT)
- Ownership/authorization checked explicitly in the route handler
- Input validation with Zod on all POST/PUT requests
- Meaningful error messages with correct HTTP status codes
- No TypeScript errors in routes
- All endpoints tested manually
- No hardcoded secrets in source code
- Frontend connected to real API endpoints
- User has reviewed and approved
Verification (run before marking complete)
npm run buildpasses without errors (backend)- All acceptance criteria from feature spec addressed in the API
- All endpoints return correct status codes (test with curl or Thunder Client)
features/INDEX.mdstatus updated to "In Progress"- Code committed to git
Performance Checklist
- All frequently filtered columns have indexes
- No N+1 queries (use Drizzle joins/relational queries instead of loops)
- All list endpoints paginate (limit/offset)
- Zod validation on all write endpoints
- Slow queries cached where appropriate (optional for MVP)
- Rate limiting on public-facing routes (optional for MVP)