Code. Battle. Level Up.
A gamified RPG platform for learning Data Structures & Algorithms
Runebit transforms the dry grind of DSA practice into an immersive RPG adventure. Players battle fantasy enemies — from goblins to elder dragons — by writing real, executable code in JavaScript, Python, Java, or C++. Every correct solution deals damage; every failed attempt costs HP. Earn XP, level up, unlock new realms, and collect achievements.
| Feature | Description |
|---|---|
| 🗺️ 7-Tier World Map | Scrollable map with unique backgrounds, divider walls, and 17 topic realms |
| ⚔️ 85 Coding Problems | Real DSA challenges from arrays to dynamic programming, categorized as Easy / Medium / Boss |
| 🐍 4 Languages | JavaScript, Python, Java, C++ — compiled & executed via remote compiler API |
| 🎮 Battle System | Animated combat with hero sprites, enemy HP bars, hit markers, and victory fanfares |
| 📖 Solution Viewer | Peek at formatted solutions with syntax highlighting (20% XP penalty) |
| ⭐ Star Ratings | Earn 1-3 stars per problem based on runtime performance |
| 🏆 12 Achievements | Badges like First Blood, Dragon Slayer, Unstoppable (7-day streak) |
| 🔥 Daily Streaks | Consecutive-day tracking to build coding habits |
| 🔐 Google OAuth | One-click sign-in via Google Identity Services |
| 📊 Dashboard | Profile card, XP progress, tier completion, topic skills, and achievement badges |
| Layer | Technology |
|---|---|
| Frontend | React, Vite, React Router, CodeMirror, Prettier |
| Styling | Vanilla CSS with custom design system (pixel art + neon glow) |
| Backend | Node.js, Fastify, Prisma ORM |
| Database | SQLite |
| Auth | JWT + Google OAuth 2.0 |
| Code Execution | OnlineCompiler.io API (Python 3.14, OpenJDK 25, G++ 15) |
| Fonts | Press Start 2P (Google Fonts) |
runebit/
├── public/ # Static assets (sprites, backgrounds, favicon)
│ └── assets/ # Game art: heroes, villains, battle backgrounds
├── src/
│ ├── components/ # Reusable UI (HUD)
│ ├── contexts/ # AuthContext, GameContext (state management)
│ ├── screens/ # Pages: Landing, Login, WorldMap, Battle, Dashboard
│ └── utils/ # Audio, code formatting
├── server/
│ ├── src/
│ │ ├── routes/ # API: auth, problems, submissions, users
│ │ ├── services/ # Code execution engine (judge0.js)
│ │ └── seed/ # 85 problems across 17 topics
│ └── prisma/ # Database schema & migrations
├── index.html
└── package.json
- Node.js 18+
- npm 9+
git clone https://github.com/your-username/runebit.git
cd runebit
# Frontend
npm install
# Backend
cd server
npm installcd server
npm run db:reset # Creates SQLite DB, runs migrations, seeds 85 problems# Terminal 1 — Backend (port 3001)
cd server
npm run dev
# Terminal 2 — Frontend (port 5173)
cd ..
npm run devhttp://localhost:5173
- Go to Google Cloud Console → APIs & Services → Credentials
- Create an OAuth 2.0 Client ID (Web application)
- Add
http://localhost:5173to Authorized JavaScript Origins - Replace the
client_idinsrc/screens/LoginScreen.jsxwith your own
- Sign up with email/password or Google OAuth
- Explore the World Map — scroll through 7 tiers of fantasy realms
- Pick a quest — each node is a coding problem with an enemy to defeat
- Write code in the battle editor — choose your language
- Run to test against sample cases, Attack to submit
- Passing all tests damages the enemy — failing hurts you
- Defeat the enemy to earn XP, stars, and progress
- Level up, unlock new tiers, earn achievements
| Difficulty | Villain | XP Reward |
|---|---|---|
| 🟢 Easy | Tier 1 Goblin | 60 XP |
| 🟡 Medium | Dark Elf Rogue | 100 XP |
| 🔴 Boss | Unique per-tier dragon/titan | 200-500 XP |
| Badge | Requirement |
|---|---|
| 🗡️ First Blood | Solve 1 problem |
| 📜 Apprentice | Solve 5 problems |
| ⚔️ Code Warrior | Solve 15 problems |
| 🛡️ Champion | Solve 30 problems |
| 👑 Legendary | Solve 50 problems |
| 🌟 All Clear | Solve all 85 problems |
| ⭐ Perfectionist | Earn 30+ total stars |
| ✨ Star Hunter | Earn 100+ total stars |
| 🔥 On Fire | 3-day streak |
| 💥 Unstoppable | 7-day streak |
| 🐉 Dragon Slayer | Reach Tier 7 |
| 🎮 Level 10 | Reach Level 10 |
Frontend → Deploy to Vercel:
npm run build
# Deploy the `dist/` folderBackend → Deploy to Railway or Render:
- Set environment variable
DATABASE_URLfor your production DB - Update
APIbase URL insrc/contexts/AuthContext.jsx - Add your production URL to Google OAuth Authorized JavaScript Origins
MIT License — feel free to fork, modify, and build upon Runebit.
Runebit — Where algorithms become adventures 🏰



