Sangeetha-Grantha

Metadata Value
Status Active
Version 1.1.0
Last Updated 2026-09-10
Author Sangeetha Grantha Team
Document Type Design reference

Intelligent Web Scraping and Domain Mapping


[!NOTE] Design/reference material: this page may include proposals or earlier implementation assumptions. Use current feature map for implemented behavior and current operating steps.


Context and Rationale

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.

Feature Overview

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.

Capabilities

1. Structure-Aware parsing

The core value of this feature is not just downloading text, but understanding it. The service:

2. Intelligent Field Extraction

Beyond sections, the service extracts metadata crucial for the KrithiDto:

3. Domain Model Alignment

The output is strictly typed to align with the database schema:

Implementation Strategy

WebScrapingService

The WebScrapingService exposes a scrapeKrithi(url: String) method.

Integration Plan

This service powers the Import Workflow. When an administrator provides a URL:

  1. The system scrapes and structures the data.
  2. The resulting JSON is presented in the review UI.
  3. Upon approval, the sections are persisted as distinct entities in the database, preserving the structural integrity of the composition from the start.

Section index · Documentation home · Feature status