| Metadata | Value |
|---|---|
| Status | Active |
| Version | 1.1.0 |
| Last Updated | 2026-03-10 |
| Author | Sangeetha Grantha Team |
Welcome to the Sangita Grantha project. This document provides a comprehensive guide for new developers and contributors to set up their local development environment and understand our core workflows.
Sangita Grantha is the authoritative "System of Record" for Carnatic compositions. It is designed for longevity, musicological integrity, and high-performance access.
For current toolchain and library versions, see Current Versions.
Ensure you have the following installed on your system:
- mise: Our tool version manager (replaces
asdf,nvm, etc.). - Docker & Docker Compose: For running the full dev stack (DB, backend, frontend, extraction).
- Python 3.11+: For the
db-migratemigration tool and extraction worker. - Bun: For frontend package management and building.
- JDK 25 (Temurin): For Kotlin and Android development. (See Current Versions)
- Android Studio / Xcode: For mobile development.
Follow these steps to get your environment ready:
Run the following command to install the required tool versions managed by mise:
mise installWe use Docker Compose to run PostgreSQL. Migrations are managed by the Python db-migrate tool:
# Full stack start (DB + Backend + Frontend + Extraction)
make dev
# Or database only
make db
# Reset DB (drop → create → migrate → seed)
make db-resetInstall dependencies for the admin web module using bun:
cd modules/frontend/sangita-admin-web
bun install- Full Dev Stack (recommended):
make dev # Docker Compose: DB + Backend + Frontend + Extraction
make dev-down # Stop all services- Backend only:
./gradlew :modules:backend:api:run- Frontend only:
cd modules/frontend/sangita-admin-web
bun run dev- Database Migrations:
make migrate # Run pending migrations
make db-reset # Drop → create → migrate → seedAll work MUST be tracked via the Conductor system located in the conductor/ directory.
- Check
conductor/tracks.mdfor active tracks. - If starting a new task, create a track file in
conductor/tracks/. - Follow the implementation plan defined in your track.
NEVER use Flyway or standard SQL executors for schema changes.
- All migrations live in
database/migrations/. - Run migrations via:
make migrate - Reset the DB (Drop + Create + Migrate + Seed) via:
make db-reset - Migration tool: Python
db-migrateintools/db-migrate/
- Result Pattern: Always use
Result<T, E>for service layer returns. No exceptions for domain logic. - DTO Separation: Never leak Exposed DAO entities to the API layer. Map to
@SerializableDTOs inmodules/shared/domain. - Database Access: Use
DatabaseFactory.dbQuery { ... }.
- Strict TypeScript: No
any. Use strict interfaces. - State Management: Use
tanstack-queryfor data fetching.
Every commit message MUST include a reference to the relevant specification:
feat: implement bulk import parser
Ref: application_documentation/01-requirements/features/bulk-import/01-strategy/csv-import-strategy.md
application_documentation/: High-level requirements, architecture, and API specs.conductor/: Active development tracks and plans.database/migrations/: SQL migration files.modules/backend/: Ktor API and services.modules/frontend/sangita-admin-web/: React admin interface.modules/shared/domain/: KMP module with shared DTOs and logic.tools/db-migrate/: Python migration tool.tools/krithi-extract-enrich-worker/: Python extraction & enrichment worker.