How starstarn/lessonpreparation works
This is a K–12 teacher lesson-preparation workbench. A teacher selects or customizes a lesson in the React interface, starts a run through the FastAPI API, and follows the job as the workflow interprets curriculum, drafts and reviews a lesson plan, pauses for teacher confirmation, then generates exercises, slides, and a blackboard design in parallel. A consistency check can send conflicting materials back for revision. Results can be edited, versioned, and exported. The README documents these capabilities; some backend routes and agent wiring were not sampled, so uncertain links are omitted.
Main entry points: graph.py Workflow graph · api.ts API client · App.tsx Workbench app · agents.py Parallel materials
Components 23
Teacher workbench
- Lesson form
web/src/components/LessonForm.tsx - Run progress
web/src/components/AgentProgress.tsx - Results panel
web/src/components/ResultPanel.tsx - Workbench app
web/src/App.tsx - API client
web/src/api.ts
Run orchestration
- FastAPI service
src/lesson_prep/api.py - Run jobs
src/lesson_prep/jobs.py - Workflow graph
src/lesson_prep/graph.py
Preparation agents
- Agent implementations
src/lesson_prep/agents.py - Curriculum interpretation
src/lesson_prep/agents.py - Plan and review
src/lesson_prep/agents.py - Parallel materials
src/lesson_prep/agents.py - Consistency check
src/lesson_prep/agents.py
Knowledge and media
- Curriculum retrieval
src/lesson_prep/rag.py - Question bank
src/lesson_prep/question_bank.py - Image and diagrams
src/lesson_prep/media_assets.py - Lesson catalog
src/lesson_prep/catalog.py - Model clients
src/lesson_prep/llm.py - Curriculum and bank data
doc
Results and export
- Saved versions
src/lesson_prep/versions.py - Document export
src/lesson_prep/export_docs.py
Other components
- Teacher
- LLM provider
Connections 26
- Teacher → Lesson form: enters lesson
- Lesson form → Workbench app: submits input
- Workbench app → API client: requests runs
- Workbench app → Run progress: shows status
- Workbench app → Results panel: shows results
- API client → FastAPI service: calls endpoints
- FastAPI service → Lesson catalog: serves catalog
- FastAPI service → Run jobs: starts or updates
- Run jobs → Workflow graph: runs workflow
- Workflow graph → Agent implementations: dispatches stages
- Workflow graph → Curriculum interpretation: runs interpretation
- Curriculum interpretation → Curriculum retrieval: searches curriculum
- Workflow graph → Plan and review: drafts and reviews
- Plan and review → Model clients: requests generation
- Workflow graph → Parallel materials: starts parallel work
- Parallel materials → Question bank: searches questions
- Parallel materials → Image and diagrams: gets visuals
- Parallel materials → Model clients: requests generation
- Workflow graph → Consistency check: checks alignment
- Consistency check → Workflow graph: returns revisions
- Curriculum retrieval → Curriculum and bank data: reads curriculum
- Question bank → Curriculum and bank data: reads question data
- Model clients → LLM provider: invokes model
- Results panel → API client: saves or exports
- API client → Saved versions: manages versions
- API client → Document export: requests documents