Include Loyalty/Communication/Sports Center backends and registry updates alongside production nginx and compose wiring. Co-authored-by: Cursor <cursoragent@cursor.com>
3.0 KiB
3.0 KiB
ADR-014: Independent Sports Center Platform Service
| Field | Value |
|---|---|
| Status | Accepted |
| Date | 2026-07-24 |
| Deciders | Platform Architecture |
| Supersedes | — |
| Superseded by | — |
Context
Gyms, clubs, and sports facilities need members, memberships, coaches, attendance/access, booking, training programs, competitions, and related operations. Embedding this inside CRM, Loyalty, Accounting, or Restaurant would couple unrelated domains and block reuse.
TorbatYar already has independent platform services for Loyalty (ADR-011) and Communication (ADR-012). Sports operations need the same independence with a dedicated database and permission tree.
Decision
- Introduce
sports_centeras an independent business platform service with sole ownership ofsports_center_db(ADR-001). - Permission prefix:
sports_center.*. Publish-only domain events:sports_center.*. - Row-level multi-tenancy via
tenant_id(ADR-003). - Consume Accounting, CRM, Loyalty, and Communication only via REST API and Events — never shared tables or foreign model imports.
- Financial journals only through Accounting Posting Engine (ADR-010).
- Messaging only through Communication (ADR-012).
- Loyalty points/rewards only through Loyalty (ADR-011).
- Implementation phases are registered as Phase 9.0–9.10 in phase-manifest.yaml; roadmap in sports-center-roadmap.md.
- Product AI and Automation remain optional and external (ai-architecture.md).
Consequences
Positive
- Clear ownership for sports operations
- Reusable integrations with platform services
- Enforceable tenancy, audit, and boundary tests
Negative
- Additional deployable service and database
- Eventual consistency for cross-service customer views
Neutral
- Scaffold may exist under
backend/services/sports_centerbefore Phase 9.0 implementation; registration precedes business code
Alternatives Considered
- Sports subsystem inside CRM — rejected (CRM is Sales-only).
- Sports tables inside Core — rejected (violates business-module boundaries and ADR-001).
- Per-tenant bespoke apps without a service — rejected (not SuperApp-native).