# ADR-002: Strict Frontend / Backend Separation | Field | Value | | --- | --- | | Status | Accepted | | Date | 2025-01-01 | | Deciders | Platform Architecture | | Supersedes | — | | Superseded by | — | ## Context Mixing UI and server logic in one deployable unit blocks independent scaling, white-label hosting, and multi-client UIs. ## Decision Backend lives only under `backend/`. Frontend lives only under `frontend/`. Communication is exclusively through versioned REST APIs (and future WebSocket if needed). No shared source except contracts, schemas, generated SDKs, and type definitions. ## Consequences ### Positive - Independent deploy and scale - Clear ownership of business logic (backend only) - Multiple UIs can share the same APIs ### Negative - Requires disciplined API versioning - Local DX needs Docker or two runtimes ## Alternatives Considered 1. Monorepo full-stack Next.js with API routes as primary backend 2. Server-rendered Django templates ## Related Documents - [Architecture Overview](../architecture.md) - [Module Boundaries](../module-boundaries.md) - [Developer Guide](../../development/developer-guide.md)