← All projects

02 · Applied AI & Product Engineering

Lesson planning with structure, review, and teacher control.

A Flask application that helps teachers assemble modular lessons and student materials while treating AI output as a draft to validate, edit, and approve.

PythonFlaskOpenAI APIProduct EngineeringTesting

The problem

Generating text is only the beginning of lesson planning.

Teachers need goals, timing, materials, activities, learner supports, assessment, and standards context to work together. They also need to revise one part without losing work elsewhere and to know when a generated result is incomplete.

The product reframes generation as one step inside a teacher-controlled drafting and review workflow.

The workflow

Preserve teacher judgment at every stage.

  1. Choose the planning path

    Start from a preset, customize a preset, or build a lesson from scratch. Eight approaches include backward design, inquiry, explicit instruction, and project-based learning.

  2. Edit the structure

    Add, remove, reorder, and write sections directly. A teacher can regenerate one section without replacing the rest of the draft.

  3. Create student materials

    Build practice worksheets, guided notes, reference sheets, or exit tickets with separate student and teacher exports.

  4. Review before export

    Changes clear the reviewed state. Missing objectives, assessments, answer keys, and source context are surfaced before a teacher marks the draft reviewed.

Materials and presentation

Plan the lesson and what students receive.

Handouts inherit the lesson's grade and context. Teachers can create up to twenty exercises, keep answers separate from student copies, and choose print-friendly or restrained classroom color themes. Word and PDF routes use the same saved content so the formats do not silently diverge.

Reliability engineering

Reject bad output without destroying good work.

Validate structure
Requested sections must appear exactly once with nonempty content. Worksheet items also receive count, identifier, answer, and question-type checks.
Preserve drafts
Invalid input, API failures, incomplete responses, stale revisions, and overlapping requests leave the last saved draft intact.
Control paid requests
Opening a page cannot generate content. CSRF-protected POST actions, bounded attempts, disabled automatic retries, and request-size limits guard the provider boundary.
Test without credits
The 86-test offline suite mocks the AI boundary and exercises the application workflow without calling OpenAI or consuming API credits. A synthetic long lesson also produced a visually inspected 23-page PDF through the installed local converter.

Versioning and recovery

Give every stable release a named recovery point.

The repository now uses semantic versions, a single application version file, a changelog, annotated Git tags, GitHub releases, and a documented rollback procedure. Feature branches and release tags are pushed off-device before riskier changes move forward.

Code recovery and data recovery are treated separately: Git protects committed source, while secrets, session files, and future production databases require independent encrypted backups.

Current limits

State clearly what the safeguards do not prove.

The application does not yet independently retrieve standards or verify factual claims, citations, activity timing, or answer correctness. It has no teacher authentication, durable lesson library, multi-host coordination, or production deployment. Teacher review remains required.

What this project demonstrates

Applied AI product engineering grounded in user control: modular workflows, recoverable state, explicit limits, testable output contracts, and release discipline.

Continue exploring