# samyukthagovardhan-prog/nammabridge architecture

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

- Interactive diagram: https://gitdiagram.com/samyukthagovardhan-prog/nammabridge
- Repository: https://github.com/samyukthagovardhan-prog/nammabridge

## Overview

NammaBridge is a bilingual Tamil/English government-scheme guide. Citizens browse or search scheme listings, inspect scheme details and application steps, and can open an eligibility/document verifier or ask the assistant; voice input and playback support these interactions. App owns the main search flow, while dedicated components provide the distinct browsing, details, verification, chat, and language experiences. The excerpts establish component imports and selected utility calls; implementation details of unsampled components and the server are not assumed.

Main entry points: [`src/App.tsx`](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/App.tsx) (App Orchestrator), [`src/data/i18n.ts`](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/data/i18n.ts) (Translations), [`src/components/ChatDrawer.tsx`](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/ChatDrawer.tsx) (AI Assistant), [`src/data/schemes.ts`](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/data/schemes.ts) (Scheme Listings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["App Orchestrator<br/>[App.tsx]"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
  node_hero["Search Interface<br/>[HeroSearch.tsx]"]
  node_footer["Portal Footer<br/>[Footer.tsx]"]
end

subgraph group_catalog["Scheme Catalog"]
  node_category["Category Filters<br/>[CategoryBar.tsx]"]
  node_scheme_card["Scheme Cards<br/>[SchemeCard.tsx]"]
  node_scheme_modal["Scheme Details<br/>[SchemeModal.tsx]"]
  node_schemes["Scheme Listings<br/>[schemes.ts]"]
end

subgraph group_citizen["Citizen Tools"]
  node_doc_verifier["Eligibility Verifier"]
  node_chat["AI Assistant<br/>[ChatDrawer.tsx]"]
  node_language_modal["Language Selector<br/>[LanguageModal.tsx]"]
end

subgraph group_shared["Shared Services"]
  node_search_matcher["Search Ranking<br/>[searchMatcher.ts]"]
  node_speech["Speech Utilities<br/>[speech.ts]"]
  node_translations["Translations<br/>[i18n.ts]"]
  node_scheme_types["Scheme Types<br/>[scheme.ts]"]
end

node_citizen_user(("Citizen"))

node_citizen_user -->|"uses"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_hero
node_app -->|"renders"| node_category
node_app -->|"renders"| node_scheme_card
node_app -->|"renders"| node_scheme_modal
node_app -->|"renders"| node_doc_verifier
node_app -->|"renders"| node_chat
node_app -->|"renders"| node_language_modal
node_app -->|"renders"| node_footer
node_app -->|"ranks listings"| node_search_matcher
node_app -->|"filters listings"| node_schemes
node_category -->|"reads categories"| node_schemes
node_scheme_card -->|"reads labels"| node_translations
node_scheme_modal -->|"reads labels"| node_translations
node_navbar -->|"reads labels"| node_translations
node_hero -->|"reads labels"| node_translations
node_chat -->|"plays voice"| node_speech
node_app -->|"plays voice"| node_speech
node_search_matcher -->|"uses types"| node_scheme_types
node_schemes -->|"uses types"| node_scheme_types
node_doc_verifier -->|"uses types"| node_scheme_types
node_chat -->|"reads labels"| node_translations
node_app -->|"reads labels"| node_translations

click node_app "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/App.tsx"
click node_navbar "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/Navbar.tsx"
click node_hero "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/HeroSearch.tsx"
click node_category "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/CategoryBar.tsx"
click node_scheme_card "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/SchemeCard.tsx"
click node_scheme_modal "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/SchemeModal.tsx"
click node_schemes "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/data/schemes.ts"
click node_doc_verifier "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/DocVerifierModal.tsx"
click node_chat "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/ChatDrawer.tsx"
click node_language_modal "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/LanguageModal.tsx"
click node_footer "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/Footer.tsx"
click node_search_matcher "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/utils/searchMatcher.ts"
click node_speech "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/utils/speech.ts"
click node_translations "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/data/i18n.ts"
click node_scheme_types "https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/types/scheme.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_navbar,node_hero,node_footer toneBlue
class node_category,node_scheme_card,node_scheme_modal,node_schemes toneAmber
class node_doc_verifier,node_chat,node_language_modal toneMint
class node_search_matcher,node_speech,node_translations,node_scheme_types toneRose
class node_citizen_user toneIndigo
```

## Components

### Application

- [App Orchestrator](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/App.tsx): `src/App.tsx`
- [Navigation](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`
- [Search Interface](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/HeroSearch.tsx): `src/components/HeroSearch.tsx`
- [Portal Footer](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`

### Scheme Catalog

- [Category Filters](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/CategoryBar.tsx): `src/components/CategoryBar.tsx`
- [Scheme Cards](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/SchemeCard.tsx): `src/components/SchemeCard.tsx`
- [Scheme Details](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/SchemeModal.tsx): `src/components/SchemeModal.tsx`
- [Scheme Listings](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/data/schemes.ts): `src/data/schemes.ts`

### Citizen Tools

- [Eligibility Verifier](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/DocVerifierModal.tsx): `src/components/DocVerifierModal.tsx`
- [AI Assistant](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/ChatDrawer.tsx): `src/components/ChatDrawer.tsx`
- [Language Selector](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/components/LanguageModal.tsx): `src/components/LanguageModal.tsx`

### Shared Services

- [Search Ranking](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/utils/searchMatcher.ts): `src/utils/searchMatcher.ts`
- [Speech Utilities](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/utils/speech.ts): `src/utils/speech.ts`
- [Translations](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/data/i18n.ts): `src/data/i18n.ts`
- [Scheme Types](https://github.com/samyukthagovardhan-prog/nammabridge/blob/main/src/types/scheme.ts): `src/types/scheme.ts`

### Other components

- **Citizen**

## Connections

- Citizen → App Orchestrator: uses (evidence: `src/App.tsx`)
- App Orchestrator → Navigation: renders (evidence: `src/App.tsx`)
- App Orchestrator → Search Interface: renders (evidence: `src/App.tsx`)
- App Orchestrator → Category Filters: renders (evidence: `src/App.tsx`)
- App Orchestrator → Scheme Cards: renders (evidence: `src/App.tsx`)
- App Orchestrator → Scheme Details: renders (evidence: `src/App.tsx`)
- App Orchestrator → Eligibility Verifier: renders (evidence: `src/App.tsx`)
- App Orchestrator → AI Assistant: renders (evidence: `src/App.tsx`)
- App Orchestrator → Language Selector: renders (evidence: `src/App.tsx`)
- App Orchestrator → Portal Footer: renders (evidence: `src/App.tsx`)
- App Orchestrator → Search Ranking: ranks listings (evidence: `src/App.tsx`)
- App Orchestrator → Scheme Listings: filters listings (evidence: `src/App.tsx`)
- Category Filters → Scheme Listings: reads categories (evidence: `src/components/CategoryBar.tsx`)
- Scheme Cards → Translations: reads labels (evidence: `src/components/SchemeCard.tsx`)
- Scheme Details → Translations: reads labels (evidence: `src/components/SchemeModal.tsx`)
- Navigation → Translations: reads labels (evidence: `src/components/Navbar.tsx`)
- Search Interface → Translations: reads labels (evidence: `src/components/HeroSearch.tsx`)
- AI Assistant → Speech Utilities: plays voice (evidence: `src/components/ChatDrawer.tsx`)
- App Orchestrator → Speech Utilities: plays voice (evidence: `src/App.tsx`)
- Search Ranking → Scheme Types: uses types (evidence: `src/utils/searchMatcher.ts`)
- Scheme Listings → Scheme Types: uses types (evidence: `src/data/schemes.ts`)
- Eligibility Verifier → Scheme Types: uses types (evidence: `src/components/DocVerifierModal.tsx`)
- AI Assistant → Translations: reads labels (evidence: `src/components/ChatDrawer.tsx`)
- App Orchestrator → Translations: reads labels (evidence: `src/App.tsx`)
