# samithanayak7/automated-lesson-plan-generator architecture

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

- Interactive diagram: https://gitdiagram.com/samithanayak7/automated-lesson-plan-generator
- Repository: https://github.com/samithanayak7/automated-lesson-plan-generator

## Overview

The product is a Streamlit lesson-planning app: faculty provide course details, a syllabus, matching textbook PDFs, and semester scheduling information; it extracts the syllabus structure, grounds topics in textbook pages, estimates difficulty and hours, allocates hours to targets, and presents and exports a class schedule. The pipeline and scheduling links are supported by the sampled source and README; some UI modules are represented by their paths and documented roles because their source was not sampled.

Main entry points: [`lesson_planner_ui/app.py`](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/app.py) (Page flow), [`lesson_planner_ui/upload.py`](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/upload.py) (File upload), [`lesson_planner_ui/pipeline.py`](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/pipeline.py) (Pipeline coordinator), [`lesson_planner_ui/results.py`](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/results.py) (Plan presentation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Planning interface"]
  node_main["App entry<br/>[Main.py]"]
  node_app["Page flow<br/>[app.py]"]
  node_state["Session state<br/>[state.py]"]
end

subgraph group_inputs["Course inputs"]
  node_course["Course details<br/>[course_info.py]"]
  node_calendar["Calendar setup"]
  node_schedule_config["Schedule settings<br/>[schedule_config.py]"]
  node_uploads["File upload<br/>[upload.py]"]
end

subgraph group_grounding["Syllabus and grounding"]
  node_pd_extract["PDF syllabus extraction<br/>[PD_Extractor.py]"]
  node_text_extract["Text syllabus extraction<br/>[Extractor.py]"]
  node_pipeline["Pipeline coordinator<br/>[pipeline.py]"]
  node_retrieval["Textbook retrieval<br/>[TB_Extractor.py]"]
  node_processor["Difficulty analysis"]
end

subgraph group_planning["Hours and schedule"]
  node_hour_config["Hour targets<br/>[configure.py]"]
  node_data_helpers["Result shaping<br/>[data_helpers.py]"]
  node_schedule_builder["Class scheduling"]
end

subgraph group_presentation["Results and export"]
  node_results["Plan presentation<br/>[results.py]"]
  node_pdf_export["PDF export<br/>[pdf_export.py]"]
end

node_faculty(("Faculty"))
node_syllabus["Syllabus source"]
node_textbooks["Textbook PDFs"]
node_gemini{{"Gemini API"}}

node_faculty -->|"opens app"| node_main
node_main -->|"starts"| node_app
node_app -->|"renders"| node_course
node_app -->|"renders"| node_schedule_config
node_app -->|"renders"| node_uploads
node_app -->|"renders"| node_hour_config
node_app -->|"manages"| node_state
node_faculty -->|"provides"| node_syllabus
node_faculty -->|"provides"| node_textbooks
node_faculty -->|"provides"| node_calendar
node_calendar -->|"derives dates"| node_schedule_config
node_uploads -->|"extracts PDF"| node_pd_extract
node_uploads -->|"extracts text"| node_text_extract
node_syllabus -->|"submitted to"| node_uploads
node_textbooks -->|"submitted to"| node_pipeline
node_app -->|"runs"| node_pipeline
node_pipeline -->|"grounds topics"| node_retrieval
node_pipeline -->|"processes skeleton"| node_processor
node_retrieval -->|"provides excerpts"| node_processor
node_retrieval -->|"reads pages"| node_textbooks
node_processor -->|"requests analysis"| node_gemini
node_gemini -->|"returns estimates"| node_processor
node_faculty -->|"sets targets"| node_hour_config
node_app -->|"parses results"| node_data_helpers
node_app -->|"requests schedule"| node_schedule_builder
node_schedule_config -->|"supplies calendar settings"| node_schedule_builder
node_hour_config -->|"supplies targets"| node_schedule_builder
node_schedule_builder -->|"returns rows"| node_results
node_app -->|"renders results"| node_results
node_results -->|"builds PDF"| node_pdf_export
node_results -->|"presents plan"| node_faculty

click node_main "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/Main.py"
click node_app "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/app.py"
click node_state "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/state.py"
click node_course "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/course_info.py"
click node_calendar "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/calendar_extract.py"
click node_schedule_config "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/schedule_config.py"
click node_uploads "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/upload.py"
click node_pd_extract "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/Extracting/PD_Extractor.py"
click node_text_extract "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/Extracting/Extractor.py"
click node_pipeline "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/pipeline.py"
click node_retrieval "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/Extracting/TB_Extractor.py"
click node_processor "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/syllabus_processor.py"
click node_hour_config "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/configure.py"
click node_data_helpers "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/data_helpers.py"
click node_schedule_builder "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/schedule_builder.py"
click node_results "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/results.py"
click node_pdf_export "https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/pdf_export.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_main,node_app,node_state toneBlue
class node_course,node_calendar,node_schedule_config,node_uploads toneAmber
class node_pd_extract,node_text_extract,node_pipeline,node_retrieval,node_processor,node_gemini toneMint
class node_hour_config,node_data_helpers,node_schedule_builder toneRose
class node_results,node_pdf_export,node_faculty,node_syllabus,node_textbooks toneIndigo
```

## Components

### Planning interface

- [App entry](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/Main.py): `Main.py`
- [Page flow](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/app.py): `lesson_planner_ui/app.py`
- [Session state](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/state.py): `lesson_planner_ui/state.py`

### Course inputs

- [Course details](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/course_info.py): `lesson_planner_ui/course_info.py`
- [Calendar setup](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/calendar_extract.py): `lesson_planner_ui/calendar_extract.py`
- [Schedule settings](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/schedule_config.py): `lesson_planner_ui/schedule_config.py`
- [File upload](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/upload.py): `lesson_planner_ui/upload.py`

### Syllabus and grounding

- [PDF syllabus extraction](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/Extracting/PD_Extractor.py): `Extracting/PD_Extractor.py`
- [Text syllabus extraction](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/Extracting/Extractor.py): `Extracting/Extractor.py`
- [Pipeline coordinator](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/pipeline.py): `lesson_planner_ui/pipeline.py`
- [Textbook retrieval](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/Extracting/TB_Extractor.py): `Extracting/TB_Extractor.py`
- [Difficulty analysis](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/syllabus_processor.py): `syllabus_processor.py`

### Hours and schedule

- [Hour targets](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/configure.py): `lesson_planner_ui/configure.py`
- [Result shaping](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/data_helpers.py): `lesson_planner_ui/data_helpers.py`
- [Class scheduling](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/schedule_builder.py): `lesson_planner_ui/schedule_builder.py`

### Results and export

- [Plan presentation](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/results.py): `lesson_planner_ui/results.py`
- [PDF export](https://github.com/samithanayak7/automated-lesson-plan-generator/blob/main/lesson_planner_ui/pdf_export.py): `lesson_planner_ui/pdf_export.py`

### Other components

- **Faculty**
- **Syllabus source**
- **Textbook PDFs**
- **Gemini API**

## Connections

- Faculty → App entry: opens app
- App entry → Page flow: starts
- Page flow → Course details: renders
- Page flow → Schedule settings: renders
- Page flow → File upload: renders
- Page flow → Hour targets: renders
- Page flow → Session state: manages
- Faculty → Syllabus source: provides
- Faculty → Textbook PDFs: provides
- Faculty → Calendar setup: provides
- Calendar setup → Schedule settings: derives dates
- File upload → PDF syllabus extraction: extracts PDF
- File upload → Text syllabus extraction: extracts text
- Syllabus source → File upload: submitted to
- Textbook PDFs → Pipeline coordinator: submitted to
- Page flow → Pipeline coordinator: runs
- Pipeline coordinator → Textbook retrieval: grounds topics
- Pipeline coordinator → Difficulty analysis: processes skeleton
- Textbook retrieval → Difficulty analysis: provides excerpts
- Textbook retrieval → Textbook PDFs: reads pages
- Difficulty analysis → Gemini API: requests analysis
- Gemini API → Difficulty analysis: returns estimates
- Faculty → Hour targets: sets targets
- Page flow → Result shaping: parses results
- Page flow → Class scheduling: requests schedule
- Schedule settings → Class scheduling: supplies calendar settings
- Hour targets → Class scheduling: supplies targets
- Class scheduling → Plan presentation: returns rows
- Page flow → Plan presentation: renders results
- Plan presentation → PDF export: builds PDF
- Plan presentation → Faculty: presents plan
