-
-
The gym: you see only the symptom, fix the bug, unlock hints one at a time. The AI judges your fix.
-
1v1 duels: a 5-round quiz race against a friend, a random opponent or the Glitch Bot.
-
Daily challenges: three fresh bugs a day, the same for every player, plus Glitchdle and Line hunt.
-
Lab assistant: a router agent hands your question to specialist agents. Nudges, never full fixes.
-
Paste the error. Understand why. Practice so it never happens again.
-
Glitchdle: guess the language from an error it printed, its traits or a hidden snippet.
Inspiration
Every programming student knows the loop: you hit an error, paste it into a chatbot, copy the fix, it works. Next week you write the same bug again. That's fine at 2 a.m. before a deadline, but it never builds the skill you need in an exam, an interview or a live-coding session.
I wanted AI to work the other way around. Glitch Lab hides the answer and trains you.
What it does
Glitch Lab is a debugging gym for programming students, in English and Brazilian Portuguese.
- Investigate. Paste an error, code, files or a whole folder. A live scan reads the error type, language and file:line spots before any AI. You get clues, the likely spot, what happened and the concept behind it. The fix stays hidden until you ask for it.
- Your board. Every investigation becomes a case tagged by bug type ("Reading undefined", "Index out of range"...) on a Kanban board: New, Training, Solved. A summary names your weak spot.
- The gym. From any case, the AI writes a brand-new program with the same kind of bug. You see only the symptom, fix it in the editor, unlock hints one at a time, and the AI judges your fix against a reference solution that never reaches the browser.
- Interrogate the bug. A Socratic coach walks you through the 6 steps of debugging (reproduce, read, hypothesize, isolate, fix, prevent). A server-side guard stops it from giving away the fix early.
- Spaced review. Every bug type you've met comes back after 1, 3, 7, 14 and 30 days as quick cards built from your own cases. A skill map shows your mastery per bug type.
- Study trail. The AI reads your cases and notes and lays out 5 to 7 missions on a pixel path. Missions tick themselves when you do them.
- Lab assistant. A side panel where a router agent sends your question to specialist agents (board, gym, notes, study, app guide) that answer in parallel, streamed live.
- Play to practice. Daily puzzles and a weekly global challenge, Glitchdle (guess the language, framework or database of the day), Line hunt (tap the buggy line in 20 seconds), and 1v1 duels in real time.
- Notes, profile and community. A Notion-style notebook with cases as blocks, public profiles, articles, events, XP, levels, streaks and 27 badges. Export the board or notes as Markdown, PNG or PDF.
How I built it
I built Glitch Lab solo.
- Front end: React 19, React Router and Tailwind on Vite, deployed on Vercel.
- API: Express 5 on Render, split into layers (core, infra, one module per feature with routes, controller and service).
- Data: Supabase Postgres with Row Level Security on every table and no client policies, plus Supabase Realtime for duels (moves arrive in about 50 ms).
- AI: Gemini through one provider-agnostic
generateJsonlayer withresponseSchema, so every answer is valid, typed JSON. OpenRouter is also wired in for streaming. - Cron: a GitHub Actions workflow runs daily at 03:00 UTC to generate today's and tomorrow's puzzles and Glitchdle boards.
- Data for Glitchdle: frameworks and databases synced from Wikidata (SPARQL) and Stack Overflow tag counts.
- Tests: Vitest, Testing Library and Supertest, with the same contract tests running against the local store and Supabase.
Challenges I ran into
- Keeping secrets secret. Solutions and locked hints must never reach the browser, so the API only returns what the student is allowed to see. Student code is fenced off as data so it can't steer the judge.
- Making a tutor that won't cheat. The interrogation coach and gym agents had to nudge, not solve. I added server-side guards on top of prompting.
- Free-tier reliability. Every AI call has a time limit, one retry and a daily quota per account. If the cron or AI fails, a curated pool of hand-written puzzles keeps the daily challenges alive.
- Streaming multi-agent answers. Two specialists write at once over Server-Sent Events, and the server holds back the hidden
ACTIONSline so it never flashes on screen.
Accomplishments that I'm proud of
- An AI product that makes students better, not more dependent.
- A full, playable app with a one-click demo account that is already filled with cases, a gym challenge, notes, a streak and a half-done study trail.
- Fair, server-timed games and leaderboards that can't be farmed.
- Shipping all of it as a solo builder.
What I learned
- Constraining the model with JSON schemas and server-side validation matters more than clever prompts.
- Spaced repetition and small daily games keep people coming back far more than one-off explanations.
- Building solo forces clear layers: swappable AI, database and security pieces kept the whole app manageable.
What's next for Glitch Lab
- More languages and bug types, plus classroom mode so teachers can see where a whole class struggles.
- More AI providers through the existing provider-agnostic layer.
- An editor extension that turns real errors into Glitch Lab cases automatically.
Built With
- express.js
- gemini
- github-actions
- javascript
- node.js
- openrouter
- postgresql
- react
- render
- supabase
- tailwindcss
- vercel
- vite
- vitest
- wikidata
Log in or sign up for Devpost to join the conversation.