AI LEARNING PATHWAY ENGINE · PUBLIC BETA
Aura AI
Turns any technical topic into a sequenced 5–6 module DAG curriculum with streamed progressive lessons, interactive React Flow visual routes, and quiz-gated node unlocking.
Inspect technical architecture & system boundaries
- Objective & Problem
- Self-directed learners face unstructured LLM chat walls without curriculum sequencing or mastery verification. Aura AI structures any topic into a visual Directed Acyclic Graph (DAG) of 5–6 dependency-ordered modules with progressive reading lessons and mandatory knowledge checkpoints.
- LLM Orchestration & Streaming
- Orchestrates LangChain (@langchain/core, @langchain/openai) across a multi-tier fallback policy: primary Groq LPU inference (qwen/qwen3.8-27b, fallback openai/gpt-oss-20b) with Bynara Router backup (minimax-m3-free, qwen3.8-flash-free) at temperature 0.3 and 60s AbortSignal timeouts. Custom state-machine stream extractors (SyllabusModuleExtractor and MarkdownBlockExtractor) emit partial JSON nodes in real time while recording TTFT and token telemetry.
- Validation, Graph & Safety
- Handles malformed or truncated LLM JSON via a multi-stage recovery pipeline (extractJSON, isCompleteJSON, salvageJSON auto-closing unclosed quotes/brackets/braces, and attemptJSONFix) validated against strict Zod v4 schemas (SyllabusResponseSchema, ContentGenerationSchema) with NFKC + control-character input sanitization. DAG coordinates are computed deterministically via BFS level assignment (calculateNodeLevels) and rendered with React Flow (@xyflow/react v12) smoothstep edges.
- State & Persistence Boundaries
- Server-side in-memory LruTtlCache (7-day syllabus TTL, 30-day lesson content TTL) paired with a ReplayBroker coalesces concurrent identical prompts and replays streamed chunks to subscribers. Client-side learning history and node unlock states (locked → unlocked → completed) persist in browser localStorage via Zustand v5.
- System Limitations & Future Work
- Current boundaries: server cache and rate limiting are in-memory per serverless instance, client progress is stored in browser localStorage without cross-device account sync, and generation relies on model weights without external RAG or vector retrieval. Planned future work: Upstash Redis distributed cache/rate-limiting, Supabase user progress sync, and citation-grounded RAG.
Verified Stack: Next.js 16 · React 19 · TypeScript 5 · LangChain · React Flow v12 · Zod v4 · Zustand v5 · Groq LPU




