# sindhujakumari211/ai-notes-generator architecture

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

- Interactive diagram: https://gitdiagram.com/sindhujakumari211/ai-notes-generator
- Repository: https://github.com/sindhujakumari211/ai-notes-generator

## Overview

This is a Streamlit application that turns a YouTube lecture into transcript-grounded study materials. The primary workflow starts with a URL, retrieves metadata and audio, transcribes locally, then cleans and chunks the transcript before generating notes and assessments through an LLM pipeline. Results are displayed, analyzed, exported, and optionally saved for later reopening. The README documents additional outputs and capabilities beyond the sampled source; those are represented where their owning modules are clear, while uncertain internal wiring is omitted.

Main entry points: [`pipeline.py`](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/pipeline.py) (Workflow orchestrator), [`app.py`](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/app.py) (Main app), [`llm/generator.py`](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/llm/generator.py) (LLM generation), [`llm/summarizer.py`](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/llm/summarizer.py) (LLM summarization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_app["Main app<br/>[app.py]"]
  node_history_page["History page<br/>[1_History.py]"]
  node_settings_page["Settings page<br/>[2_Settings.py]"]
  node_views["Result views<br/>[components.py]"]
end

subgraph group_ingest["Lecture ingestion"]
  node_youtube["YouTube access<br/>[youtube.py]"]
  node_transcript["Transcription<br/>[transcript.py]"]
  node_cleaner["Transcript cleaning<br/>[cleaner.py]"]
  node_chunking["Transcript chunking<br/>[chunking.py]"]
end

subgraph group_generation["Content generation"]
  node_pipeline["Workflow orchestrator<br/>[pipeline.py]"]
  node_prompts["Six-stage prompts<br/>[prompts.py]"]
  node_llm_generator["LLM generation<br/>[generator.py]"]
  node_llm_summarizer["LLM summarization<br/>[summarizer.py]"]
  node_llm_client["Provider client<br/>[client.py]"]
end

subgraph group_results["Results and persistence"]
  node_schemas["Result schemas<br/>[schemas.py]"]
  node_analytics["Lecture analytics<br/>[analytics.py]"]
  node_markdown["Markdown rendering<br/>[markdown.py]"]
  node_exporters["Document exports<br/>[exporters.py]"]
  node_database[("Run history<br/>[database.py]")]
  node_history["Saved runs"]
end

node_user(("Learner"))
node_provider{{"LLM provider"}}

node_user -->|"submits URL"| node_app
node_app -->|"starts run"| node_pipeline
node_pipeline -->|"fetches video"| node_youtube
node_pipeline -->|"transcribes audio"| node_transcript
node_pipeline -->|"cleans transcript"| node_cleaner
node_pipeline -->|"chunks transcript"| node_chunking
node_pipeline -->|"generates materials"| node_llm_generator
node_pipeline -->|"summarizes chunks"| node_llm_summarizer
node_llm_generator -->|"builds prompts"| node_prompts
node_llm_summarizer -->|"builds prompts"| node_prompts
node_llm_generator -->|"requests completion"| node_llm_client
node_llm_summarizer -->|"requests completion"| node_llm_client
node_llm_client -->|"sends requests"| node_provider
node_pipeline -->|"assembles results"| node_schemas
node_pipeline -->|"builds metrics"| node_analytics
node_pipeline -->|"renders document"| node_markdown
node_pipeline -->|"saves run"| node_database
node_app -->|"renders results"| node_views
node_views -->|"offers downloads"| node_exporters
node_user -->|"browses runs"| node_history_page
node_history_page -->|"loads or deletes"| node_database
node_database -->|"stores records"| node_history
node_settings_page -->|"checks FFmpeg"| node_youtube

click node_app "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/app.py"
click node_history_page "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/pages/1_History.py"
click node_settings_page "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/pages/2_Settings.py"
click node_views "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/ui/components.py"
click node_youtube "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/youtube.py"
click node_transcript "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/transcript.py"
click node_cleaner "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/cleaner.py"
click node_chunking "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/chunking.py"
click node_pipeline "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/pipeline.py"
click node_prompts "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/llm/prompts.py"
click node_llm_generator "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/llm/generator.py"
click node_llm_summarizer "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/llm/summarizer.py"
click node_llm_client "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/llm/client.py"
click node_schemas "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/models/schemas.py"
click node_analytics "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/analytics.py"
click node_markdown "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/markdown.py"
click node_exporters "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/exporters.py"
click node_database "https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/database.py"

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_history_page,node_settings_page,node_views toneBlue
class node_youtube,node_transcript,node_cleaner,node_chunking toneAmber
class node_pipeline,node_prompts,node_llm_generator,node_llm_summarizer,node_llm_client toneMint
class node_schemas,node_analytics,node_markdown,node_exporters,node_database,node_history toneRose
class node_user,node_provider toneIndigo
```

## Components

### User interface

- [Main app](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/app.py): `app.py`
- [History page](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/pages/1_History.py): `pages/1_History.py`
- [Settings page](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/pages/2_Settings.py): `pages/2_Settings.py`
- [Result views](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/ui/components.py): `ui/components.py`

### Lecture ingestion

- [YouTube access](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/youtube.py): `utils/youtube.py`
- [Transcription](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/transcript.py): `utils/transcript.py`
- [Transcript cleaning](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/cleaner.py): `utils/cleaner.py`
- [Transcript chunking](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/chunking.py): `utils/chunking.py`

### Content generation

- [Workflow orchestrator](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/pipeline.py): `pipeline.py`
- [Six-stage prompts](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/llm/prompts.py): `llm/prompts.py`
- [LLM generation](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/llm/generator.py): `llm/generator.py`
- [LLM summarization](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/llm/summarizer.py): `llm/summarizer.py`
- [Provider client](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/llm/client.py): `llm/client.py`

### Results and persistence

- [Result schemas](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/models/schemas.py): `models/schemas.py`
- [Lecture analytics](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/analytics.py): `utils/analytics.py`
- [Markdown rendering](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/markdown.py): `utils/markdown.py`
- [Document exports](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/exporters.py): `utils/exporters.py`
- [Run history](https://github.com/sindhujakumari211/ai-notes-generator/blob/main/utils/database.py): `utils/database.py`
- **Saved runs**

### Other components

- **Learner**
- **LLM provider**

## Connections

- Learner → Main app: submits URL
- Main app → Workflow orchestrator: starts run
- Workflow orchestrator → YouTube access: fetches video
- Workflow orchestrator → Transcription: transcribes audio
- Workflow orchestrator → Transcript cleaning: cleans transcript
- Workflow orchestrator → Transcript chunking: chunks transcript
- Workflow orchestrator → LLM generation: generates materials
- Workflow orchestrator → LLM summarization: summarizes chunks
- LLM generation → Six-stage prompts: builds prompts
- LLM summarization → Six-stage prompts: builds prompts
- LLM generation → Provider client: requests completion
- LLM summarization → Provider client: requests completion
- Provider client → LLM provider: sends requests
- Workflow orchestrator → Result schemas: assembles results
- Workflow orchestrator → Lecture analytics: builds metrics
- Workflow orchestrator → Markdown rendering: renders document
- Workflow orchestrator → Run history: saves run
- Main app → Result views: renders results
- Result views → Document exports: offers downloads
- Learner → History page: browses runs
- History page → Run history: loads or deletes
- Run history → Saved runs: stores records
- Settings page → YouTube access: checks FFmpeg
