Inspiration
Learning to code is mostly about understanding what happens inside the code: how a variable changes on every pass of a loop, why an index runs off the end of a list. You can't see that on a slide. And a teacher with 25 students can't know in real time who is stuck, or why.
We wanted two things at once: students who learn by playing and watching code run, and teachers who get an AI that helps them without taking control away.
What it does
Code2Escape has two sides:
For teachers: an AI-powered content editor
- Build interactive theory and practice levels from templates: step-by-step traces, reorder the code, fill in and run, find the bug, simulate an algorithm, the call stack, and multiple-choice review cards.
- An AI assistant creates or edits levels from a single sentence ("an exercise on accumulators with a typical mistake"). The teacher reviews the proposal and decides whether to accept it.
- Natural-voice narration for theory with ElevenLabs, generated once and shared with every student.
- The My class tab shows a map of the class: which levels students are passing, who is on track, who is stuck, and who hasn't logged in for days.
- The AI summarizes how the class is doing, suggests actions (create a reinforcement level, message certain students), and drafts personalized feedback. The teacher reviews, edits and sends it.
For students: a pixel-art archipelago
- Each topic is an island and each level is a station. Levels unlock according to the prerequisites the teacher sets.
- Inside each station, code really runs in the browser and can be followed step by step.
- A direct chat with their teacher to ask for help on the level they're on.
How we built it
- Frontend: React + Vite + TypeScript, with a pixel-art world for students.
- Editor and player: framework-free JavaScript. Each level is a declarative JSON document (
classroom-artifact/1: screens, objects, steps and rules) interpreted by a sandboxed player in an iframe that talks to the app viapostMessage. - Python in the browser with Pyodide in a Web Worker, to run code and generate traces.
- Backend: FastAPI + SQLModel + Alembic on PostgreSQL (Tiger Data), with Auth0 login.
- AI: OpenAI with structured outputs to generate valid levels and fixed-format summaries, ElevenLabs for voice.
- Deployment: Vercel (frontend) and Render (backend), behind a single domain.
Challenges we ran into
- Making AI-generated content actually work. That's why levels are declarative JSON, not code: they can be validated against a schema, and if the AI gets something wrong, it's caught before it reaches a student.
- Privacy for students who may be minors. The AI only receives aggregated, pseudonymized data ("Student 3"). The server maps names back, and drafts never include the student's name.
- API keys never in the browser. Every call to OpenAI and ElevenLabs goes through the backend, and only teachers can generate audio.
- Two repos and a team working in parallel for 24 hours, integrating the editor, the world and the backend on the fly.
Accomplishments that we're proud of
- One level format that the teacher writes, the AI generates and the student plays.
- Real teacher in the loop: the AI proposes, the teacher decides. Nothing reaches a student without the teacher's approval.
- Watching a loop run line by line inside a pixel-art island.
What we learned
- Designing the data format with AI in mind from day one saves a huge amount of work later.
- AI is most useful when it helps the teacher decide, not when it decides for them.
What's next for Code2Escape
- Record every student attempt (answers, hints, typical mistakes) so My class can spot specific misconceptions, like "uses
=instead of+=in the accumulator". - Interface in Catalan, Spanish and English.
- More exercise templates and a shared level bank between teachers.
Who did it
Amaru: [email protected]
Carlos: [email protected]
Hamza: [email protected]
Pol: [email protected]
Built With
- elevenlabs
- javascript
- python
- react
- render
- sql
- tigerdata
- typescript
- vercel