Copy to docs/ARCHITECTURE.md during /create_plan or /execute_plan. Replace placeholders with your stack.
One paragraph: what the app does and main technologies.
src/ or web/ api/ ...
Document every environment that serves HTTP:
| Environment | Entry file | Base path | How to run | Deploy |
|---|---|---|---|---|
| Local dev | e.g. api/src/server.ts |
e.g. /api |
e.g. npm run dev:api |
— |
| Production | e.g. functions/src/index.ts |
e.g. /api |
— | e.g. firebase deploy --only functions |
Rule: Shared route handlers live in one place (e.g. api/src/handlers/). Both entry points import the same router — do not duplicate route definitions in separate files unless unavoidable.
| Build | VITE_API_BASE_URL / equivalent |
|---|---|
| Local | Full URL including base path, e.g. http://localhost:3001/api |
| Production | Relative path matching hosting rewrite, e.g. /api |
- Auth: how uid is derived (never from client body)
- Secrets: server-only; Firestore rules deny client access to sensitive subcollections
| Service | Usage |
|---|