# o-tech477/indian-classical-dance-step-generation-from-song architecture

> Architecture diagram of the GitHub repository o-tech477/indian-classical-dance-step-generation-from-song, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/o-tech477/indian-classical-dance-step-generation-from-song
- Repository: https://github.com/o-tech477/indian-classical-dance-step-generation-from-song

## Overview

BeatsNatyam turns a prompt or uploaded recording into an account-scoped dance: recommendation/download or upload, beat-and-tala analysis, adavu-cycle vocabulary and phrase planning, then a stick-figure player. The Flask app also provides sign-in, chat history, saved songs, hasta suggestions, and instrument tags. The README documents these branches; unsampled route internals limit claims about some wiring, so the graph shows only relationships supported by excerpts or documentation.

Main entry points: [`app.py`](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/app.py) (Flask web app), [`pipeline.py`](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/pipeline.py) (Dance pipeline), [`modules/audio_service.py`](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/audio_service.py) (Audio download and prep), [`dance/common.py`](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/common.py) (Pipeline constants)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web and accounts"]
  node_app["Flask web app<br/>[app.py]"]
  node_auth["Google sign-in<br/>[auth_service.py]"]
  node_chats["Chat history<br/>[chat_store.py]"]
end

subgraph group_music["Music services"]
  node_song_search["Song recommendation<br/>[llm_service.py]"]
  node_audio["Audio download and prep<br/>[audio_service.py]"]
  node_library[("Song catalog<br/>[storage_service.py]")]
  node_tala["Tala lookup<br/>[tala.py]"]
  node_analyzer["Audio checker<br/>[audio_analyzer.py]"]
end

subgraph group_choreo["Choreography pipeline"]
  node_analysis["Beat analysis<br/>[analysis.py]"]
  node_shared["Pipeline constants<br/>[common.py]"]
  node_vocabulary["Adavu vocabulary<br/>[vocabulary.py]"]
  node_cycle["Cycle extraction<br/>[cycle.py]"]
  node_pose["Pose constraints<br/>[pose.py]"]
  node_planner["Phrase planner<br/>[planner.py]"]
  node_player["Dance player<br/>[player.py]"]
  node_pipeline["Dance pipeline<br/>[pipeline.py]"]
  node_extractor["Landmark extraction"]
end

subgraph group_enrichment["Dance annotations"]
  node_mudhra["Hasta timeline<br/>[mudhra_service.py]"]
  node_instruments["Instrument tags"]
end

node_browser(("Signed-in browser"))
node_supabase[("Supabase Auth and data")]
node_groq["Groq search API"]
node_youtube["YouTube audio"]

node_browser -->|"uses"| node_app
node_app -->|"delegates sign-in"| node_auth
node_auth -->|"authenticates"| node_supabase
node_app -->|"stores chats"| node_chats
node_chats -.->|"uses remote store"| node_supabase
node_app -->|"requests recommendation"| node_song_search
node_song_search -->|"searches"| node_groq
node_app -->|"downloads or caps"| node_audio
node_audio -->|"downloads from"| node_youtube
node_app -->|"catalogs songs"| node_library
node_library -->|"normalizes tala"| node_tala
node_app -->|"runs"| node_pipeline
node_pipeline -->|"caps track"| node_audio
node_pipeline -->|"analyzes"| node_analysis
node_analysis -->|"uses constants"| node_shared
node_pipeline -->|"loads adavus"| node_vocabulary
node_vocabulary -->|"builds cycles"| node_cycle
node_cycle -->|"constrains poses"| node_pose
node_cycle -->|"uses constants"| node_shared
node_pipeline -->|"plans phrases"| node_planner
node_planner -->|"uses constants"| node_shared
node_pipeline -->|"writes player"| node_player
node_player -->|"uses constants"| node_shared
node_app -->|"serves hastas"| node_mudhra
node_pipeline -->|"loads saved timeline"| node_mudhra
node_app -->|"predicts tags"| node_instruments
node_extractor -.->|"provides landmarks"| node_vocabulary
node_analyzer -.->|"checks audio"| node_audio
node_browser -->|"uploads track"| node_app

