| Metadata | Value |
|---|---|
| Status | Draft |
| Version | 1.0.0 |
| Last Updated | 2026-09-10 |
| Author | Sangeetha Grantha Team |
| Document Type | Design reference |
| Related Tracks | TRACK-041 |
| Parent | Krithi Data Sourcing & Quality |
| Companion | Bulk Import UI/UX Plan |
[!NOTE] Design/reference material: this page may include proposals or earlier implementation assumptions. Use current ingestion guide for implemented behavior and current operating steps.
This document specifies the User Interface and User Experience requirements for the Sourcing & Extraction Monitoring feature set. These screens give Admin and IngestionOps users visibility into the multi-source, multi-format data pipeline introduced by TRACK-041 — covering source authority management, extraction queue monitoring, per-Krithi provenance tracking, structural voting audit, and corpus-wide quality metrics.
The Bulk Import module handles batch orchestration (CSV manifests → scrape → resolve → review). This module complements it by handling source-level governance — which sources exist, how authoritative they are, what has been extracted, how structural conflicts were resolved, and what the overall data quality posture looks like.
| Persona | Description | Primary Screens |
|---|---|---|
| System Admin | Manages source registry, monitors extraction queue health, intervenes on stuck/failed tasks, reviews infrastructure metrics. | Source Registry, Extraction Monitor, Quality Dashboard |
| IngestionOps | Operates extraction campaigns, tracks per-source harvest progress, reviews extraction results before they enter the import pipeline. | Extraction Monitor, Source Evidence Browser |
| Content Editor / Data Reviewer | Reviews structural voting outcomes, resolves low-confidence consensus decisions, inspects per-Krithi provenance before publication. | Source Evidence Browser, Structural Voting Viewer |
| Quality Auditor | Monitors corpus-wide quality metrics, identifies coverage gaps, prioritises enrichment targets. | Quality Dashboard, Source Evidence Browser |
The Sourcing module will be located within the existing Admin Console, peer to the Bulk Import module.
/admin/sourcingHierarchy:
| # | Screen | Route | Description |
|---|---|---|---|
| 1 | Sourcing Dashboard | /admin/sourcing |
High-level overview with key metrics |
| 2 | Source Registry | /admin/sourcing/sources |
Manage import sources and authority tiers |
| 3 | Source Detail | /admin/sourcing/sources/:id |
Deep dive into a single source |
| 4 | Extraction Monitor | /admin/sourcing/extractions |
Real-time extraction queue monitoring |
| 5 | Extraction Detail | /admin/sourcing/extractions/:id |
Single extraction task detail |
| 6 | Source Evidence Browser | /admin/sourcing/evidence |
Per-Krithi provenance view |
| 7 | Structural Voting | /admin/sourcing/voting |
Voting decision audit trail |
| 8 | Voting Detail | /admin/sourcing/voting/:id |
Single voting decision detail |
| 9 | Quality Dashboard | /admin/sourcing/quality |
Corpus-wide quality metrics |
Goal: At-a-glance health of the entire sourcing pipeline.
Route: /admin/sourcing
Layout:
Header: Title “Sourcing & Quality”, subtitle with last-updated timestamp.
Row 1: Pipeline Health Cards (4 metric cards across the top):
| Card | Metric | Visual |
|---|---|---|
| Sources | Total sources / Active sources | Count with tier breakdown sparkline |
| Extraction Queue | Pending / Processing / Done / Failed | Stacked bar with status colours |
| Voting Decisions | Total decisions, % requiring manual review | Donut chart (UNANIMOUS / MAJORITY / AUTHORITY_OVERRIDE / MANUAL) |
| Corpus Quality | Mean quality score, coverage % | Gauge chart with target indicator |
MANUAL decisions awaiting review.Interactions:
Goal: Manage the authoritative source catalogue with tier rankings, format capabilities, and composer affinities.
Route: /admin/sourcing/sources
Layout:
Table:
| Column | Description | Sort |
|---|---|---|
| Name | Source display name (e.g., “guruguha.org”) | Yes |
| URL | Base URL | No |
| Tier | Authority tier badge (colour-coded: T1 = gold, T2 = silver, T3 = bronze, T4 = blue, T5 = grey) | Yes |
| Formats | Pill badges for each supported format | No |
| Composers | Top composer affinities (e.g., “Dikshitar 1.0, Swathi Thirunal 0.8”) | No |
| Krithis | Count of Krithis sourced from this source | Yes |
| Last Harvested | Relative timestamp (e.g., “3 days ago”) | Yes |
| Actions | “View”, “Edit”, “Deactivate” | No |
Interactions:
/admin/sourcing/sources/:id).Fields:
| Field | Type | Required | Validation |
|---|---|---|---|
| Name | Text | Yes | Unique, non-empty |
| Base URL | URL | Yes | Valid URL format |
| Tier | Select (1–5) | Yes | — |
| Supported Formats | Multi-select | Yes | At least one |
| Composer Affinities | Repeatable key-value (Composer → Weight 0.0–1.0) | No | Weight between 0 and 1 |
| Description | Textarea | No | Max 500 chars |
| Active | Toggle | Yes | Default: On |
Goal: Deep dive into a single source — its harvest history, contributed Krithis, and extraction activity.
Route: /admin/sourcing/sources/:id
Layout:
Header: Source name, Tier badge, Format pills, “Edit” and “Deactivate” buttons.
krithi_source_evidence).Goal: Real-time operational view of the extraction queue — the Kotlin ↔ Python integration pipeline.
Route: /admin/sourcing/extractions
Layout:
Header: Title “Extraction Queue”, Buttons: “New Extraction Request”, “Retry All Failed”.
PENDING (grey), PROCESSING (blue pulse), DONE (green), FAILED (red), CANCELLED (dark grey).Table:
| Column | Description | Sort |
|---|---|---|
| ID | Extraction task ID (truncated UUID with copy button) | No |
| Source | Source name + tier badge | Yes |
| Format | Format pill (PDF / DOCX / IMAGE) | Yes |
| URL | Source URL (truncated, external link icon) | No |
| Status | Status chip with pulse animation for PROCESSING | Yes |
| Krithis | Result count (number of Krithis extracted) | Yes |
| Confidence | Confidence score bar (0–1) | Yes |
| Duration | Processing time (human-readable, e.g., “4.2s”) | Yes |
| Attempts | Current attempt / max attempts | No |
| Worker | Claimed-by hostname (for PROCESSING tasks) | No |
| Created | Relative timestamp | Yes |
| Actions | “View”, “Retry” (if FAILED), “Cancel” (if PENDING/PROCESSING) | No |
Interactions:
Goal: Submit a new extraction task to the queue.
Step 1 — Source Selection:
Step 2 — Extraction Parameters:
| Field | Type | Required | Notes |
|---|---|---|---|
| Source URL | URL | Yes | Pre-filled if source selected |
| Format | Select (PDF, DOCX, IMAGE) | Yes | Pre-filled from source supported formats |
| Page Range | Text | No | For PDFs, e.g., “1-10” or “42-43” |
| Composer Hint | Typeahead (Composer) | No | Helps parser with attribution |
| Expected Krithi Count | Number | No | For validation of extraction results |
| Link to Import Batch | Select (Batch) | No | Associates extraction with existing batch |
| Max Attempts | Number | No | Default: 3 |
Step 3 — Confirmation:
extraction_queue row with PENDING status and navigates to the Extraction Detail.Goal: Full detail of a single extraction task — parameters, progress, results, and errors.
Route: /admin/sourcing/extractions/:id
Layout:
Header: Task ID, Status chip (large), Format badge, Source name with tier badge.
DONE)
Results Table: One row per extracted Krithi:
| Column | Description |
|---|---|
| Title | Extracted Krithi title |
| Raga | Extracted Raga name |
| Tala | Extracted Tala name |
| Composer | Extracted composer |
| Sections | Section count with structure summary (e.g., “P + A + 2C”) |
| Languages | Detected languages/scripts |
| Confidence | Per-Krithi confidence bar |
| Actions | “Preview” (opens JSON), “Import” (sends to import pipeline) |
result_payload (array of CanonicalExtractionDto).FAILED)
error_detail).Goal: For any Krithi, show all sources that contributed data, what each source provided, and how confident the system is in each contribution.
Route: /admin/sourcing/evidence
Layout:
Table (Krithi-centric):
| Column | Description | Sort |
|---|---|---|
| Krithi | Title + Raga + Tala summary | Yes |
| Sources | Count of contributing sources with tier badges | Yes |
| Top Source | Highest-tier contributing source name | Yes |
| Contributed Fields | Aggregate field pills across all sources | No |
| Avg Confidence | Mean confidence across all source evidence | Yes |
| Voting Status | Latest voting consensus type badge (or “No Vote”) | Yes |
| Actions | “View Evidence” | No |
Interactions:
Goal: Side-by-side comparison of what each source contributed for a single Krithi.
Layout:
Header: Krithi title, Raga, Tala, Composer, current workflow state badge.
Evidence Cards (one per source, ordered by tier — highest first):
Each card contains:
| Element | Description |
|---|---|
| Source Header | Source name, tier badge, format pill, extraction method |
| Source URL | Clickable link to original source |
| Confidence | Confidence bar (0–1) |
| Contributed Fields | Checked list of fields contributed |
| Field Values | Two-column view: Field Name → Extracted Value |
| Extraction Date | When this source was extracted |
| Raw Extraction | Collapsible JSON viewer |
Comparison View (toggled via “Compare” button):
Goal: Audit trail of all cross-source structural voting decisions, with the ability to manually intervene on low-confidence outcomes.
Route: /admin/sourcing/voting
Layout:
Header: Title “Structural Voting”, Button “Pending Manual Reviews” (badge with count).
Table:
| Column | Description | Sort |
|---|---|---|
| Krithi | Krithi title (linked) | Yes |
| Voted At | Timestamp | Yes |
| Sources | Count of participating sources | Yes |
| Consensus | Consensus type badge (colour-coded) | Yes |
| Structure | Winning structure summary (e.g., “P + A + 3C + CS”) | No |
| Confidence | Confidence badge (HIGH = green, MEDIUM = amber, LOW = red) | Yes |
| Dissents | Count of dissenting sources | Yes |
| Reviewer | Reviewer name (if MANUAL) or “—” | No |
| Actions | “View Detail”, “Override” (if not MANUAL) | No |
Interactions:
consensus_type = 'MANUAL' and reviewer_id IS NULL.Goal: Full transparency into how a structural consensus was reached for a specific Krithi.
Route: /admin/sourcing/voting/:id
Layout:
Header: Krithi title, voting timestamp, consensus type badge, confidence badge.
structural_vote_log entry with consensus_type = 'MANUAL', records reviewer_id.Goal: Corpus-wide quality metrics to guide enrichment priorities and track progress against the 6-phase strategy.
Route: /admin/sourcing/quality
Layout:
Header: Title “Corpus Quality Dashboard”, last audit run timestamp, “Run Audit Now” button.
Row 1: KPI Cards (5 cards):
| Card | Metric | Description |
|---|---|---|
| Total Krithis | Count | Total canonical Krithis in the system |
| Multi-Source | Count (%) | Krithis with 2+ contributing sources |
| Structural Consensus | Count (%) | Krithis with voting decisions at HIGH confidence |
| Avg Quality Score | Number (0–1) | Mean quality score across all Krithis |
| Enrichment Coverage | % | Krithis with deity + temple + 2+ language variants |
The following backend API endpoints are needed to power the UI screens. These extend the existing Ktor route structure.
| Method | Route | Description |
|---|---|---|
GET |
/v1/admin/sourcing/sources |
List sources (filter: tier, format, active, search) |
GET |
/v1/admin/sourcing/sources/:id |
Get source detail with contribution stats |
POST |
/v1/admin/sourcing/sources |
Register new source |
PUT |
/v1/admin/sourcing/sources/:id |
Update source |
DELETE |
/v1/admin/sourcing/sources/:id |
Deactivate source (soft delete) |
| Method | Route | Description |
|---|---|---|
GET |
/v1/admin/sourcing/extractions |
List extraction tasks (filter: status, format, source, date, batch) |
GET |
/v1/admin/sourcing/extractions/:id |
Get extraction task detail with results |
POST |
/v1/admin/sourcing/extractions |
Submit new extraction request |
POST |
/v1/admin/sourcing/extractions/:id/retry |
Retry failed extraction |
POST |
/v1/admin/sourcing/extractions/:id/cancel |
Cancel pending/processing extraction |
POST |
/v1/admin/sourcing/extractions/retry-all-failed |
Retry all failed extractions |
GET |
/v1/admin/sourcing/extractions/stats |
Queue summary statistics |
| Method | Route | Description |
|---|---|---|
GET |
/v1/admin/sourcing/evidence |
List Krithis with evidence summary (filter: source count, tier, field) |
GET |
/v1/admin/sourcing/evidence/krithi/:id |
Get all source evidence for a specific Krithi |
GET |
/v1/admin/sourcing/evidence/compare/:id |
Get field-level comparison across sources for a Krithi |
| Method | Route | Description |
|---|---|---|
GET |
/v1/admin/sourcing/voting |
List voting decisions (filter: consensus type, confidence, date, pending review) |
GET |
/v1/admin/sourcing/voting/:id |
Get voting detail with participants and dissents |
POST |
/v1/admin/sourcing/voting/:id/override |
Submit manual structure override |
GET |
/v1/admin/sourcing/voting/stats |
Voting summary statistics |
| Method | Route | Description |
|---|---|---|
GET |
/v1/admin/sourcing/quality/summary |
KPI summary (totals, averages, coverage %) |
GET |
/v1/admin/sourcing/quality/distribution |
Quality score distribution histogram data |
GET |
/v1/admin/sourcing/quality/coverage |
Tier coverage and composer matrix data |
GET |
/v1/admin/sourcing/quality/gaps |
Data gap analysis (missing fields, conflicts) |
GET |
/v1/admin/sourcing/quality/audit |
Latest audit query results (TRACK-039 queries) |
POST |
/v1/admin/sourcing/quality/audit/run |
Trigger fresh audit run |
The following Design System components are needed (extending what was defined for Bulk Import):
| # | Component | Description | Reuse |
|---|---|---|---|
| 1 | TierBadge | Colour-coded badge for source authority tiers (T1 gold, T2 silver, T3 bronze, T4 blue, T5 grey). Tooltip with tier definition. | New |
| 2 | FormatPill | Small pill badges for document formats (PDF, HTML, DOCX, API, MANUAL). | New |
| 3 | ConfidenceBar | Horizontal bar (0–1) with gradient fill (red → amber → green). | New |
| 4 | StatusChip | Reuse from Bulk Import. Add extraction statuses: PENDING, PROCESSING, DONE, FAILED, CANCELLED. | Extend |
| 5 | StructureVisualiser | Coloured block diagram showing Krithi section structure (P/A/C/SC/CS). | New |
| 6 | FieldComparisonTable | Multi-column diff table for comparing field values across sources. Colour-coded cells (agreement/variation/conflict). | New |
| 7 | TimelineCard | Vertical timeline showing state transitions with timestamps and durations. | New |
| 8 | MetricCard | Summary card with label, primary value, secondary metric, and optional sparkline/icon. | New (generic) |
| 9 | JsonViewer | Collapsible, syntax-highlighted JSON viewer with copy-to-clipboard. | Extend (from LogViewer) |
| 10 | HeatmapGrid | Grid visualisation for Composer × Field coverage matrix. | New |
| 11 | ProgressBarRow | Labelled horizontal progress bar with target/actual/percentage for phase tracking. | New |
| 12 | DataGrid | Reuse virtualised table from Bulk Import. | Reuse |
Implementation is aligned with the backend phases defined in the Implementation Checklist and the overall 6-phase strategy in Quality Strategy.
Backend dependencies: Source Registry API, Extraction Queue API (basic).
| Deliverable | Description |
|---|---|
| Source Registry CRUD | List, create, edit, deactivate sources. TierBadge and FormatPill components. |
| Extraction Monitor (basic) | Queue list view with status filtering, auto-refresh. StatusChip extension. |
| Extraction Request Wizard | Form to submit new extraction tasks. |
| Navigation scaffolding | Route setup, nav menu integration, Sourcing Dashboard skeleton. |
Backend dependencies: Extraction Detail API, queue stats, retry/cancel operations.
| Deliverable | Description |
|---|---|
| Extraction Detail | Full task detail with timeline, results table, error display. |
| Source Detail | Source profile, contribution stats, extraction history. |
| Queue Operations | Retry individual/all failed, cancel, confirmation dialogs. |
| Sourcing Dashboard | Metric cards, activity feed, quick actions. |
Backend dependencies: Source Evidence API, Structural Voting API.
| Deliverable | Description |
|---|---|
| Source Evidence Browser | Krithi-centric provenance list and detail views. |
| Field Comparison View | Multi-source diff table with conflict highlighting. |
| Structural Voting Viewer | Voting decision list and detail views. StructureVisualiser component. |
| Manual Override | Section structure editor for manual voting overrides. |
Backend dependencies: Quality Dashboard API, audit query integration.
| Deliverable | Description |
|---|---|
| Quality Dashboard | KPI cards, distribution histogram, tier coverage chart. |
| Enrichment Phase Progress | Phase progress bars with target tracking. |
| Composer Coverage Matrix | HeatmapGrid component for coverage visualisation. |
| Data Gaps & Audit Results | Gap tables with links, audit query result display. |
| Concern | Requirement |
|---|---|
| Keyboard Navigation | All interactive elements must be keyboard-accessible. Tab order follows visual hierarchy. |
| Screen Reader | ARIA labels for metric cards, badges, charts. Data tables have proper headers and captions. |
| Colour Contrast | All tier badge and status chip colours meet WCAG AA contrast ratios against their backgrounds. |
| Responsive Layout | Metric card rows collapse to 2×2 grid on tablet, single column on mobile. Tables switch to card layout below 768px. |
| Loading States | Skeleton loaders for all data-fetching states. Extraction Monitor shows loading indicator during auto-refresh. |
| Error States | Empty states with helpful messages (“No extractions yet — start by submitting an extraction request”). Error boundaries with retry actions. |
| Existing Screen | Integration Point |
|---|---|
| Krithi Editor | New “Source Evidence” tab showing all contributing sources, field provenance, and voting decisions for the current Krithi. Links to Source Evidence Browser and Voting Detail. |
| Bulk Import — Batch Detail | Link from extraction-linked tasks to Extraction Detail. “Source Authority” column in task explorer showing the tier of the source being imported. |
| Bulk Import — Task Review | Source evidence sidebar showing alternative values from other sources during entity resolution. Confidence indicators from structural voting. |
| Import Review (Section 6.2.7 of PRD) | Authority source validation: show tier badge next to source, warn if approving data from a lower-tier source when higher-tier data exists. |
| Metric | Target | Measurement |
|---|---|---|
| Source Registry Completeness | All 5+ known sources registered with accurate tiers | Manual audit |
| Extraction Queue Visibility | Operators can identify failed extractions within 5 minutes | Time-to-awareness measurement |
| Provenance Coverage | 100% of published Krithis have at least one source evidence record | Quality Dashboard metric |
| Voting Audit Compliance | All structural decisions are logged and viewable | structural_vote_log completeness |
| Manual Review Turnaround | LOW-confidence voting decisions reviewed within 48 hours | Aging metric on pending reviews |
| Quality Dashboard Usage | Dashboard viewed at least weekly by quality auditor | Access logs |
| # | Question | Context |
|---|---|---|
| 1 | Should the Quality Dashboard support custom date ranges for trend analysis? | Useful for tracking improvement over time, but adds complexity. |
| 2 | Should source evidence be editable (e.g., correcting contributed fields after extraction)? | Current design treats evidence as immutable audit records. |
| 3 | Should notifications (email/Slack) be sent for failed extractions or pending manual reviews? | Depends on team size and operational workflow. |
| 4 | Should the structural voting override support undo/rollback? | Currently each override creates a new vote log entry; previous decisions remain in history. |
| 5 | Should the Extraction Monitor support bulk selection and batch operations? | Useful for large-scale campaigns; adds UI complexity. |
| Document | Path |
|---|---|
| Krithi Data Sourcing & Quality Strategy | quality-strategy.md |
| Implementation Checklist | implementation-checklist.md |
| Bulk Import UI/UX Plan | ../features/bulk-import/ui-ux-plan.md |
| Admin Web PRD | ../admin-web/prd.md |
| Product Requirements Document | ../product-requirements-document.md |
| Database Schema | ../../04-database/schema.md |
| TRACK-041 | ../../../conductor/tracks/TRACK-041-enhanced-sourcing-logic.md |