Implement all Ktor REST API endpoints required to power the Sourcing & Extraction Monitoring UI screens. This includes Source Registry CRUD, Extraction Queue operations, Source Evidence queries, Structural Voting endpoints, and Quality Dashboard aggregation queries.
All 25+ endpoints return correct data from seeded database.
All mutation endpoints create audit_log entries.
JWT authentication enforced on all routes.
Pagination works correctly with offset/limit parameters.
Filter parameters correctly narrow result sets.
Error responses use consistent format with appropriate HTTP status codes.
6. Dependencies
TRACK-041 (database migrations 23–27, seed data).
Existing ExtractionQueueRepository and ExtractionQueueService from TRACK-041 (to be completed).
7. Progress Log
2026-02-09: Track created based on Sourcing UI/UX Plan §5 (API Requirements).
2026-02-09: Implementation complete:
Added ExtractionStatus enum to DbEnums.kt.
Created SourcingTables.kt with Exposed table definitions for ImportSourcesEnhancedTable, ExtractionQueueTable, KrithiSourceEvidenceTable, StructuralVoteLogTable.
Created SourcingDtos.kt shared domain DTOs for all sourcing entities (serializable with Kotlinx).
Created 5 DAL repositories: SourceRegistryRepository, ExtractionQueueRepository, SourceEvidenceRepository, StructuralVotingRepository, QualityDashboardRepository.
Created SourcingService.kt with business logic and audit logging for mutations.
Created SourcingRoutes.kt with full REST endpoints under /v1/admin/sourcing.
Updated SangitaDal interface + impl with new repositories.
Registered SourcingService in Koin DI module.
Registered sourcing routes in Ktor routing within authenticated block.