click node_app "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/app.py"
click node_auth "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/auth_service.py"
click node_chats "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/chat_store.py"
click node_song_search "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/llm_service.py"
click node_audio "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/audio_service.py"
click node_library "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/storage_service.py"
click node_tala "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/tala.py"
click node_analysis "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/analysis.py"
click node_shared "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/common.py"
click node_vocabulary "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/vocabulary.py"
click node_cycle "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/cycle.py"
click node_pose "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/pose.py"
click node_planner "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/planner.py"
click node_player "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/player.py"
click node_pipeline "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/pipeline.py"
click node_mudhra "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/mudhra_service.py"
click node_instruments "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/instrument_service.py"
click node_extractor "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/adavus_extractor.py"
click node_analyzer "https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/audio_analyzer.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,node_chats,node_browser toneBlue
class node_song_search,node_audio,node_library,node_tala,node_analyzer,node_supabase toneAmber
class node_analysis,node_shared,node_vocabulary,node_cycle,node_pose,node_planner,node_player,node_pipeline,node_extractor,node_groq toneMint
class node_mudhra,node_instruments toneRose
class node_youtube toneIndigo
```

## Components

### Web and accounts

- [Flask web app](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/app.py): `app.py`
- [Google sign-in](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/auth_service.py): `modules/auth_service.py`
- [Chat history](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/chat_store.py): `modules/chat_store.py`

### Music services

- [Song recommendation](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/llm_service.py): `modules/llm_service.py`
- [Audio download and prep](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/audio_service.py): `modules/audio_service.py`
- [Song catalog](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/storage_service.py): `modules/storage_service.py`
- [Tala lookup](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/tala.py): `modules/tala.py`
- [Audio checker](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/audio_analyzer.py): `audio_analyzer.py`

### Choreography pipeline

- [Beat analysis](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/analysis.py): `dance/analysis.py`
- [Pipeline constants](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/common.py): `dance/common.py`
- [Adavu vocabulary](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/vocabulary.py): `dance/vocabulary.py`
- [Cycle extraction](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/cycle.py): `dance/cycle.py`
- [Pose constraints](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/pose.py): `dance/pose.py`
- [Phrase planner](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/planner.py): `dance/planner.py`
- [Dance player](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/dance/player.py): `dance/player.py`
- [Dance pipeline](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/pipeline.py): `pipeline.py`
- [Landmark extraction](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/adavus_extractor.py): `adavus_extractor.py`

### Dance annotations

- [Hasta timeline](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/mudhra_service.py): `modules/mudhra_service.py`
- [Instrument tags](https://github.com/o-tech477/indian-classical-dance-step-generation-from-song/blob/master/modules/instrument_service.py): `modules/instrument_service.py`

### Other components

- **Signed-in browser**
- **Supabase Auth and data**
- **Groq search API**
- **YouTube audio**

## Connections

- Signed-in browser → Flask web app: uses (evidence: `README.md`)
- Flask web app → Google sign-in: delegates sign-in (evidence: `app.py`)
- Google sign-in → Supabase Auth and data: authenticates (evidence: `modules/auth_service.py`)
- Flask web app → Chat history: stores chats (evidence: `app.py`)
- Chat history → Supabase Auth and data: uses remote store (evidence: `README.md`)
- Flask web app → Song recommendation: requests recommendation (evidence: `app.py`)
- Song recommendation → Groq search API: searches (evidence: `modules/llm_service.py`)
- Flask web app → Audio download and prep: downloads or caps (evidence: `app.py`)
- Audio download and prep → YouTube audio: downloads from (evidence: `modules/audio_service.py`)
- Flask web app → Song catalog: catalogs songs (evidence: `README.md`)
- Song catalog → Tala lookup: normalizes tala (evidence: `modules/storage_service.py`)
- Flask web app → Dance pipeline: runs (evidence: `README.md`)
- Dance pipeline → Audio download and prep: caps track (evidence: `pipeline.py`)
- Dance pipeline → Beat analysis: analyzes (evidence: `pipeline.py`)
- Beat analysis → Pipeline constants: uses constants (evidence: `dance/analysis.py`)
- Dance pipeline → Adavu vocabulary: loads adavus (evidence: `pipeline.py`)
- Adavu vocabulary → Cycle extraction: builds cycles (evidence: `dance/vocabulary.py`)
- Cycle extraction → Pose constraints: constrains poses (evidence: `dance/cycle.py`)
- Cycle extraction → Pipeline constants: uses constants (evidence: `dance/cycle.py`)
- Dance pipeline → Phrase planner: plans phrases (evidence: `pipeline.py`)
- Phrase planner → Pipeline constants: uses constants (evidence: `dance/planner.py`)
- Dance pipeline → Dance player: writes player (evidence: `pipeline.py`)
- Dance player → Pipeline constants: uses constants (evidence: `dance/player.py`)
- Flask web app → Hasta timeline: serves hastas (evidence: `app.py`)
- Dance pipeline → Hasta timeline: loads saved timeline (evidence: `pipeline.py`)
- Flask web app → Instrument tags: predicts tags (evidence: `app.py`)
- Landmark extraction → Adavu vocabulary: provides landmarks (evidence: `README.md`)
- Audio checker → Audio download and prep: checks audio (evidence: `README.md`)
- Signed-in browser → Flask web app: uploads track (evidence: `README.md`)
