Wealth Tracker is a monorepo with a Svelte client and a Fastify + SQLite server. Keep this file concise and focused on rules Claude cannot reliably infer.
- MUST NOT edit generated build output in
server/public/**orclient/dist/**. - MUST NOT hardcode secrets or keys. Use environment variables or
.env. - MUST register new API routes in
server/src/routes/index.ts, or they will never run. - MUST import any new Sequelize model in
server/src/index.tsbeforesequelize.sync(). - Schema changes MUST be backward-safe for SQLite. Add explicit migration logic if needed.
- Install deps:
pnpm i(preferred). Root scripts callyarn, so ensure Yarn is available. - Dev server:
cd server && npm run devandcd client && npm run dev. - Build:
yarn build(client outputs toserver/public, server outputs toserver/dist). - Start prod:
yarn startorcd server && npm run deploy(pm2). - Format:
yarn prettier(root) orcd client && npm run prettier. - Typecheck:
cd client && npm run check. - Tests: none currently. Say so if you did not run commands.
- Client: Svelte 4 + Vite + Tailwind + Flowbite in
client/. - Server: Fastify + TypeScript + Sequelize + SQLite in
server/. - Client routes:
client/src/routes. UI components:client/src/components. - Server routes:
server/src/routes. Controllers:server/src/controllers. Models:server/src/models.
- Server env:
PORT(default 8888),ALLOW_PASSWORD,CAN_BE_RESET,PEPPER_SECRET,OPENAI_API_KEY,OPENAI_BASE_URL. - Client env:
client/.envusesGOOGLE_ANALYTICS_KEY.
- Prettier is authoritative: single quotes, no semicolons, 2-space indent, print width 100.