Include Loyalty/Communication/Sports Center backends and registry updates alongside production nginx and compose wiring. Co-authored-by: Cursor <cursoragent@cursor.com>
2.2 KiB
2.2 KiB
Project Principles
These principles are mandatory for every implementation phase.
- Every feature must be tenant-aware. Business data always carries and filters by
tenant_id. - Every business action must be auditable. Persist audit metadata or equivalent domain events.
- Business logic only inside Services. Controllers/routers stay thin.
- Repositories contain no business logic. Persistence and queries only.
- Views / API handlers remain thin. Validate, authorize, delegate, map responses.
- Every phase must include tests. No phase complete without automated coverage for new behavior.
- Every phase must update documentation. Code and docs ship together.
- No TODO in completed phases. TODOs mean the phase is not done.
- No cross-tenant query. Platform-admin exceptions must be explicit and logged.
- No direct JournalEntry creation. Posting Engine only (ADR-010).
- Compliance is independent. Compliance controls are not optional UI features.
- AI is independent. Core business flows work when AI is off (ai-architecture.md).
- Everything event-ready. Prefer outbox-backed domain events for cross-service effects.
- Everything API-first. UI is a client, not the source of truth.
- Everything documented. Registries, ADRs, contracts, and progress stay current.
- Database-per-service. No cross-DB access (ADR-001).
- Frontend/Backend separation is absolute. (ADR-002).
- No hardcoded brand or secrets. Config/env/database only.
- Documentation before conflicting code. If implementation conflicts with architecture, stop and fix docs/ADR first.
- Phase completion gate. Follow the checklist in docs/README.md and ai-framework/quality-gates.md.