ENGINE.
MODULES.
THE CURRICULUM ENGINE IS COMPOSED OF FOUR PRODUCTION-HARDENED MODULES. EACH IS INDEPENDENTLY SCALABLE AND EXPOSED DIRECTLY VIA API.
AI Orchestrator
4-layer quality pipeline on every generation
The central AI brain of the engine. Every curriculum generation passes through a sequential 4-gate validation pipeline before any output is written. The Planner scopes the architecture, the Logic Filter enforces prerequisite ordering, the Structural Critic validates module-lesson density, and the AI Critic runs hallucination detection.
Depth-Mapped Generator
4–5 lessons per module, scaled to your timeframe
Module and lesson count scales automatically based on the requested timeframe and complexity level. Each lesson includes a title, objective, estimated duration, difficulty calibration, and prerequisite dependencies. The generator never truncates — depth is always honored.
BullMQ Async Queue
ACK in <200ms, generation in the background
Your POST request returns a job ID acknowledgement in under 200ms. The actual generation runs asynchronously via BullMQ workers, completely decoupled from your request thread. Workers are concurrency-controlled per API key to protect shared resources under load.
Semantic Cache Layer
Identical requests served in <50ms — zero cost
Requests that are semantically equivalent — even if phrased differently — hit the Redis cache instead of triggering new AI generation. Cache keys are derived from a normalized semantic vector of your parameters. Zero tokens consumed, zero generation cost on cache hits.
POST Request
topic, timeframe, complexity
Queue ACK
job_id returned in <200ms
4-Gate Pipeline
Planner → Logic → Critic → AI
Cache Check
Redis hit? Return in <50ms
Webhook Fires
full JSON curriculum delivered
