You've learned JavaScript a hundred times. Read tutorials. Built projects. Solved LeetCode. But nothing makes your fingers move like real stakes.
Most "coding games" are broken:
- Trivia masquerading as code
- Drag-and-drop nonsense
- Fake problems that don't matter
- No consequences = no motivation
Corun is different.
You wake up in a cell. The facility is dark, the lights dead.
The Warden is coming. The only way out is to code.
Write actual JavaScript in a live editor while:
- ✅ Dodge attack patterns in a pixel-art side-view platformer
- ✅ Solve 36 story-mode coding tasks (strings, arrays, objects, regex, algorithms)
- ✅ Fight The Warden — a boss who doesn't pause while you type
- ✅ Chase a 4× combo multiplier in endless procedural arenas
- ✅ Compete on the daily leaderboard (one shot, global ranking)
No tutorials. No hand-holding. Just you, your code, and the clock.
| Feature | What You Get |
|---|---|
| 📖 Story Mode + Boss Fight | A 4-node narrative campaign. The Warden is brutal — orbs, rain, ground waves — all while you type. |
| 🏃 Endless Run (Free Play) | Procedurally generated arenas. Questions pop by distance. Chain correct answers → fire combo → 4× multiplier. |
| ⚡ Speed Run & Survival | 60-second countdown or 3-life hardcore mode. Pick your pressure. |
| 🗓️ Daily Challenge | One fixed pool per day. Global leaderboard. Your name at the top. |
| 📱 Offline-First PWA | Works anywhere. Precached assets. Plays offline. Install it. Own it. |
| 💾 Local-First Persistence | Your scores, badges, progress live in IndexedDB. No cloud, no account, no data loss. |
| 🌐 i18n | English, Spanish, French. Auto-detected. Persist choice. |
| 🎵 Procedural Soundtrack | Web Audio synthesis. Zero audio files. Music scales with your progress. |
| 🛠️ User-Generated Puzzles | Built-in editor. Share via URL. Browse community challenges. |
- 36 story-mode coding tasks with hidden test cases
- 176 quick-fire runner challenges across modes
- 5 game modes (story, freeplay, speedrun, survival, daily)
- 3 languages (EN, ES, FR)
- 0 backend servers
- 125 unit tests / 18 test suites
- 100% TypeScript (type-safe from day one)
Four narrative nodes — The Cell (strings), The Vents (arrays/loops), The Core (objects/functions), The Warden (algorithms).
Each node is a split-screen battlefield:
- Left: pixel-art side-view world
- Right: live code editor
- No pause. No mercy.
Defeat The Warden = beat 12 final boss tasks while dodging his orb, rain, and shockwave attacks.
Escape a procedurally generated 2D side-view world. Pits. Drones. Hazards. Questions pop by distance.
Speed chain → combo fire → damage multiplier (up to 4×).
Every ~80 pts: bonus lightning round (5 sec, 2× points)
Every ~150 pts: boss battle (hard questions, big rewards)
- Speed Run: 60-second timer. Wrong answer = penalty. How many can you solve?
- Survival: 3 lives. Every miss = 1 life. Difficulty scales up as you survive.
One global pool per day. One chance. One score. Seeded randomization = fair play.
Compete against players worldwide. Top scores appear on the leaderboard. Come back tomorrow for a fresh challenge.
| Layer | Technology |
|---|---|
| Frontend | React 18 + TypeScript + Vite 6 |
| Game Engine | Canvas 2D + custom physics (coyote time, jump buffer, parallax) |
| UI System | CSS/DOM design system (Glass primitives, animated backdrop, 56px display type) |
| Storage | Dexie 4 (IndexedDB v4) — direct, offline-first, no sync queue |
| Audio | Web Audio API (procedural synthesis, zero .mp3/.wav files) |
| Testing | Vitest + React Testing Library + jsdom (125 tests) |
| PWA | vite-plugin-pwa + Workbox + build.json stale detection |
| Monitoring | Sentry (opt-in) |
| CI/CD | GitHub Actions (semantic-release automation) |
| Deploy | Vercel (sub-second edge cache) |
Local-First by Design
- No backend. No auth vendor. No external database.
- IndexedDB (Dexie v4) stores profiles, scores, badges, story progress, settings.
- Writes go straight to IndexedDB — synchronous, offline-first, no sync queue.
- Migrations auto-upgrade legacy localStorage → v2/v3/v4 schemas.
- Nothing is ever lost, even offline.
Smart Deployment
build.jsonfingerprint auto-detects when a new build is live.- Tab focus + boot: re-check. Only reload if truly new.
- Result: players never get half-updated bundles.
Sandboxed Code Evaluation
- User code runs in a Web Worker, not the main thread.
- Infinite loops, crashes, malicious code = isolated.
- Main thread stays 60 FPS during chaos.
# Clone & install
git clone https://github.com/alimaandev/corun.git
cd corun
npm install
# Dev mode
npm run dev # → http://localhost:3000
# Quality gates
npm run typecheck # strict TypeScript (tsc -b)
npm run lint # ESLint + Prettier
npm run test # vitest run (125 tests)
# Production build
npm run build # → dist/ (Vite optimized)No setup ceremony. No .env files. No database migrations.
Play guest mode immediately. All progress syncs to your browser's IndexedDB. Refreshing the page = you pick up where you left off (up to 2 hours).
┌─────────────────────────────────────────────────────┐
│ React App │
│ ┌──────────────────────────────────────────────┐ │
│ │ Game Mode Hooks │ │
│ │ (story · freeplay · speedrun · survival) │ │
│ └──────────────────────────────────────────────┘ │
└────────┬──────────────────────────────────┬─────────┘
│ │
┌────▼────────────────┐ ┌───────▼────────────┐
│ Game Engine │ │ Storage Layer │
│ (framework-free) │ │ (Dexie · direct) │
│ │ │ │
│ • Physics │ └───────┬────────────┘
│ • Parallax │ │
│ • Particles │ ┌──────▼──────┐
│ • Boss AI │ │ IndexedDB │
│ • Side Sim │ └─────────────┘
│ • Score/Combos │
└────┬────────────────┘
│
┌────▼──────────┐
│ Sandbox │
│ Web Worker │
│ │
│ Code Eval │
│ Infinite Loop │
│ Protection │
└───────────────┘
Everything is decoupled: game engine is framework-free, storage is pluggable, code eval is sandboxed.
Releases are 100% automated via semantic-release.
Merge a PR to main with feat or fix commits:
- Build → Vercel deploys the commit
- Release → semantic-release tags it, generates changelog, publishes to GitHub Releases
- Live → Your code is world-facing in under 60 seconds
| Version | Date | Highlights |
|---|---|---|
| v1.15.0 | 2026-08-14 | Polish — 60Hz fixed timestep, story SFX, i18n (EN/ES/FR) |
| v1.13.0 | 2026-08-14 | The Warden boss fight — dodge patterns, continuous mode |
| v1.12.0 | 2026-08-14 | Split-screen editor + 36 story tasks with hidden tests |
| v1.11.0 | 2026-08-14 | Story campaign — The Cell, Vents, Core, Warden |
| v1.10.0 | 2026-08-14 | 2D side-view engine — physics, parallax, particles, shake, combo |
LeetCode: Isolated problems, no narrative, stress without reward
Corun: Real stakes, story context, enemies that punish hesitation
Clones: Multiple-choice or drag-drop
Corun: Type actual code. Errors cost you health. Speed counts.
Courses: Passive. You read. You forget.
Corun: Active. You code. You dodge. You win. Neurons fire.
Use Corun to:
- 🏫 Teach ES6+ in a game context (story mode demonstrates real patterns)
- 🧑💼 Onboard junior devs with a memorable learning curve
- 🏆 Run tournament-style internal competitions (leaderboard mode)
- 💪 Test interview candidates under pressure (speedrun + survival)
Customizable challenge editor = your puzzles, your rules.
We're always open to:
- Bug fixes → File a bug report
- Features → Request a feature
- Translations → Help us reach EN/ES/FR and beyond
- Puzzle Design → Contribute story tasks or quick-fire challenges
- Good First Issues → Start here
PR titles must follow Conventional Commits — they power automated releases. See CONTRIBUTING.md for details.
MIT © Ali Sher