# St Joseph's Curriculum Portal — Comprehensive LLM Architecture Dossier (llms-full.txt) > Deterministic, privacy-first, on-device AI educational portal running via in-browser WebRTC loopback channels, Chrome Prompt API (Gemini Nano), WebLLM, and autonomous 60 FPS vector media engines. The AST player serves a dual-market architecture: perpetually free for schools, Catholic organisations, and developing nations (Track A Humanitarian Commons), and commercially licensed for enterprise Digital Signage (DOOH), Programmatic Display Advertising, and Interactive Kiosks (Track B). --- ## 1. System Vision & Foundational Tenets 1. **Education Should Be Free**: The portal is perpetually free and open-source under a dual-licensing humanitarian model (GNU AGPLv3 for public and humanitarian use, commercial dual-licence for proprietary deployments). 2. **Zero Cloud Leakage**: Student logs, responses, voice transcripts, and mastery progress remain strictly client-side in browser IndexedDB (`services/dbStore.ts`). No student data egresses to remote cloud servers. 3. **Multi-Modal Tuples Architecture**: Unifies vector graphics, synchronized video underlays/overlays, procedural audio synthesis, reactive S-Expression data bindings, sub-pixel pointer gestures, and formative assessment gates into a coherent, atomic tuple structure. 4. **Decoupled & Domain-Agnostic Engine**: The core vector engine is strictly **< 35 KB gzipped** (< 150 KB uncompressed) with zero external npm runtime dependencies. All domain-specific hardcoding has been eliminated; dynamic parameter HUDs discover variables, bounds, and interactive controls automatically for ANY domain (education, science, engineering, or digital signage). 5. **Bandwidth & Hardware Sovereignty**: Designed to operate flawlessly on $30 legacy hardware, Chromebooks, and metered mobile 2G/3G connections. Cold start is < 15 ms, with a memory footprint < 8 MB RAM. 6. **Air-Gap Classroom Readiness**: Standalone HTML cartridges and the full portal can be bundled as an air-gapped single file (`exportAirgapHtmlBundle.ts`), bootable directly from USB thumb drives in off-grid rural schools with zero internet connection. 7. **Classroom Smartboard First**: Built-in quadratic Bézier ink whiteboard layer (`#annotation-ink-root`) optimized for stylus pen interaction on Promethean, SMART, ViewSonic boards, and iPads. --- ## 2. Full Route & Resource Map ### User-Facing Routes - `/` : Portal Home, Subject Hub, Quick Practice Starters, and System Diagnostics. - `/media-player` : Full-featured AST Vector Media Player with interactive simulation stage, 3D camera controls, parameter sliders, teacher HUD, and audio sonification. - `/player` : Alias to `/media-player`. - `/player.html` : Lightweight zero-dependency embeddable vector stage, OBS studio broadcast controller, and developer inspection lathe. - `/cartridges` : Decentralized Cartridge Vault, offline ROM repository, PhET/SWF transpiler bridge, and cartridge compressor. - `/phonics` : EYFS & KS1 Phonics Sounds Suite, DfE Phases 2–5 soundboard, blending mat, Alien Words screening check & flashcards. - `/languages` : MFL & Polyglot Languages Studio, Spanish, French & Latin comparative phonics, verb conjugation wheels, etymology bridges. - `/bsl` : 3D British Sign Language (BSL) Studio, 360° rotatable 3D two-handed manual alphabet, vowel tap positions, Signer vs Receiver POV. - `/shakespeare` : Shakespeare Globe Theatre Suite, 1599 Wooden O 3D stage geometry, 5-Act dramatic play-throughs, spoken blank verse & metronomes. - `/practice-lab` : Formative assessment arena featuring interactive AST cartridges, AI hints (Professor Turing persona), and misconception diagnostics. - `/learning-zone` : National curriculum lesson player aligned with Oak National Academy learning objectives. - `/curriculum-studio` : Visual curriculum authoring workspace, S-Expression graph generator, and prompt hydrator. - `/catholic-life` : Catholic life, 3D Sanctuary explorer, Holy Water & Thurifer altar server simulator, liturgical calendar, and sacramental catechesis. - `/first-communion` : Catechetical module for First Holy Communion preparation. - `/teacher-beacon` : Teacher broadcast console, real-time classroom sync, and Smartboard remote presenter. - `/profile` : Learner mastery passport, streak history, diagnostic records, and achievement badges stored in IndexedDB. - `/settings` : Neural hardware probe, WebGPU check, Gemini Nano Prompt API toggles, and audio settings. - `/news` & `/blog` : Technical dispatches, pedagogical essays, and system release announcements. - `/licensing` : Humanitarian Commons charter, GNU AGPLv3 terms, and educational covenant. - `/privacy` : GDPR-compliant zero-cloud sovereign privacy guarantee. - `/child-safety` : Safeguarding and on-device student safety standards. ### Machine-Readable Endpoints & Manifests - `/llms.txt` : Concise machine-readable context file following the llms.txt standard. - `/llms-full.txt` : Comprehensive full-system briefing file for large-context models. - `/robots.txt` : Web robot and AI bot discovery policy. - `/sitemap.xml` : XML sitemap indexing all public curriculum portals and manifests. - `/sitemap.ast` : S-Expression sitemap indexing self-mounting cartridges. - `/manifests/catalog.json` : Master curriculum catalogue indexing subjects, units, and learning objectives. - `/manifests/rag-index.json` : Pre-indexed semantic embeddings for offline retrieval-augmented generation. - `/player/scenes.manifest.json` : Index of all 46 production vector simulation cartridges. - `/player/scenes-config.json` : Timeline keyframes, multilingual subtitles (EN/ES/FR/LA/DE/IT), and pause checkpoints. - `/player/grammar/ast-sexpr.gbnf` : GGML/GBNF grammar defining AST S-Expression syntax for constrained AI decoding. - `/player/grammar/ast-scene.gbnf` : GGML/GBNF grammar defining full scene graph structure. - `/nano-map.ast` : Compact curriculum domain schema parsed by `sexprParser.ts`. --- ## 3. The Multi-Modal Tuples Specification The AST architecture treats media not as disparate layers or separate streams, but as an atomic, mathematically synchronized **Multi-Modal Tuple**: $$\text{Tuple} = \Big\langle \mathbf{V}_{\text{vector}},\, \mathbf{V}_{\text{video}},\, \mathbf{A}_{\text{synth}},\, \mathbf{D}_{\text{reactive}},\, \mathbf{G}_{\text{gestures}},\, \mathbf{C}_{\text{checkpoints}} \Big\rangle$$ ### 3.1. Vector & Video Synchrony - **Hybrid Presentation Layer**: The engine supports simultaneous video underlays/overlays (`hasVideo: true`) with responsive vector elements layered directly on top in the same coordinate space (`viewBox="0 0 800 480"`). - **`videoFit` Modes**: Configurable `:video-fit "contain"` (letterbox preservation) or `:video-fit "cover"` (full-bleed display signage), ensuring identical aspect ratio alignment between background video frames and interactive vector coordinate probes. - **Master Clock Locking**: Both the native `