Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1.34 KB

File metadata and controls

41 lines (26 loc) · 1.34 KB

Architecture (template)

Copy to docs/ARCHITECTURE.md during /create_plan or /execute_plan. Replace placeholders with your stack.

Overview

One paragraph: what the app does and main technologies.

Module layout

src/ or web/ api/ ...

Backend entry points (required for API projects)

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.

Web → API

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

Security

  • Auth: how uid is derived (never from client body)
  • Secrets: server-only; Firestore rules deny client access to sensitive subcollections

External services

Service Usage