# sidsahoo1203/linguaverse-ai architecture

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

- Interactive diagram: https://gitdiagram.com/sidsahoo1203/linguaverse-ai
- Repository: https://github.com/sidsahoo1203/linguaverse-ai

## Overview

LinguaVerse AI helps Indian citizens discover government schemes and prepare applications. The main journey is profile entry through onboarding, optional document or voice input, eligibility matching, and a results dashboard. From there, users can browse schemes, inspect visual comparisons, and generate pre-filled forms; separate routes provide voice assistance and scheme comparisons. The graph preserves the documented frontend features and backend OCR/voice API. Several route-to-route and frontend-to-backend connections are documented only broadly or not shown in excerpts, so those links are dashed or omitted.

Main entry points: [`frontend/src/app/onboard/page.tsx`](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/onboard/page.tsx) (Profile Onboarding), [`frontend/src/lib/eligibilityEngine.ts`](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/lib/eligibilityEngine.ts) (Eligibility Matcher), [`frontend/src/app/page.tsx`](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/page.tsx) (Landing Page), [`frontend/src/app/voice/page.tsx`](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/voice/page.tsx) (Voice Assistant)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Scheme Discovery"]
  node_landing["Landing Page<br/>[page.tsx]"]
  node_scheme_catalog["Scheme Catalog<br/>[schemes.ts]"]
  node_scheme_browser["Scheme Browser<br/>[page.tsx]"]
  node_comparisons["Scheme Comparisons<br/>[page.tsx]"]
end

subgraph group_assistance["Input Assistance"]
  node_onboarding["Profile Onboarding<br/>[page.tsx]"]
  node_voice_page["Voice Assistant<br/>[page.tsx]"]
end

subgraph group_results["Eligibility and Results"]
  node_profile_matcher["Eligibility Matcher"]
  node_dashboard["Eligibility Dashboard<br/>[page.tsx]"]
  node_visuals["Visual Insights<br/>[page.tsx]"]
end

subgraph group_application["Application Tools"]
  node_form_friend["FormFriend PDF<br/>[page.tsx]"]
end

subgraph group_backend["Backend API"]
  node_ocr_api["Document OCR<br/>[main.py]"]
  node_voice_api["Voice API<br/>[main.py]"]
  node_backend_api["Scheme API<br/>[main.py]"]
  node_scheme_data["Scheme Dataset<br/>[schemes.json]"]
end

node_citizen(("Citizen"))

node_citizen -->|"opens platform"| node_landing
node_landing -->|"starts profile"| node_onboarding
node_citizen -->|"provides profile"| node_onboarding
node_onboarding -.->|"uploads document"| node_ocr_api
node_citizen -->|"speaks to assistant"| node_voice_page
node_voice_page -.->|"requests voice service"| node_voice_api
node_profile_matcher -->|"reads scheme rules"| node_scheme_catalog
node_onboarding -.->|"submits profile"| node_profile_matcher
node_profile_matcher -.->|"produces matches"| node_dashboard
node_citizen -->|"browses schemes"| node_scheme_browser
node_citizen -->|"views comparisons"| node_comparisons
node_citizen -->|"views charts"| node_visuals
node_citizen -->|"generates application PDF"| node_form_friend
node_dashboard -->|"continues to forms"| node_form_friend

click node_landing "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/page.tsx"
click node_scheme_catalog "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/lib/schemes.ts"
click node_scheme_browser "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/schemes/page.tsx"
click node_comparisons "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/demo-comparisons/page.tsx"
click node_onboarding "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/onboard/page.tsx"
click node_ocr_api "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/backend/main.py"
click node_voice_page "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/voice/page.tsx"
click node_voice_api "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/backend/main.py"
click node_profile_matcher "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/lib/eligibilityEngine.ts"
click node_backend_api "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/backend/main.py"
click node_dashboard "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/dashboard/page.tsx"
click node_visuals "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/visual/page.tsx"
click node_form_friend "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/form/page.tsx"
click node_scheme_data "https://github.com/sidsahoo1203/linguaverse-ai/blob/main/backend/data/schemes.json"

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_landing,node_scheme_catalog,node_scheme_browser,node_comparisons toneBlue
class node_onboarding,node_voice_page toneAmber
class node_profile_matcher,node_dashboard,node_visuals toneMint
class node_form_friend toneRose
class node_ocr_api,node_voice_api,node_backend_api,node_scheme_data,node_citizen toneIndigo
```

## Components

### Scheme Discovery

- [Landing Page](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Scheme Catalog](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/lib/schemes.ts): `frontend/src/lib/schemes.ts`
- [Scheme Browser](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/schemes/page.tsx): `frontend/src/app/schemes/page.tsx`
- [Scheme Comparisons](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/demo-comparisons/page.tsx): `frontend/src/app/demo-comparisons/page.tsx`

### Input Assistance

- [Profile Onboarding](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/onboard/page.tsx): `frontend/src/app/onboard/page.tsx`
- [Voice Assistant](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/voice/page.tsx): `frontend/src/app/voice/page.tsx`

### Eligibility and Results

- [Eligibility Matcher](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/lib/eligibilityEngine.ts): `frontend/src/lib/eligibilityEngine.ts`
- [Eligibility Dashboard](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/dashboard/page.tsx): `frontend/src/app/dashboard/page.tsx`
- [Visual Insights](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/visual/page.tsx): `frontend/src/app/visual/page.tsx`

### Application Tools

- [FormFriend PDF](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/frontend/src/app/form/page.tsx): `frontend/src/app/form/page.tsx`

### Backend API

- [Document OCR](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/backend/main.py): `backend/main.py`
- [Voice API](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/backend/main.py): `backend/main.py`
- [Scheme API](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/backend/main.py): `backend/main.py`
- [Scheme Dataset](https://github.com/sidsahoo1203/linguaverse-ai/blob/main/backend/data/schemes.json): `backend/data/schemes.json`

### Other components

- **Citizen**

## Connections

- Citizen → Landing Page: opens platform (evidence: `README.md`)
- Landing Page → Profile Onboarding: starts profile (evidence: `frontend/src/app/page.tsx`)
- Citizen → Profile Onboarding: provides profile (evidence: `README.md`)
- Profile Onboarding → Document OCR: uploads document
- Citizen → Voice Assistant: speaks to assistant (evidence: `README.md`)
- Voice Assistant → Voice API: requests voice service
- Eligibility Matcher → Scheme Catalog: reads scheme rules (evidence: `frontend/src/lib/eligibilityEngine.ts`)
- Profile Onboarding → Eligibility Matcher: submits profile
- Eligibility Matcher → Eligibility Dashboard: produces matches
- Citizen → Scheme Browser: browses schemes (evidence: `README.md`)
- Citizen → Scheme Comparisons: views comparisons (evidence: `README.md`)
- Citizen → Visual Insights: views charts (evidence: `README.md`)
- Citizen → FormFriend PDF: generates application PDF (evidence: `README.md`)
- Eligibility Dashboard → FormFriend PDF: continues to forms (evidence: `frontend/src/app/form/page.tsx`)
