What is Dheeyudha?
Learning is often seen as a chore. What if it was as addictive as an RPG or a multiplayer game?
Dheeyudha (Sanskrit for "War of Intellect") is a platform I've been building that completely reimagines how students practice and learn. It bridges the gap between a robust educational tool and an engaging, competitive multiplayer experience.
It is currently live as both a Next.js Web App and a React Native Mobile App.
🎮 The Core Philosophy: Gamified Learning
At its heart, Dheeyudha is about making studying competitive and fun. We threw out the boring multiple-choice worksheets and replaced them with:
1v1 Duels: Students can literally challenge each other to a "Duel". They answer questions in real-time, and the winner takes points and glory.
Weekly Leagues: A tiered league system (Bronze, Silver, Gold) where students rank up by earning points through daily practice and solving questions.
Streaks & Daily Goals: Inspired by Duolingo, but tailored for solving complex academic questions. Miss your goal? Say goodbye to your streak!
Factions (Schools): Students join "Factions" (their schools) and battle it out on a global map.
🛠️ The Tech Stack
Building a real-time, multi-platform app with complex game mechanics requires a solid architecture.
- The Backend & Web App (Next.js & Supabase) I used Next.js (App Router) to build a unified web platform that serves as both the frontend for web users and the backend API for the mobile app.
For the database and authentication, Supabase was the absolute perfect choice.
Realtime: We heavily utilize Supabase Realtime for the 1v1 Duels and the global chat.
Row Level Security (RLS): Crucial for ensuring students can't cheat or edit other people's answers.
Postgres Triggers: Used to automatically calculate League points and streak bonuses on the database side without relying on heavy client logic.
- The Mobile App (React Native & Expo) The mobile app is built with Expo & React Native. The beauty of this stack is how much code we can share mentally (and literally) between the Next.js web app and the mobile app.
We used Expo Router for file-based navigation, making the mental model identical to Next.js.
For push notifications (duel challenges, league demotion warnings), we integrated Capacitor Push Notifications to handle native Android/iOS alerts seamlessly.
💡 Key Technical Challenges
Real-time Duels ⚔️
Building a 1v1 real-time quiz system was tricky. What happens if a player disconnects? How do we ensure they both get the question at the exact same time? Solution: We used Supabase Broadcast channels. The server acts as the source of truth for the countdown, broadcasting the question_start and question_end events, ensuring clients are strictly synchronized.The Universal "Question Card"
Questions in Dheeyudha aren't just text. They have images, varying difficulties, bounties (points), and different types (MCQ, Written, Match the Following). Solution: We built a massive, resilient QuestionCard component that handles all these states dynamically. It even includes a built-in proxy to bypass school/ISP network blocks on image domains!Syncing Mobile and Web APIs
To keep things DRY, the Next.js API routes (/api/practice, /api/league) are consumed by the React Native app using standard fetch calls. The authentication tokens from Supabase on mobile are passed directly in the Authorization headers to Next.js, allowing seamless cross-platform auth!
🚀 What's Next?
Dheeyudha is still in rapid development. Next up, we are looking at:
AI Tutors: Integrating an LLM to explain why a student got a question wrong after a duel.
Boss Fights: Collaborative PvE events where an entire school teams up to solve extremely difficult questions over a weekend.
If you are interested in EdTech, Gamification, or just want to see how we are pushing Next.js and Supabase to their limits, check out our progress!
Would love to hear your thoughts on gamifying education. Have you tried building real-time mechanics in your apps? Let me know in the comments! 👇
Top comments (0)