| Metadata | Value |
|---|---|
| Status | Active |
| Version | 1.2.0 |
| Last Updated | 2026-09-10 |
| Author | Sangeetha Grantha Team |
| Document Type | Current guide |
Backend routes parse requests and delegate to services. Services coordinate domain decisions; repositories execute SQL inside DatabaseFactory.dbQuery. Return explicit serializable DTOs across those boundaries.
Do not confuse a requested invariant with an automatic guarantee across independently called repositories. Review the real service transaction boundary when adding multi-step changes. Use tests to establish failure atomicity where required.
Lyric sections belong to a composition and a specific variant. Ordered raga membership belongs in krithi_ragas, not only a primary foreign key. Unknown raga identity requires controlled resolution. Accepted source corrections use extraction/reingestion/curation rather than new one-off corpus SQL migrations.
Versioned canon records historical section text; audit logging records mutation events. Both differ from the public current-state reader model.