# rajeshreddy-1012/maatrivaani architecture

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

- Interactive diagram: https://gitdiagram.com/rajeshreddy-1012/maatrivaani
- Repository: https://github.com/rajeshreddy-1012/maatrivaani

## Overview

MaatriVaani is a bilingual classroom-learning app for teachers and students, centered on navigating from role-based entry to learning tools and classroom language support. The visible workflow begins at the React app, restores profile and preferences from browser storage, then selects a role-appropriate dashboard and feature screen. Classroom translation, speech, lessons, flashcards, quizzes, progress, and worksheet generation are distinct capabilities. Source excerpts confirm worksheet generation’s API call and server-side dictionary/Gemini use; wiring for several other screens is not shown, so those links are omitted.

Main entry points: [`src/App.tsx`](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/App.tsx) (App Router), [`src/components/StudentDashboard.tsx`](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/StudentDashboard.tsx) (Student Dashboard), [`src/components/TeacherDashboard.tsx`](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/TeacherDashboard.tsx) (Teacher Dashboard), [`server.ts`](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/server.ts) (App API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Roles"]
  node_app_entry["React Entry<br/>[main.tsx]"]
  node_app_router["App Router<br/>[App.tsx]"]
  node_login["Role Login<br/>[LoginScreen.tsx]"]
  node_teacher_dashboard["Teacher Dashboard"]
  node_student_dashboard["Student Dashboard"]
  node_navigation["Navigation Menu<br/>[SideMenu.tsx]"]
end

subgraph group_learning["Learning Tools"]
  node_lessons["Lessons<br/>[LessonsModule.tsx]"]
  node_flashcards["Flashcards"]
  node_quiz["Quiz Assessment<br/>[QuizAssessment.tsx]"]
  node_outcomes["Learning Outcomes"]
  node_progress["Student Progress"]
  node_worksheets["Worksheet Generator"]
  node_content_data["Learning Content<br/>[mockData.ts]"]
end

subgraph group_language["Language Support"]
  node_live_voice["Live Voice"]
  node_translator["Text Translator<br/>[TextTranslator.tsx]"]
  node_dictionary["Tribal Dictionary"]
  node_audio["Audio Service<br/>[audioService.ts]"]
end

subgraph group_services["Runtime Services"]
  node_storage["Browser Storage<br/>[storageService.ts]"]
  node_api_server["App API<br/>[server.ts]"]
  node_gemini["Gemini API"]
end

node_teacher(("Teacher / Student"))

node_teacher -->|"opens"| node_app_entry
node_app_entry -->|"renders"| node_app_router
node_app_router -->|"loads profile"| node_storage
node_app_router -->|"shows when signed out"| node_login
node_login -->|"reports login"| node_app_router
node_app_router -->|"selects teacher view"| node_teacher_dashboard
node_app_router -->|"selects student view"| node_student_dashboard
node_app_router -->|"renders navigation"| node_navigation
node_app_router -->|"saves profile and preferences"| node_storage
node_teacher_dashboard --> node_lessons
node_teacher_dashboard --> node_worksheets
node_student_dashboard --> node_lessons
node_student_dashboard --> node_flashcards
node_student_dashboard --> node_quiz
node_student_dashboard --> node_progress
node_student_dashboard --> node_outcomes
node_app_router -->|"routes to screen"| node_live_voice
node_app_router -->|"routes to screen"| node_translator
node_worksheets -->|"requests worksheet"| node_api_server
node_api_server -.->|"generates content"| node_gemini
node_api_server -->|"checks phrases"| node_dictionary
node_live_voice -->|"matches phrases"| node_dictionary
node_lessons --> node_content_data
node_flashcards --> node_content_data
node_outcomes --> node_content_data

click node_app_entry "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/main.tsx"
click node_app_router "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/App.tsx"
click node_login "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/LoginScreen.tsx"
click node_teacher_dashboard "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/TeacherDashboard.tsx"
click node_student_dashboard "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/StudentDashboard.tsx"
click node_navigation "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/SideMenu.tsx"
click node_lessons "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/LessonsModule.tsx"
click node_flashcards "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/FlashcardsModule.tsx"
click node_quiz "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/QuizAssessment.tsx"
click node_outcomes "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/LearningOutcomes.tsx"
click node_progress "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/StudentProgress.tsx"
click node_worksheets "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/WorksheetGenerator.tsx"
click node_live_voice "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/LiveClassroomVoice.tsx"
click node_translator "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/TextTranslator.tsx"
click node_dictionary "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/data/tribalDictionary.ts"
click node_audio "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/services/audioService.ts"
click node_content_data "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/data/mockData.ts"
click node_storage "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/services/storageService.ts"
click node_api_server "https://github.com/rajeshreddy-1012/maatrivaani/blob/main/server.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_entry,node_app_router,node_login,node_teacher_dashboard,node_student_dashboard,node_navigation toneBlue
class node_lessons,node_flashcards,node_quiz,node_outcomes,node_progress,node_worksheets,node_content_data toneAmber
class node_live_voice,node_translator,node_dictionary,node_audio toneMint
class node_storage,node_api_server,node_gemini toneRose
class node_teacher toneIndigo
```

## Components

### App and Roles

- [React Entry](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/main.tsx): `src/main.tsx`
- [App Router](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/App.tsx): `src/App.tsx`
- [Role Login](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/LoginScreen.tsx): `src/components/LoginScreen.tsx`
- [Teacher Dashboard](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/TeacherDashboard.tsx): `src/components/TeacherDashboard.tsx`
- [Student Dashboard](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/StudentDashboard.tsx): `src/components/StudentDashboard.tsx`
- [Navigation Menu](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/SideMenu.tsx): `src/components/SideMenu.tsx`

### Learning Tools

- [Lessons](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/LessonsModule.tsx): `src/components/LessonsModule.tsx`
- [Flashcards](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/FlashcardsModule.tsx): `src/components/FlashcardsModule.tsx`
- [Quiz Assessment](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/QuizAssessment.tsx): `src/components/QuizAssessment.tsx`
- [Learning Outcomes](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/LearningOutcomes.tsx): `src/components/LearningOutcomes.tsx`
- [Student Progress](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/StudentProgress.tsx): `src/components/StudentProgress.tsx`
- [Worksheet Generator](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/WorksheetGenerator.tsx): `src/components/WorksheetGenerator.tsx`
- [Learning Content](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/data/mockData.ts): `src/data/mockData.ts`

### Language Support

- [Live Voice](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/LiveClassroomVoice.tsx): `src/components/LiveClassroomVoice.tsx`
- [Text Translator](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/components/TextTranslator.tsx): `src/components/TextTranslator.tsx`
- [Tribal Dictionary](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/data/tribalDictionary.ts): `src/data/tribalDictionary.ts`
- [Audio Service](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/services/audioService.ts): `src/services/audioService.ts`

### Runtime Services

- [Browser Storage](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/src/services/storageService.ts): `src/services/storageService.ts`
- [App API](https://github.com/rajeshreddy-1012/maatrivaani/blob/main/server.ts): `server.ts`
- **Gemini API**

### Other components

- **Teacher / Student**

## Connections

- Teacher / Student → React Entry: opens
- React Entry → App Router: renders
- App Router → Browser Storage: loads profile
- App Router → Role Login: shows when signed out
- Role Login → App Router: reports login
- App Router → Teacher Dashboard: selects teacher view
- App Router → Student Dashboard: selects student view
- App Router → Navigation Menu: renders navigation
- App Router → Browser Storage: saves profile and preferences
- Teacher Dashboard → Lessons
- Teacher Dashboard → Worksheet Generator
- Student Dashboard → Lessons
- Student Dashboard → Flashcards
- Student Dashboard → Quiz Assessment
- Student Dashboard → Student Progress
- Student Dashboard → Learning Outcomes
- App Router → Live Voice: routes to screen
- App Router → Text Translator: routes to screen
- Worksheet Generator → App API: requests worksheet
- App API → Gemini API: generates content
- App API → Tribal Dictionary: checks phrases
- Live Voice → Tribal Dictionary: matches phrases
- Lessons → Learning Content
- Flashcards → Learning Content
- Learning Outcomes → Learning Content
