System Architecture · Technical Reference
SYSTEM.
DESIGN.
FOUR PRODUCTION-HARDENED LAYERS. EVERY LAYER INDEPENDENTLY SCALABLE. EVERY LAYER DIRECTLY EXPOSED VIA API. NOTHING HARDCODED. NOTHING MAGIC.
01
POST /v2/curriculum/generate
Request lands — API key validated at middleware
›
02
202 Accepted + job_id
Instant acknowledgement, job queued in BullMQ
›
03
Cache Check
Redis checks semantic vector — hit returns in <50ms
›
04
4-Gate Pipeline
Planner → Logic Filter → Structural Critic → AI Critic
›
05
Webhook Fires
curriculum.completed event delivers full JSON payload
CORE PIPELINEL1
AI Orchestrator
Azure OpenAI · BullMQ · Node.js
4-gate validation: Planner → Logic Filter → Structural Critic → AI Critic
Async job queue — 202 ACK in <200ms, generation in background
Concurrency control per API key — shared resources protected
Full gate decision audit log available via API
FIDELITY ENGINEL2
Depth-Mapped Generator
Azure OpenAI · Strict JSON Mode · Schema Validation
Topic → timeframe → module/lesson count mapping
Prerequisite topological ordering per curriculum
Difficulty calibration: beginner → advanced → expert
Structured JSON output — zero prose, no truncation
SECURITYL3
API Key Gateway
Express Middleware · Redis · JWT
Every endpoint gated by issued API key
Quota enforcement at middleware — before any AI call
Rate limits, role scopes, and per-key usage metering
Key rotation and revocation without integration changes
PERFORMANCEL4
Semantic Cache
Redis · Vector Normalization · 7-day TTL
Semantic vector normalization — not just string equality
<50ms response on cache hit — zero AI tokens consumed
Per-tenant cache namespacing — no cross-contamination
Cache invalidation available per-curriculum via API
<200msQueue ACK Latency
<10sMedian Generation Time
<50msRedis Cache Hit
4 GatesAI Validation Layers
99.9%API Uptime Target
GDPRData Compliance
