SAI System

SAI System combines AI-powered learning with a playable dungeon-crawler RPG. Users bring their own AI service credentials, pick from a roster of specialized AI assistants, and chat — or they can enter a 3D dungeon that the game builds fresh every time, where every puzzle they solve to progress is a real computer science concept in disguise. The project started as a DIY home-improvement chatbot and evolved into an ambitious learning platform that proves AI doesn't have to be a passive text box — it can be a world you explore.

Tech Stack

Languages

  • TypeScript94.0%
  • CSS4.5%
  • JavaScript1.5%

Framework

Next.js 15React 19TypeScript

Styling & Motion

Tailwind CSSFramer MotionWCAG AA+ accessible

3D Game Engine

React Three FiberThree.jsZustand

Backend & Security

AWS CognitoDynamoDBWeb Crypto APIVercel

AI

Bring-your-own-keyMarkdown instruction setsPer-agent prompting

At a Glance

Type
AI learning platform + dungeon-crawler RPG
Focus
Interactive CS education through gamification
Hosting
Vercel (frontend), AWS (backend)
Status
Active development — dungeon playable, AWS migration in progress

Key Features

01

Bring your own key

Users plug in their own API key from any supported provider (OpenAI, Gemini, etc.). Zero platform cost, full user control over provider and spending, and keys are encrypted on the user's device with Web Crypto (PBKDF2 + AES-GCM) before they're ever stored.

02

Backend-agnostic architecture

The UI talks to a generic backend contract — "sign in," "save a key," "load conversations" — not to any specific service. Behind it, adapters translate to whichever backend is configured. A local adapter handles guest mode, an AWS adapter handles production, and the app picks which to use on startup.

03

Guest mode

When no cloud backend is detected, the app automatically opens a local guest session so every page is fully browsable. Reviewers and visitors can explore the entire app without creating an account.

04

Tech Chef Academy

A recipe-themed mini-game inside the dashboard: match tech terms to definitions, then order steps or sort items into categories. Completed recipes earn stars, XP, and rank-ups — a lighter, more structured learning path outside the dungeon.

Core Systems

The platform is built around four interlocking systems — a procedural dungeon, a living hub world, a specialized agent roster, and a bring-your-own-key model that keeps AI costs at zero.

Procedural 3D Dungeon

Every expedition generates a completely new layout from a random seed. The generator carves rooms, connects them with corridors, and places enemies, items, and objectives — then automatically verifies the floor is completable. Five floors of increasing difficulty, each tied to a real CS topic dressed up in sci-fi framing. Fog of war, tile-based movement, and turn-based combat play out in a fully rendered 3D scene.

The Hub World

Between dungeon runs, players explore a 3D town plaza with free-roam movement. A market, quest board, schoolhouse, player home, and expedition gate each open a different game panel. Resident NPCs, animated scenery, and a day/night cycle make the space feel lived-in.

Specialized Agent Roster

Nine agents — Structural, Materials, Outdoor, Indoor, Safety & Code, Research, Strategist, Devil's Advocate, and a General fallback — each defined by Markdown instructions. The system scans each message for signal words and routes it to the best match. Strategist and Devil's Advocate serve as "council anchors" that can join any conversation.

AI-Generated Challenges

In assisted mode, the player's own AI generates brand-new puzzles for each floor. The AI writes the content; grading is always handled by the app's own code. If the AI fails entirely, a pre-written puzzle swaps in seamlessly so the run is never interrupted — infinite variety with zero risk to fairness.

Lessons Learned

  • 01Starting with a backend contract instead of an implementation meant the entire frontend could be built, tested, and deployed using browser storage. When it came time to wire up the real cloud services, the work was filling in pre-defined operations, not rearchitecting the app.
  • 02The AI challenge system is designed around the assumption that the AI will sometimes break — wrong format, slow response, nonsense output. Every failure mode has a fallback, and the AI is treated as a content generator rather than a game engine: it makes things fresh, but it's never load-bearing.
  • 03All game rules — movement, combat, puzzles, turn order — live in one central store. The 3D scene only reads that store and draws what it says. The entire game could be built and tested without rendering a single 3D frame, and a visual bug can never corrupt the player's save.
  • 04Wrapping CS concepts in flashcards gets boring fast. Building a dungeon with real combat, inventory, quests, and progression — where solving a puzzle is the only way to advance — made the learning feel like part of the adventure rather than an interruption of it.

Try It, Or Keep Exploring

Open the live build, or head back to the full list of work.