Inspiration
The inspiration for Nirnayam didn't come from a YouTube short or a trending idea; it came from my own experiences as a student. Every day, I found myself struggling with decision fatigue: Should I finish my homework first? Revise for tomorrow's exam? Learn a new concept? When I spent too much time deciding what to do, my productivity and concept clarity suffered. And when that happened, I lost motivation to study. After talking to friends, I realised I wasn't alone; countless students face the same challenge every day.
While AI chatbots like ChatGPT and Claude are excellent at answering questions, they can't truly personalise their guidance because they don't know who the student is or how they learn. That realisation inspired me to build Nirnayam—an AI-powered educational companion that personalises every interaction, helping students make smarter academic decisions and learn in the way that works best for them.
What it does
Nirnayam is an AI companion for students that solves two problems in one app: not knowing what to do next, and not understanding what you're looking at.
- Decision Engine — tell it what you're torn between (finish chem homework or revise for tomorrow's physics test?) and it returns a structured, reasoned plan: a confidence score, an urgency rating, a time-split recommendation, a sequenced action plan, and a one-line "why" — all calibrated to a full student profile (grade, stream, stress sensitivity, subject priorities, exam target) captured during onboarding.
- AI Study Chatbot — a tutor that actually teaches the way the student learns, not the way a textbook does. Teaching-style preferences (analogies, step-by-step, exam-focused, challenge mode, and more) get blended adaptively per question. It renders real math with LaTeX, remembers the conversation so follow-up doubts don't require re-explaining the whole question, and accepts a pasted or camera-captured photo of a question alongside typed notes.
- Daily Planner with XP & Rebirth — tasks can be added manually or sent straight from a decision-engine action plan (with an explicit confirm-before-adding step, nothing is auto-added). Completing tasks earns XP, levels up through 50 handcrafted named titles, and — once maxed at Level 50 — the student can choose to rebirth: reset to Level 1 with a permanently higher XP rate per task, cycling through the same 50 titles again with a rebirth badge to show for it.
- Personalisation loop — star-rating how advice actually worked feeds back into future decision-engine responses.
- Full voice input/output, guest mode with no account required, Google Sign-In for persistence, and installable as a PWA.
How we built it
The frontend is React (Vite), talking to Google's Gemini API (gemini-3.1-flash-lite) through two separate API keys — one for the decision engine, one for the study chatbot and intent classifier — so chatbot traffic never throttles the core decision feature. A lightweight intent-routing call classifies every message as "decision," "study," or "both" and fans out to the right engine, running them in parallel when a message needs both.
Firebase Authentication handles Google Sign-In, and Cloud Firestore stores the student profile, star ratings, planner tasks, and XP state — all scoped per user. Math rendering runs through react-markdown + remark-math + rehype-katex so equations actually look like equations instead of raw LaTeX strings. Voice input/output uses the browser's native Web Speech API.
The XP and rebirth system is entirely client-orchestrated against Firestore: task completion triggers an XP award guarded against double-counting, level is derived from cycle XP, and a manual rebirth action resets the cycle while permanently increasing the per-task XP rate.
Challenges we ran into
- A hardcoded prompt bug that silently corrupted every chatbot response. An early version of the system prompt had a leftover block that told the model the student had selected a fixed set of teaching styles — regardless of what they'd actually chosen in onboarding. Every real student's preferences were getting overridden by fake ones. Rebuilding the prompt from scratch, with the real teaching-style list as the only source of truth, fixed it.
- The chatbot had no real memory. Every message was being sent to Gemini in total isolation — no prior turns included — which meant a student asking a follow-up doubt got a response with zero context of what was just discussed. Fixing this meant properly threading conversation history through every request, while being careful not to re-send full image data on every turn (expensive) once an image had already been shared earlier in the chat.
- Getting camera input right without overselling it.
gemini-3.1-flash-liteis fast and decent at OCR, but it's not the frontier tier for messy handwriting or cluttered photos. Rather than pretend it's flawless, we built a paste-and-review flow — an image stages in the input bar before sending, so a bad read is a quick fix, not a wrong answer downstream. - Designing an XP system that can't be gamed. Toggling a task done/undone repeatedly could otherwise farm XP indefinitely — solved with a one-time-award flag per task, and no XP granted at all once a cycle is maxed until the student explicitly chooses to rebirth.
Accomplishments that we're proud of
- Built a full personalisation pipeline that actually closes the loop: onboarding profile → decision engine → star rating → adjusted future advice.
- Shipped a gamification system (50 named levels + a prestige/rebirth mechanic) that gives real narrative weight to an XP bar instead of just a number going up.
- Fixed real, meaningful bugs under time pressure — a corrupted system prompt and a stateless chatbot — that would have quietly undermined the whole product if they'd shipped.
What we learned
- A system prompt is code — leftover test content left in a prompt doesn't get caught by normal debugging; it just silently produces wrong behaviour for every user.
- Model tier matters more than model capability class — the same "Gemini 3" family has meaningfully different vision accuracy depending on which tier you're on, and being upfront about those limits in the UI matters more than promising perfection.
- Gamification is worth doing properly or not at all — a shallow XP bar is forgettable, but tying it to a permanent title, a real reward curve, and a deliberate rebirth choice rather than an automatic reset made it something worth showing off in a demo.
What's next for Nirnayam
- Google Calendar integration for the daily planner, so tasks and fixed commitments (like extracurriculars already captured in onboarding) live on the same timeline.
- Weak-topic tracking — feeding patterns from the study chatbot back into the decision engine, so it knows not just what's on the student's plate but where they're actually struggling.
- Report card/performance upload to ground decision-engine advice in real academic results, not just self-reported priorities.
Built With
- chatgpt
- claude
- css
- firebase
- geminiapi
- github
- html
- javascript
- ml
- vercel
Log in or sign up for Devpost to join the conversation.