TorbatYar/docs/architecture/adr/ADR-002.md
Mortezakoohjani 12c8615615 Ship enterprise Accounting FE/API with CRUD parity and production wiring.
Adds accounting-service PATCH/archive, fiscal helpers, COA templates and setup status, plus SuperApp Accounting UI (DS, scoreboard, masters, vouchers, ledger, ops modules) with session refresh and HTTPS public API URLs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 15:26:43 +03:30

42 lines
1.2 KiB
Markdown

# 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)