The problem

Most students know their exam date but not how to spread their study time before it. They either cram in the last few days or lose track of which topics they have covered. StudyBuddy Planner turns an exam date and a list of topics into a day-by-day study schedule, then helps the student practice with quizzes and flashcards for each topic.

What it does

  • A student signs up, then enters a subject, their topics, the exam date and how many hours a day they can study.
  • The AI builds a schedule that spreads the topics across the days left, puts harder topics earlier and keeps the last days for revision.
  • Each day lists tasks the student can tick off. A progress chart and a daily streak show how consistent they have been.
  • For any topic in a plan, the student can generate a multiple-choice quiz with explanations, or a deck of flashcards.

How I built it

StudyBuddy is a MERN app. The React (Vite) frontend uses Tailwind CSS and Recharts, and talks to a Node and Express API with a MongoDB Atlas database. AI calls happen only on the backend, so no API key reaches the browser. Groq is the main provider, with Google Gemini as a backup. Every AI answer is requested as JSON and checked with zod before it is saved or shown.

Security was part of the build, not an afterthought: bcrypt password hashing, JWT authentication, input validation, rate limits, security headers, a strict CORS allowlist and ownership checks so one user can never read another user's plans. Account deletion removes all of a user's data.

AI use

  • In the product: Groq (main) and Google Gemini (fallback) generate schedules, quizzes and flashcards.
  • In development: I wrote the code with OpenCode and a free DeepSeek model. I used Claude to plan the project and write the prompts I gave OpenCode. I tested and reviewed the results myself.

Challenges

  • Free AI limits. Gemini's free tier ran out of daily requests and returned overload errors. I added retries, a fallback provider and a daily AI request cap, then moved the main load to Groq.
  • Messy AI output. The model sometimes wrapped JSON in extra text, so the backend strips it, parses it safely and validates the structure before saving anything.
  • Rate limits. A strict login limiter also covered the session check, which could log users out after a few page reloads. I moved that check to a normal limiter.
  • Deployment. Getting the frontend, backend and database to agree on addresses and CORS settings took more time than I expected. [Edit this line if your deployment story is different.]

What I learned

Building around a free AI quota means designing for failure: caps, fallbacks and validation matter as much as the prompt. I also learned how much a clear rules file for an AI coding assistant improves the quality and consistency of what it builds.

What's next

  • Edit a plan or regenerate a single day
  • Email or phone reminders for the day's tasks
  • Urdu and other languages for explanations
  • Upload notes and get a summary and questions from them

Built With

Share this project:

Updates

Submission history