# arthuryangx/nano-notebooklm architecture

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

- Interactive diagram: https://gitdiagram.com/arthuryangx/nano-notebooklm
- Repository: https://github.com/arthuryangx/nano-notebooklm

## Overview

nano-NotebookLM is a self-hosted course-study assistant. Its main workflow is course upload and extraction, indexing and knowledge-graph creation, then chat retrieval with citations; the product also provides notes, quizzes, exam preparation, and an editable graph. The graph follows documented capabilities and SOURCE INDEX references; several frontend and backend subsystems were not sampled, so their internal call paths are omitted.

Main entry points: [`api/server.py`](https://github.com/arthuryangx/nano-notebooklm/blob/main/api/server.py) (HTTP API), [`frontend/app.jsx`](https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/app.jsx) (Study interface), [`nano_notebooklm/orchestrator/engine.py`](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/orchestrator/engine.py) (Skill orchestrator), [`nano_notebooklm/ai/router.py`](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/ai/router.py) (Model routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Study experience"]
  node_frontend["Study interface<br/>[app.jsx]"]
  node_chat_ui["Chat and reader<br/>[assistant.jsx]"]
  node_notes_ui["Notes<br/>[notes.jsx]"]
  node_exam_ui["Exam prep<br/>[exam-prep.jsx]"]
  node_mindmap_ui["Mind map<br/>[mindmap.jsx]"]
  node_settings_ui["Provider settings<br/>[settings.jsx]"]
end

subgraph group_service["API and orchestration"]
  node_api["HTTP API<br/>[server.py]"]
  node_engine["Skill orchestrator<br/>[engine.py]"]
  node_intent["Intent routing<br/>[router_intent.py]"]
end

subgraph group_knowledge["Course knowledge"]
  node_kb[("Course ingestion and store<br/>[store.py]")]
  node_extract["Document extraction"]
  node_chunks["Chunking<br/>[chunker.py]"]
  node_hybrid["Hybrid retrieval<br/>[hybrid_search.py]"]
  node_graph_search["Graph retrieval<br/>[graph_search.py]"]
  node_kg_extract["Graph extraction<br/>[extractor.py]"]
  node_kg[("Knowledge graph<br/>[graph.py]")]
end

subgraph group_learning["Learning tools"]
  node_qa["Cited Q&amp;A<br/>[qa_skill.py]"]
  node_notes["LaTeX notes"]
  node_quiz["Quiz generation<br/>[quiz_generator.py]"]
  node_exam["Exam preparation<br/>[exam_prep.py]"]
  node_mastery["Mastery tracking<br/>[mastery_tracker.py]"]
end

subgraph group_models["Model providers"]
  node_model_router["Model routing<br/>[router.py]"]
  node_backend["LLM backends<br/>[base.py]"]
end

node_student(("Student"))

node_student -->|"uses"| node_frontend
node_frontend -->|"sends requests"| node_api
node_api -->|"routes skills"| node_engine
node_api -->|"manages courses"| node_kb
node_api -->|"configures providers"| node_model_router
node_frontend -->|"offers chat"| node_chat_ui
node_frontend -->|"offers notes"| node_notes_ui
node_frontend -->|"offers exam prep"| node_exam_ui
node_frontend -->|"offers graph editing"| node_mindmap_ui
node_frontend -->|"manages providers"| node_settings_ui
node_chat_ui -->|"submits questions"| node_api
node_notes_ui -->|"requests notes"| node_api
node_exam_ui -->|"requests practice"| node_api
node_mindmap_ui -->|"edits graph"| node_api
node_settings_ui -->|"updates providers"| node_api
node_api -->|"extracts uploads"| node_extract
node_kb -->|"extracts documents"| node_extract
node_kb -->|"chunks content"| node_chunks
node_kb -->|"builds retrieval index"| node_hybrid
node_kg_extract -->|"requests extraction"| node_model_router
node_kg_extract -->|"creates concepts"| node_kg
node_engine -->|"dispatches questions"| node_qa
node_engine -->|"dispatches notes"| node_notes
node_engine -->|"dispatches quizzes"| node_quiz
node_engine -->|"dispatches exam prep"| node_exam
node_engine -->|"dispatches tracking"| node_mastery
node_qa -->|"classifies queries"| node_intent
node_qa -->|"searches sources"| node_kb
node_qa -->|"retrieves graph context"| node_graph_search
node_qa -->|"generates answers"| node_model_router
node_notes -->|"generates notes"| node_model_router
node_exam -->|"generates practice"| node_model_router
node_model_router -->|"selects provider"| node_backend
node_hybrid -.->|"returns citations"| node_student

click node_frontend "https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/app.jsx"
click node_chat_ui "https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/assistant.jsx"
click node_notes_ui "https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/notes.jsx"
click node_exam_ui "https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/exam-prep.jsx"
click node_mindmap_ui "https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/mindmap.jsx"
click node_settings_ui "https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/settings.jsx"
click node_api "https://github.com/arthuryangx/nano-notebooklm/blob/main/api/server.py"
click node_engine "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/orchestrator/engine.py"
click node_intent "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/orchestrator/router_intent.py"
click node_kb "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/kb/store.py"
click node_extract "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/ingest/extractors_mineru.py"
click node_chunks "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/ingest/chunker.py"
click node_hybrid "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/kb/hybrid_search.py"
click node_graph_search "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/kb/graph_search.py"
click node_kg_extract "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/kg/extractor.py"
click node_kg "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/kg/graph.py"
click node_qa "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/skills/qa_skill.py"
click node_notes "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/skills/notes_full_course.py"
click node_quiz "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/skills/quiz_generator.py"
click node_exam "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/skills/exam_prep.py"
click node_mastery "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/skills/mastery_tracker.py"
click node_model_router "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/ai/router.py"
click node_backend "https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/ai/base.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_frontend,node_chat_ui,node_notes_ui,node_exam_ui,node_mindmap_ui,node_settings_ui toneBlue
class node_api,node_engine,node_intent toneAmber
class node_kb,node_extract,node_chunks,node_hybrid,node_graph_search,node_kg_extract,node_kg toneMint
class node_qa,node_notes,node_quiz,node_exam,node_mastery toneRose
class node_model_router,node_backend,node_student toneIndigo
```

## Components

### Study experience

- [Study interface](https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/app.jsx): `frontend/app.jsx`
- [Chat and reader](https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/assistant.jsx): `frontend/assistant.jsx`
- [Notes](https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/notes.jsx): `frontend/notes.jsx`
- [Exam prep](https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/exam-prep.jsx): `frontend/exam-prep.jsx`
- [Mind map](https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/mindmap.jsx): `frontend/mindmap.jsx`
- [Provider settings](https://github.com/arthuryangx/nano-notebooklm/blob/main/frontend/settings.jsx): `frontend/settings.jsx`

### API and orchestration

- [HTTP API](https://github.com/arthuryangx/nano-notebooklm/blob/main/api/server.py): `api/server.py`
- [Skill orchestrator](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/orchestrator/engine.py): `nano_notebooklm/orchestrator/engine.py`
- [Intent routing](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/orchestrator/router_intent.py): `nano_notebooklm/orchestrator/router_intent.py`

### Course knowledge

- [Course ingestion and store](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/kb/store.py): `nano_notebooklm/kb/store.py`
- [Document extraction](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/ingest/extractors_mineru.py): `nano_notebooklm/ingest/extractors_mineru.py`
- [Chunking](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/ingest/chunker.py): `nano_notebooklm/ingest/chunker.py`
- [Hybrid retrieval](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/kb/hybrid_search.py): `nano_notebooklm/kb/hybrid_search.py`
- [Graph retrieval](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/kb/graph_search.py): `nano_notebooklm/kb/graph_search.py`
- [Graph extraction](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/kg/extractor.py): `nano_notebooklm/kg/extractor.py`
- [Knowledge graph](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/kg/graph.py): `nano_notebooklm/kg/graph.py`

### Learning tools

- [Cited Q&A](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/skills/qa_skill.py): `nano_notebooklm/skills/qa_skill.py`
- [LaTeX notes](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/skills/notes_full_course.py): `nano_notebooklm/skills/notes_full_course.py`
- [Quiz generation](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/skills/quiz_generator.py): `nano_notebooklm/skills/quiz_generator.py`
- [Exam preparation](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/skills/exam_prep.py): `nano_notebooklm/skills/exam_prep.py`
- [Mastery tracking](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/skills/mastery_tracker.py): `nano_notebooklm/skills/mastery_tracker.py`

### Model providers

- [Model routing](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/ai/router.py): `nano_notebooklm/ai/router.py`
- [LLM backends](https://github.com/arthuryangx/nano-notebooklm/blob/main/nano_notebooklm/ai/base.py): `nano_notebooklm/ai/base.py`

### Other components

- **Student**

## Connections

- Student → Study interface: uses (evidence: `README.md`)
- Study interface → HTTP API: sends requests (evidence: `README.md`)
- HTTP API → Skill orchestrator: routes skills (evidence: `api/server.py`)
- HTTP API → Course ingestion and store: manages courses (evidence: `api/server.py`)
- HTTP API → Model routing: configures providers (evidence: `api/server.py`)
- Study interface → Chat and reader: offers chat (evidence: `README.md`)
- Study interface → Notes: offers notes (evidence: `README.md`)
- Study interface → Exam prep: offers exam prep (evidence: `README.md`)
- Study interface → Mind map: offers graph editing (evidence: `README.md`)
- Study interface → Provider settings: manages providers (evidence: `README.md`)
- Chat and reader → HTTP API: submits questions (evidence: `README.md`)
- Notes → HTTP API: requests notes (evidence: `README.md`)
- Exam prep → HTTP API: requests practice (evidence: `README.md`)
- Mind map → HTTP API: edits graph (evidence: `README.md`)
- Provider settings → HTTP API: updates providers (evidence: `README.md`)
- HTTP API → Document extraction: extracts uploads (evidence: `README.md`)
- Course ingestion and store → Document extraction: extracts documents (evidence: `nano_notebooklm/kb/store.py`)
- Course ingestion and store → Chunking: chunks content (evidence: `nano_notebooklm/kb/store.py`)
- Course ingestion and store → Hybrid retrieval: builds retrieval index (evidence: `nano_notebooklm/kb/store.py`)
- Graph extraction → Model routing: requests extraction (evidence: `nano_notebooklm/kg/extractor.py`)
- Graph extraction → Knowledge graph: creates concepts (evidence: `nano_notebooklm/kg/extractor.py`)
- Skill orchestrator → Cited Q&A: dispatches questions (evidence: `nano_notebooklm/orchestrator/engine.py`)
- Skill orchestrator → LaTeX notes: dispatches notes (evidence: `nano_notebooklm/orchestrator/engine.py`)
- Skill orchestrator → Quiz generation: dispatches quizzes (evidence: `nano_notebooklm/orchestrator/engine.py`)
- Skill orchestrator → Exam preparation: dispatches exam prep (evidence: `nano_notebooklm/orchestrator/engine.py`)
- Skill orchestrator → Mastery tracking: dispatches tracking (evidence: `nano_notebooklm/orchestrator/engine.py`)
- Cited Q&A → Intent routing: classifies queries (evidence: `nano_notebooklm/skills/qa_skill.py`)
- Cited Q&A → Course ingestion and store: searches sources (evidence: `nano_notebooklm/skills/qa_skill.py`)
- Cited Q&A → Graph retrieval: retrieves graph context (evidence: `nano_notebooklm/skills/qa_skill.py`)
- Cited Q&A → Model routing: generates answers (evidence: `nano_notebooklm/skills/qa_skill.py`)
- LaTeX notes → Model routing: generates notes (evidence: `nano_notebooklm/skills/notes_full_course.py`)
- Exam preparation → Model routing: generates practice (evidence: `nano_notebooklm/skills/exam_prep.py`)
- Model routing → LLM backends: selects provider (evidence: `nano_notebooklm/ai/router.py`)
- Hybrid retrieval → Student: returns citations (evidence: `README.md`)
