# krishshripat/vedic-acoustica architecture

> Architecture diagram of the GitHub repository krishshripat/vedic-acoustica, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/krishshripat/vedic-acoustica
- Repository: https://github.com/krishshripat/vedic-acoustica

## Overview

Vedic Acoustica is a web application for analyzing chant and music recordings, not speech transcription. A user authenticates or uploads audio in the React app; Django exposes recording operations and background analysis, whose results are presented as Shruti, Ghana Patha, and raga visualizations. The README documents the three analysis capabilities and corpus ingestion. Some API and task internals are only partially sampled, so the graph omits uncertain details and uses only evidenced or documented relationships.

Main entry points: [`frontend/src/App.jsx`](https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/App.jsx) (Analysis app), [`backend/api/tasks.py`](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/tasks.py) (Analysis task), [`backend/api/views.py`](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/views.py) (Recording API), [`backend/api/models.py`](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/models.py) (Recording records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Analysis app<br/>[App.jsx]"]
  node_auth_screen["Authentication<br/>[AuthScreen.jsx]"]
  node_auth_util["Auth utilities<br/>[auth.js]"]
  node_uploader["Audio uploader<br/>[AudioUploader.jsx]"]
  node_progress["Analysis progress"]
  node_shruti_viz["Shruti views<br/>[ShrutiMap.jsx]"]
  node_cluster_viz["Shruti clusters<br/>[ClusterPlot.jsx]"]
  node_ghana_viz["Ghana visualization<br/>[GhanaPathaViz.jsx]"]
  node_raga_viz["Raga visualization<br/>[RagaViz.jsx]"]
  node_audio_player["Audio playback<br/>[AudioPlayer.jsx]"]
  node_spectrogram["Spectrogram view"]
end

subgraph group_api["API and records"]
  node_api_views["Recording API<br/>[views.py]"]
  node_recording_store[("Recording records<br/>[models.py]")]
  node_serializers["API serializers<br/>[serializers.py]"]
  node_analysis_tasks["Analysis task<br/>[tasks.py]"]
end

subgraph group_analysis["Audio analysis"]
  node_features["Feature extraction"]
  node_shruti_map["Shruti assignment<br/>[shruti_mapping.py]"]
  node_clustering["Shruti clustering<br/>[ml_engine.py]"]
  node_ghana_analysis["Ghana Patha validation<br/>[ghana_patha.py]"]
  node_raga_analysis["Raga detection<br/>[raga_mapping.py]"]
end

subgraph group_operations["Monitoring and corpus"]
  node_corpus_ingest["Corpus ingestion<br/>[ingest_corpus.py]"]
  node_metrics["Metrics endpoint<br/>[metrics.py]"]
end

node_user(("Recording user"))
node_monitor(("Metrics scraper"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_auth_screen
node_app -->|"renders"| node_uploader
node_app -->|"renders"| node_progress
node_app -->|"renders"| node_shruti_viz
node_app -->|"renders"| node_cluster_viz
node_app -->|"renders"| node_ghana_viz
node_app -->|"renders"| node_raga_viz
node_app -->|"renders"| node_audio_player
node_app -->|"renders"| node_spectrogram
node_app -->|"uses"| node_auth_util
node_auth_screen -->|"stores credentials"| node_auth_util
node_app -->|"requests API"| node_api_views
node_api_views -->|"reads and writes"| node_recording_store
node_api_views -->|"serializes records"| node_serializers
node_api_views -->|"dispatches analysis"| node_analysis_tasks
node_analysis_tasks -->|"loads and updates"| node_recording_store
node_analysis_tasks -->|"extracts features"| node_features
node_analysis_tasks -->|"assigns clusters"| node_clustering
node_analysis_tasks -->|"validates pattern"| node_ghana_analysis
node_analysis_tasks -->|"detects raga"| node_raga_analysis
node_features -->|"uses frequency map"| node_shruti_map
node_clustering -->|"assigns shruti"| node_shruti_map
node_analysis_tasks -.->|"returns analysis results"| node_app
node_corpus_ingest -->|"saves recordings"| node_recording_store
node_corpus_ingest -->|"queues analysis"| node_analysis_tasks
node_monitor -.->|"scrapes metrics"| node_metrics

click node_app "https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/App.jsx"
click node_auth_screen "https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/AuthScreen.jsx"
click node_auth_util "https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/utils/auth.js"
click node_uploader "https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/AudioUploader.jsx"
click node_progress "https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/AnalysisProgress.jsx"
click node_shruti_viz "https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/ShrutiMap.jsx"
click node_cluster_viz "https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/ClusterPlot.jsx"
click node_ghana_viz "https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/GhanaPathaViz.jsx"
click node_raga_viz "https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/RagaViz.jsx"
click node_audio_player "https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/AudioPlayer.jsx"
click node_spectrogram "https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/SpectrogramView.jsx"
click node_api_views "https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/views.py"
click node_recording_store "https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/models.py"
click node_serializers "https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/serializers.py"
click node_analysis_tasks "https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/tasks.py"
click node_features "https://github.com/krishshripat/vedic-acoustica/blob/main/backend/ml_engine/audio_processing.py"
click node_shruti_map "https://github.com/krishshripat/vedic-acoustica/blob/main/backend/ml_engine/shruti_mapping.py"
click node_clustering "https://github.com/krishshripat/vedic-acoustica/blob/main/backend/ml_engine/ml_engine.py"
click node_ghana_analysis "https://github.com/krishshripat/vedic-acoustica/blob/main/backend/ml_engine/ghana_patha.py"
click node_raga_analysis "https://github.com/krishshripat/vedic-acoustica/blob/main/backend/ml_engine/raga_mapping.py"
click node_corpus_ingest "https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/management/commands/ingest_corpus.py"
click node_metrics "https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/metrics.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_auth_screen,node_auth_util,node_uploader,node_progress,node_shruti_viz,node_cluster_viz,node_ghana_viz,node_raga_viz,node_audio_player,node_spectrogram,node_user toneBlue
class node_api_views,node_recording_store,node_serializers,node_analysis_tasks toneAmber
class node_features,node_shruti_map,node_clustering,node_ghana_analysis,node_raga_analysis toneMint
class node_corpus_ingest,node_metrics toneRose
class node_monitor toneIndigo
```

## Components

### Web client

- [Analysis app](https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Authentication](https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/AuthScreen.jsx): `frontend/src/components/AuthScreen.jsx`
- [Auth utilities](https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/utils/auth.js): `frontend/src/utils/auth.js`
- [Audio uploader](https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/AudioUploader.jsx): `frontend/src/components/AudioUploader.jsx`
- [Analysis progress](https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/AnalysisProgress.jsx): `frontend/src/components/AnalysisProgress.jsx`
- [Shruti views](https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/ShrutiMap.jsx): `frontend/src/components/ShrutiMap.jsx`
- [Shruti clusters](https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/ClusterPlot.jsx): `frontend/src/components/ClusterPlot.jsx`
- [Ghana visualization](https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/GhanaPathaViz.jsx): `frontend/src/components/GhanaPathaViz.jsx`
- [Raga visualization](https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/RagaViz.jsx): `frontend/src/components/RagaViz.jsx`
- [Audio playback](https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/AudioPlayer.jsx): `frontend/src/components/AudioPlayer.jsx`
- [Spectrogram view](https://github.com/krishshripat/vedic-acoustica/blob/main/frontend/src/components/SpectrogramView.jsx): `frontend/src/components/SpectrogramView.jsx`

### API and records

- [Recording API](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/views.py): `backend/api/views.py`
- [Recording records](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/models.py): `backend/api/models.py`
- [API serializers](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/serializers.py): `backend/api/serializers.py`
- [Analysis task](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/tasks.py): `backend/api/tasks.py`

### Audio analysis

- [Feature extraction](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/ml_engine/audio_processing.py): `backend/ml_engine/audio_processing.py`
- [Shruti assignment](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/ml_engine/shruti_mapping.py): `backend/ml_engine/shruti_mapping.py`
- [Shruti clustering](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/ml_engine/ml_engine.py): `backend/ml_engine/ml_engine.py`
- [Ghana Patha validation](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/ml_engine/ghana_patha.py): `backend/ml_engine/ghana_patha.py`
- [Raga detection](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/ml_engine/raga_mapping.py): `backend/ml_engine/raga_mapping.py`

### Monitoring and corpus

- [Corpus ingestion](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/management/commands/ingest_corpus.py): `backend/api/management/commands/ingest_corpus.py`
- [Metrics endpoint](https://github.com/krishshripat/vedic-acoustica/blob/main/backend/api/metrics.py): `backend/api/metrics.py`

### Other components

- **Recording user**
- **Metrics scraper**

## Connections

- Recording user → Analysis app: uses
- Analysis app → Authentication: renders (evidence: `frontend/src/App.jsx`)
- Analysis app → Audio uploader: renders (evidence: `frontend/src/App.jsx`)
- Analysis app → Analysis progress: renders (evidence: `frontend/src/App.jsx`)
- Analysis app → Shruti views: renders (evidence: `frontend/src/App.jsx`)
- Analysis app → Shruti clusters: renders (evidence: `frontend/src/App.jsx`)
- Analysis app → Ghana visualization: renders (evidence: `frontend/src/App.jsx`)
- Analysis app → Raga visualization: renders (evidence: `frontend/src/App.jsx`)
- Analysis app → Audio playback: renders (evidence: `frontend/src/App.jsx`)
- Analysis app → Spectrogram view: renders (evidence: `frontend/src/App.jsx`)
- Analysis app → Auth utilities: uses (evidence: `frontend/src/App.jsx`)
- Authentication → Auth utilities: stores credentials (evidence: `frontend/src/components/AuthScreen.jsx`)
- Analysis app → Recording API: requests API (evidence: `frontend/src/App.jsx`)
- Recording API → Recording records: reads and writes (evidence: `backend/api/views.py`)
- Recording API → API serializers: serializes records (evidence: `backend/api/views.py`)
- Recording API → Analysis task: dispatches analysis (evidence: `backend/api/views.py`)
- Analysis task → Recording records: loads and updates (evidence: `backend/api/tasks.py`)
- Analysis task → Feature extraction: extracts features (evidence: `backend/api/tasks.py`)
- Analysis task → Shruti clustering: assigns clusters (evidence: `backend/api/tasks.py`)
- Analysis task → Ghana Patha validation: validates pattern (evidence: `backend/api/tasks.py`)
- Analysis task → Raga detection: detects raga (evidence: `backend/api/tasks.py`)
- Feature extraction → Shruti assignment: uses frequency map (evidence: `backend/ml_engine/audio_processing.py`)
- Shruti clustering → Shruti assignment: assigns shruti (evidence: `backend/ml_engine/ml_engine.py`)
- Analysis task → Analysis app: returns analysis results
- Corpus ingestion → Recording records: saves recordings (evidence: `backend/api/management/commands/ingest_corpus.py`)
- Corpus ingestion → Analysis task: queues analysis (evidence: `backend/api/management/commands/ingest_corpus.py`)
- Metrics scraper → Metrics endpoint: scrapes metrics
