# taazcode/explore_india architecture

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

- Interactive diagram: https://gitdiagram.com/taazcode/explore_india
- Repository: https://github.com/taazcode/explore_india

## Overview

Bharat Connect is a cultural-exploration web app with state guides, cultural highlights, language learning, quizzes, and a saved traveller profile. The main journey is to explore a state, view its guide and cultural content, then earn and track progress through learning activities. The graph also shows shared translation and progress layers and the AI guide and speech capabilities. Some page and integration links are based on the SOURCE INDEX or excerpts; unsampled behavior is not inferred beyond those references.

Main entry points: [`src/App.tsx`](https://github.com/taazcode/explore_india/blob/main/src/App.tsx) (App & State Guide), [`src/ProfilePage.tsx`](https://github.com/taazcode/explore_india/blob/main/src/ProfilePage.tsx) (Traveller Profile), [`src/components/LanguageContext.tsx`](https://github.com/taazcode/explore_india/blob/main/src/components/LanguageContext.tsx) (Language Context), [`src/LanguagesPage.tsx`](https://github.com/taazcode/explore_india/blob/main/src/LanguagesPage.tsx) (Languages Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_explore["Explore India"]
  node_app["App &amp; State Guide<br/>[App.tsx]"]
  node_culture["Culture Page<br/>[CulturePage.tsx]"]
  node_highlights["Highlight Gallery<br/>[HighlightGrid.tsx]"]
  node_about["About Page<br/>[AboutPage.tsx]"]
end

subgraph group_learn["Learn &amp; Play"]
  node_languages["Languages Page<br/>[LanguagesPage.tsx]"]
  node_quests["Quests &amp; Quizzes<br/>[QuestsPage.tsx]"]
  node_profile["Traveller Profile<br/>[ProfilePage.tsx]"]
end

subgraph group_shared["Shared Services"]
  node_languagecontext["Language Context"]
  node_translationservice["Live Translation<br/>[translate.ts]"]
  node_progress[("Progress Store<br/>[progress.ts]")]
  node_avatars["Avatar Helpers<br/>[avatars.ts]"]
  node_tts["Speech Playback<br/>[tts.ts]"]
  node_groq["AI Guide Client<br/>[groq.ts]"]
end

subgraph group_content["Cultural Data"]
  node_phrasebook["Phrasebook Data<br/>[phrases.ts]"]
  node_quizdata["Quiz Data<br/>[quiz.ts]"]
  node_exploredata["State Highlights<br/>[exploreContent.ts]"]
  node_states["State Catalog<br/>[states.ts]"]
  node_allstates["All-State Catalog<br/>[allStates.ts]"]
  node_mapdata["India Map Paths<br/>[indiaPaths.ts]"]
  node_statecodes["State Codes<br/>[stateCodes.ts]"]
  node_translations["Translation Catalog<br/>[translations.ts]"]
end

node_traveller(("Traveller"))
node_groqservice{{"Groq API"}}
node_browser{{"Browser Speech"}}

node_traveller -->|"explores states"| node_app
node_app -->|"opens page"| node_culture
node_app -->|"opens page"| node_about
node_app -->|"opens page"| node_languages
node_app -->|"opens page"| node_quests
node_app -->|"opens page"| node_profile
node_app -->|"reads state details"| node_states
node_app -->|"reads highlights"| node_exploredata
node_app -->|"renders map"| node_mapdata
node_app -->|"uses state codes"| node_statecodes
node_app -->|"reads state list"| node_allstates
node_app -->|"requests guide reply"| node_groq
node_groq -.->|"sends API request"| node_groqservice
node_culture -->|"renders gallery"| node_highlights
node_culture -->|"reads highlights"| node_exploredata
node_highlights -->|"loads highlight data"| node_exploredata
node_highlights -->|"toggles bookmarks"| node_progress
node_languages -->|"reads phrases"| node_phrasebook
node_languages -->|"tracks learning"| node_progress
node_quests -->|"loads questions"| node_quizdata
node_quests -->|"records quest progress"| node_progress
node_profile -->|"reads journey"| node_progress
node_profile -->|"uses avatar helpers"| node_avatars
node_profile -->|"speaks greeting"| node_tts
node_profile -->|"reads phrase history"| node_phrasebook
node_quizdata -->|"uses state data"| node_allstates
node_quizdata -->|"uses phrase data"| node_phrasebook
node_languagecontext -->|"reads translations"| node_translations
node_languagecontext -->|"requests missing translations"| node_translationservice
node_app -->|"uses language context"| node_languagecontext
node_languages -->|"uses language context"| node_languagecontext
node_quests -->|"uses language context"| node_languagecontext
node_profile -->|"uses language context"| node_languagecontext
node_tts -.->|"requests neural speech"| node_groqservice
node_tts -.->|"uses speech synthesis"| node_browser

click node_app "https://github.com/taazcode/explore_india/blob/main/src/App.tsx"
click node_culture "https://github.com/taazcode/explore_india/blob/main/src/CulturePage.tsx"
click node_highlights "https://github.com/taazcode/explore_india/blob/main/src/components/HighlightGrid.tsx"
click node_about "https://github.com/taazcode/explore_india/blob/main/src/AboutPage.tsx"
click node_languages "https://github.com/taazcode/explore_india/blob/main/src/LanguagesPage.tsx"
click node_quests "https://github.com/taazcode/explore_india/blob/main/src/QuestsPage.tsx"
click node_profile "https://github.com/taazcode/explore_india/blob/main/src/ProfilePage.tsx"
click node_phrasebook "https://github.com/taazcode/explore_india/blob/main/src/data/phrases.ts"
click node_quizdata "https://github.com/taazcode/explore_india/blob/main/src/data/quiz.ts"
click node_exploredata "https://github.com/taazcode/explore_india/blob/main/src/data/exploreContent.ts"
click node_states "https://github.com/taazcode/explore_india/blob/main/src/data/states.ts"
click node_allstates "https://github.com/taazcode/explore_india/blob/main/src/data/allStates.ts"
click node_mapdata "https://github.com/taazcode/explore_india/blob/main/src/data/indiaPaths.ts"
click node_statecodes "https://github.com/taazcode/explore_india/blob/main/src/data/stateCodes.ts"
click node_translations "https://github.com/taazcode/explore_india/blob/main/src/data/translations.ts"
click node_languagecontext "https://github.com/taazcode/explore_india/blob/main/src/components/LanguageContext.tsx"
click node_translationservice "https://github.com/taazcode/explore_india/blob/main/src/lib/translate.ts"
click node_progress "https://github.com/taazcode/explore_india/blob/main/src/lib/progress.ts"
click node_avatars "https://github.com/taazcode/explore_india/blob/main/src/lib/avatars.ts"
click node_tts "https://github.com/taazcode/explore_india/blob/main/src/lib/tts.ts"
click node_groq "https://github.com/taazcode/explore_india/blob/main/src/lib/groq.ts"

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_culture,node_highlights,node_about,node_browser toneBlue
class node_languages,node_quests,node_profile toneAmber
class node_languagecontext,node_translationservice,node_progress,node_avatars,node_tts,node_groq,node_groqservice toneMint
class node_phrasebook,node_quizdata,node_exploredata,node_states,node_allstates,node_mapdata,node_statecodes,node_translations toneRose
class node_traveller toneIndigo
```

## Components

### Explore India

- [App & State Guide](https://github.com/taazcode/explore_india/blob/main/src/App.tsx): `src/App.tsx`
- [Culture Page](https://github.com/taazcode/explore_india/blob/main/src/CulturePage.tsx): `src/CulturePage.tsx`
- [Highlight Gallery](https://github.com/taazcode/explore_india/blob/main/src/components/HighlightGrid.tsx): `src/components/HighlightGrid.tsx`
- [About Page](https://github.com/taazcode/explore_india/blob/main/src/AboutPage.tsx): `src/AboutPage.tsx`

### Learn & Play

- [Languages Page](https://github.com/taazcode/explore_india/blob/main/src/LanguagesPage.tsx): `src/LanguagesPage.tsx`
- [Quests & Quizzes](https://github.com/taazcode/explore_india/blob/main/src/QuestsPage.tsx): `src/QuestsPage.tsx`
- [Traveller Profile](https://github.com/taazcode/explore_india/blob/main/src/ProfilePage.tsx): `src/ProfilePage.tsx`

### Shared Services

- [Language Context](https://github.com/taazcode/explore_india/blob/main/src/components/LanguageContext.tsx): `src/components/LanguageContext.tsx`
- [Live Translation](https://github.com/taazcode/explore_india/blob/main/src/lib/translate.ts): `src/lib/translate.ts`
- [Progress Store](https://github.com/taazcode/explore_india/blob/main/src/lib/progress.ts): `src/lib/progress.ts`
- [Avatar Helpers](https://github.com/taazcode/explore_india/blob/main/src/lib/avatars.ts): `src/lib/avatars.ts`
- [Speech Playback](https://github.com/taazcode/explore_india/blob/main/src/lib/tts.ts): `src/lib/tts.ts`
- [AI Guide Client](https://github.com/taazcode/explore_india/blob/main/src/lib/groq.ts): `src/lib/groq.ts`

### Cultural Data

- [Phrasebook Data](https://github.com/taazcode/explore_india/blob/main/src/data/phrases.ts): `src/data/phrases.ts`
- [Quiz Data](https://github.com/taazcode/explore_india/blob/main/src/data/quiz.ts): `src/data/quiz.ts`
- [State Highlights](https://github.com/taazcode/explore_india/blob/main/src/data/exploreContent.ts): `src/data/exploreContent.ts`
- [State Catalog](https://github.com/taazcode/explore_india/blob/main/src/data/states.ts): `src/data/states.ts`
- [All-State Catalog](https://github.com/taazcode/explore_india/blob/main/src/data/allStates.ts): `src/data/allStates.ts`
- [India Map Paths](https://github.com/taazcode/explore_india/blob/main/src/data/indiaPaths.ts): `src/data/indiaPaths.ts`
- [State Codes](https://github.com/taazcode/explore_india/blob/main/src/data/stateCodes.ts): `src/data/stateCodes.ts`
- [Translation Catalog](https://github.com/taazcode/explore_india/blob/main/src/data/translations.ts): `src/data/translations.ts`

### Other components

- **Traveller**
- **Groq API**
- **Browser Speech**

## Connections

- Traveller → App & State Guide: explores states (evidence: `src/App.tsx`)
- App & State Guide → Culture Page: opens page (evidence: `src/App.tsx`)
- App & State Guide → About Page: opens page (evidence: `src/App.tsx`)
- App & State Guide → Languages Page: opens page (evidence: `src/App.tsx`)
- App & State Guide → Quests & Quizzes: opens page (evidence: `src/App.tsx`)
- App & State Guide → Traveller Profile: opens page (evidence: `src/App.tsx`)
- App & State Guide → State Catalog: reads state details (evidence: `src/App.tsx`)
- App & State Guide → State Highlights: reads highlights (evidence: `src/App.tsx`)
- App & State Guide → India Map Paths: renders map (evidence: `src/App.tsx`)
- App & State Guide → State Codes: uses state codes (evidence: `src/App.tsx`)
- App & State Guide → All-State Catalog: reads state list (evidence: `src/App.tsx`)
- App & State Guide → AI Guide Client: requests guide reply (evidence: `src/App.tsx`)
- AI Guide Client → Groq API: sends API request
- Culture Page → Highlight Gallery: renders gallery (evidence: `src/CulturePage.tsx`)
- Culture Page → State Highlights: reads highlights (evidence: `src/CulturePage.tsx`)
- Highlight Gallery → State Highlights: loads highlight data (evidence: `src/components/HighlightGrid.tsx`)
- Highlight Gallery → Progress Store: toggles bookmarks (evidence: `src/components/HighlightGrid.tsx`)
- Languages Page → Phrasebook Data: reads phrases (evidence: `src/LanguagesPage.tsx`)
- Languages Page → Progress Store: tracks learning (evidence: `src/LanguagesPage.tsx`)
- Quests & Quizzes → Quiz Data: loads questions (evidence: `src/QuestsPage.tsx`)
- Quests & Quizzes → Progress Store: records quest progress (evidence: `src/QuestsPage.tsx`)
- Traveller Profile → Progress Store: reads journey (evidence: `src/ProfilePage.tsx`)
- Traveller Profile → Avatar Helpers: uses avatar helpers (evidence: `src/ProfilePage.tsx`)
- Traveller Profile → Speech Playback: speaks greeting (evidence: `src/ProfilePage.tsx`)
- Traveller Profile → Phrasebook Data: reads phrase history (evidence: `src/ProfilePage.tsx`)
- Quiz Data → All-State Catalog: uses state data (evidence: `src/data/quiz.ts`)
- Quiz Data → Phrasebook Data: uses phrase data (evidence: `src/data/quiz.ts`)
- Language Context → Translation Catalog: reads translations (evidence: `src/components/LanguageContext.tsx`)
- Language Context → Live Translation: requests missing translations (evidence: `src/components/LanguageContext.tsx`)
- App & State Guide → Language Context: uses language context (evidence: `src/App.tsx`)
- Languages Page → Language Context: uses language context (evidence: `src/LanguagesPage.tsx`)
- Quests & Quizzes → Language Context: uses language context (evidence: `src/QuestsPage.tsx`)
- Traveller Profile → Language Context: uses language context (evidence: `src/ProfilePage.tsx`)
- Speech Playback → Groq API: requests neural speech
- Speech Playback → Browser Speech: uses speech synthesis
