| Metadata | Value |
|---|---|
| Status | Active |
| Version | 1.1.0 |
| Last Updated | 2026-09-10 |
| Author | Sangeetha Grantha Team |
| Document Type | Design reference |
[!NOTE] Design/reference material: this page may include proposals or earlier implementation assumptions. Use current feature map for implemented behavior and current operating steps.
The Sangeetha Grantha application uses a rich domain model (KrithiDto) that represents Carnatic compositions with high fidelity. A key aspect of this model is the structured representation of lyrics into specific RagaSectionDto types:
External sources of Carnatic music notation and lyrics (web archives, blogs) often present this data in semi-structured HTML formats. Simply extracting the full text as a blob loses the semantic structure required by our domain model. To bridge this gap and ensure high-quality data ingestion, we are implementing an Intelligent Web Scraping Service.
This feature leverages Generative AI (Google Gemini) to transform unstructured or semi-structured web content into our strict domain entities. It is designed to be source-agnostic, capable of interpreting visual layouts from various websites (e.g., Shivkumar.org, blogspot archives) and mapping them to our internal data structures.
The core value of this feature is not just downloading text, but understanding it. The service:
RagaSectionDto enums (PALLAVI, ANUPALLAVI, CHARANAM).Beyond sections, the service extracts metadata crucial for the KrithiDto:
The output is strictly typed to align with the database schema:
ScrapedSectionDto objects, which directly map to KrithiNotationSectionGroupDto and KrithiNotationRowDto structures during the import process.The WebScrapingService exposes a scrapeKrithi(url: String) method.
ScrapedKrithiMetadata containing both flat metadata and the critical sections list.This service powers the Import Workflow. When an administrator provides a URL:
sections are persisted as distinct entities in the database, preserving the structural integrity of the composition from the start.