Intelligent Textbook xAPI Architecture — click any layer to trace the flow
flowchart TD Markdown["Markdown content
(MkDocs Material)"]:::content PageViews["Page Views"]:::component MicroSim["MicroSim"]:::component Quiz["Quiz"]:::component Branching["Adaptive Branching"]:::component ClientLib["xAPI Client Library"]:::client Builder["Statement Builder"]:::internal Buffer["Batch Buffer"]:::internal Retry["Retry Manager"]:::internal Auth["Auth Header Manager"]:::internal Fetch["Fetch API → LRS HTTP API"]:::transport LRS[("LRS Storage")]:::storage Markdown --> PageViews Markdown --> MicroSim Markdown --> Quiz Markdown --> Branching PageViews --> ClientLib MicroSim --> ClientLib Quiz --> ClientLib Branching --> ClientLib ClientLib --> Builder ClientLib --> Buffer ClientLib --> Retry ClientLib --> Auth Builder --> Fetch Buffer --> Fetch Retry --> Fetch Auth --> Fetch Fetch --> LRS click Markdown call showComponent("Markdown") click PageViews call showComponent("PageViews") click MicroSim call showComponent("MicroSim") click Quiz call showComponent("Quiz") click Branching call showComponent("Branching") click ClientLib call showComponent("ClientLib") click Builder call showComponent("Builder") click Buffer call showComponent("Buffer") click Retry call showComponent("Retry") click Auth call showComponent("Auth") click Fetch call showComponent("Fetch") click LRS call showComponent("LRS") classDef content fill:#0f766e,stroke:#134e4a,color:#fff,font-size:14px,font-weight:bold classDef component fill:#4338ca,stroke:#312e81,color:#fff,font-size:14px,font-weight:bold classDef client fill:#1e293b,stroke:#0f172a,color:#fff,font-size:14px,font-weight:bold classDef internal fill:#7c3aed,stroke:#5b21b6,color:#fff,font-size:13px classDef transport fill:#b45309,stroke:#78350f,color:#fff,font-size:14px,font-weight:bold classDef storage fill:#0d9488,stroke:#134e4a,color:#fff,font-size:14px,font-weight:bold linkStyle default stroke:#64748b,stroke-width:1.5px,font-size:12px

Layer Details

Click any component in the diagram to see its responsibility, the chapter section that covers it, and a one-line code reference.

Content layer (Markdown)
Component layer (MicroSim, Quiz, Branching)
xAPI Client Library
Client internals
Transport (Fetch → HTTP)
Storage (LRS)