# nirajk007/ai_study_analyzer_webapp architecture

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

- Interactive diagram: https://gitdiagram.com/nirajk007/ai_study_analyzer_webapp
- Repository: https://github.com/nirajk007/ai_study_analyzer_webapp

## Overview

AI Study Analyzer is a React study dashboard that turns student notes into review materials, then supports practice, revision, and persistent study history. The main workflow is to enter or upload notes, generate a study guide through the client fallback or optional Gemini-backed server, view the results, and use its quiz and flashcards. Dashboard analytics, sample-note presets, history search and backup, theme persistence, audio, and export are supporting capabilities. Some component wiring is only partially excerpted; uncertain UI links are shown as unverified.

Main entry points: [`src/App.tsx`](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/App.tsx) (App Coordinator), [`src/components/AnalyzerView.tsx`](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/AnalyzerView.tsx) (Notes Analyzer), [`src/components/ResultsView.tsx`](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/ResultsView.tsx) (Study Results), [`src/utils/storage.ts`](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/utils/storage.ts) (Session Storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Study Dashboard"]
  node_app["App Coordinator<br/>[App.tsx]"]
  node_dashboard["Dashboard<br/>[DashboardView.tsx]"]
  node_sidebar["Navigation<br/>[Sidebar.tsx]"]
end

subgraph group_analysis["Notes Analysis"]
  node_analyzer["Notes Analyzer<br/>[AnalyzerView.tsx]"]
  node_client["Client Synthesis<br/>[clientAnalyzer.ts]"]
  node_server["Gemini Proxy<br/>[server.ts]"]
  node_presets["Sample Materials<br/>[sampleData.ts]"]
end

subgraph group_learning["Review Tools"]
  node_results["Study Results<br/>[ResultsView.tsx]"]
  node_quiz["Interactive Quiz<br/>[QuizComponent.tsx]"]
  node_flashcards["Revision Flashcards"]
end

subgraph group_state["History and Persistence"]
  node_history["Study History<br/>[HistoryView.tsx]"]
  node_storage["Session Storage<br/>[storage.ts]"]
  node_types["Study Data Model<br/>[types.ts]"]
end

node_student(("Student"))
node_gemini{{"Google Gemini"}}
node_localstorage[("Browser Storage")]

node_student -->|"uses"| node_app
node_app -.->|"shows"| node_dashboard
node_app -.->|"shows"| node_sidebar
node_app -.->|"routes to"| node_analyzer
node_app -.->|"opens"| node_results
node_app -.->|"opens"| node_history
node_analyzer -->|"generates fallback"| node_client
node_analyzer -.->|"requests analysis"| node_server
node_server -.->|"generates with"| node_gemini
node_analyzer -.->|"loads presets"| node_presets
node_dashboard -.->|"shows samples"| node_presets
node_results -.->|"renders"| node_quiz
node_results -.->|"renders"| node_flashcards
node_app -->|"loads and updates"| node_storage
node_storage -->|"reads and writes"| node_localstorage
node_history -.->|"requests session actions"| node_app
node_storage -->|"seeds sessions"| node_presets

click node_app "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/App.tsx"
click node_dashboard "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/DashboardView.tsx"
click node_sidebar "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/Sidebar.tsx"
click node_analyzer "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/AnalyzerView.tsx"
click node_client "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/utils/clientAnalyzer.ts"
click node_server "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/server.ts"
click node_presets "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/utils/sampleData.ts"
click node_results "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/ResultsView.tsx"
click node_quiz "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/QuizComponent.tsx"
click node_flashcards "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/FlashcardComponent.tsx"
click node_history "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/HistoryView.tsx"
click node_storage "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/utils/storage.ts"
click node_types "https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/types.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_dashboard,node_sidebar toneBlue
class node_analyzer,node_client,node_server,node_presets,node_localstorage toneAmber
class node_results,node_quiz,node_flashcards toneMint
class node_history,node_storage,node_types toneRose
class node_student,node_gemini toneIndigo
```

## Components

### Study Dashboard

- [App Coordinator](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/App.tsx): `src/App.tsx`
- [Dashboard](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/DashboardView.tsx): `src/components/DashboardView.tsx`
- [Navigation](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/Sidebar.tsx): `src/components/Sidebar.tsx`

### Notes Analysis

- [Notes Analyzer](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/AnalyzerView.tsx): `src/components/AnalyzerView.tsx`
- [Client Synthesis](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/utils/clientAnalyzer.ts): `src/utils/clientAnalyzer.ts`
- [Gemini Proxy](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/server.ts): `server.ts`
- [Sample Materials](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/utils/sampleData.ts): `src/utils/sampleData.ts`

### Review Tools

- [Study Results](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/ResultsView.tsx): `src/components/ResultsView.tsx`
- [Interactive Quiz](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/QuizComponent.tsx): `src/components/QuizComponent.tsx`
- [Revision Flashcards](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/FlashcardComponent.tsx): `src/components/FlashcardComponent.tsx`

### History and Persistence

- [Study History](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/components/HistoryView.tsx): `src/components/HistoryView.tsx`
- [Session Storage](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/utils/storage.ts): `src/utils/storage.ts`
- [Study Data Model](https://github.com/nirajk007/ai_study_analyzer_webapp/blob/main/src/types.ts): `src/types.ts`

### Other components

- **Student**
- **Google Gemini**
- **Browser Storage**

## Connections

- Student → App Coordinator: uses (evidence: `README.md`)
- App Coordinator → Dashboard: shows (evidence: `src/App.tsx`)
- App Coordinator → Navigation: shows (evidence: `src/App.tsx`)
- App Coordinator → Notes Analyzer: routes to (evidence: `src/App.tsx`)
- App Coordinator → Study Results: opens (evidence: `src/App.tsx`)
- App Coordinator → Study History: opens (evidence: `src/App.tsx`)
- Notes Analyzer → Client Synthesis: generates fallback (evidence: `src/components/AnalyzerView.tsx`)
- Notes Analyzer → Gemini Proxy: requests analysis (evidence: `README.md`)
- Gemini Proxy → Google Gemini: generates with (evidence: `README.md`)
- Notes Analyzer → Sample Materials: loads presets (evidence: `src/components/AnalyzerView.tsx`)
- Dashboard → Sample Materials: shows samples (evidence: `src/components/DashboardView.tsx`)
- Study Results → Interactive Quiz: renders (evidence: `src/components/ResultsView.tsx`)
- Study Results → Revision Flashcards: renders (evidence: `src/components/ResultsView.tsx`)
- App Coordinator → Session Storage: loads and updates (evidence: `src/App.tsx`)
- Session Storage → Browser Storage: reads and writes (evidence: `src/utils/storage.ts`)
- Study History → App Coordinator: requests session actions (evidence: `src/App.tsx`)
- Session Storage → Sample Materials: seeds sessions (evidence: `src/utils/storage.ts`)
