Inspiration

Right before quizzes and semester exams, students spend more time hunting through WhatsApp groups, phone galleries, Google Drive folders, and scattered notebooks than actually studying. We wanted to build StudyBuddy — a single, calm, AI-powered workspace where every lecture, handwritten note, slide, and past-paper question lives under the right subject and chapter, and can be turned into summaries, quizzes, and flashcards in seconds.

What It Does

StudyBuddy is a full-stack learning management and exam-prep platform designed for Students and Teachers:

  • Structured Study Workspace: Organize materials hierarchically (Class → Subject → Chapter → Categorized Files: Lectures & Notes, Handwritten Notes, Slides, and Important Questions).
  • Teacher & Student Classrooms: Teachers create classes with unique Join Codes, and students join with one click to access shared course subjects and materials.
  • AI File Summarizer: Click Summarize on any uploaded PDF or image to get a structured breakdown (Overview, Key Takeaways, Important Concepts, and Quick Exam Tips) powered by Google Gemini and cached in Redis.
  • AI Quiz & 3D Flashcards Generator: Generate MCQs, Open-Ended Questions (with an AI Study Assistant for follow-up doubts), or Interactive 3D Flip Flashcards with mastery tracking — either from a whole chapter, a specific file/topic inside a chapter, a direct PDF upload, or a custom prompt.
  • Smart Exam Prep & Focus Timer: Pick multiple exam chapters to gather every relevant note, slide, and question into one filterable view, complete with a built-in Pomodoro Focus Timer (25m / 5m / 15m) and session counter.
  • Study Planner & Analytics: Track upcoming vs. completed tasks and monitor quiz completion rate, average score, and best score on the dashboard.

How We Built It

  • Frontend: React 19, Vite, Tailwind CSS, React Router v7, Axios, Lucide React, AOS animations, and React Toastify (deployed on Netlify).
  • Backend: Node.js & Express v5 (deployed on Vercel serverless functions).
  • Database & Aggregation: MongoDB with Mongoose .lean() queries and aggregation pipelines ($match, $group, $lookup, $project) for fast dashboard and quiz analytics.
  • Caching Layer: Upstash Cloud Redis (ioredis) caching subjects, chapters, materials, joined classes, quiz history, task/quiz stats, AI summaries, and flashcards — with a resilient automatic MongoDB fallback if Redis is ever unreachable.
  • AI Engine: Google Gemini API (@google/generative-ai) with a multi-model fallback chain (gemini-3.5-flash-lite, gemini-flash-lite-latest, gemini-3.8-flash) to handle high-demand spikes.
  • Cloud File Storage: ImageKit with disk-to-stream uploads for large PDFs and base64 uploads for profile avatars.

Challenges We Ran Into

  1. Resilient Cloud Caching in Serverless: In production on Vercel, if Redis was temporarily unreachable or cold-starting, unhandled cache errors would fail entire API requests. We built a safe Redis wrapper that cleanly falls back to MongoDB without breaking user flows, and added targeted cache invalidation across actions like joining/leaving classes and updating tasks.
  2. File Streaming & ImageKit SDK Compatibility: Large study PDFs risked high server RAM usage, while avatar buffer uploads failed with @imagekit/nodejs v7. We solved both by streaming study materials from temporary disk storage (fs.createReadStream) and encoding avatar buffers properly before upload.
  3. Granular AI Generation & MIME Normalization: Different files in ImageKit returned varying Content-Type headers (e.g., ; charset=utf-8 or application/octet-stream), and chapters often held multiple distinct topics. We added MIME normalization for Gemini inlineData and enabled per-file (materialId) selection in the Quiz, Flashcard, and Summarizer flows.
  4. Mobile Navigation UX: On mobile, swiping back from the dashboard could land back on /login. Replacing history on login ({ replace: true }) and adding auth-aware redirects on /login and /signup made navigation seamless.

What We Learned

  • Designing cache-aside architectures with proper invalidation keys and graceful degradation so caching boosts speed without ever becoming a single point of failure.
  • Handling multimodal AI payloads (PDFs & images) reliably in production with structured JSON outputs and model fallbacks.
  • Building an end-to-end multi-role EdTech product that balances clean UI/UX with solid backend performance.

Accomplishments that we're proud of

  • Built a Complete, Production-Deployed EdTech Platform: Shipped a full-stack Student & Teacher workspace live on Netlify and Vercel with real authentication, classroom join codes, file uploads, and AI study tools.
  • Resilient Cloud Caching Architecture: Integrated Upstash Redis across dashboards, chapters, materials, AI summaries, and flashcards — with automatic cache invalidation and zero-downtime fallback to MongoDB.
  • Multimodal AI Learning Suite: Enabled students to summarize any specific PDF/note, generate targeted MCQs or 3D flip flashcards from individual chapter files, and ask follow-up questions via the AI Study Assistant.
  • Memory-Safe File Streaming & Analytics: Streamed large PDF uploads directly to ImageKit without exhausting server RAM, and used MongoDB aggregation pipelines to power real-time quiz and task analytics.
  • Clean, Responsive UX: Designed a cohesive, distraction-free interface with skeleton loaders, smooth animations, 3D flashcard flips, and a built-in Pomodoro focus timer for exam prep.

What's Next for StudyBuddy

  • AWS Cloud Integration: Migrating file storage to Amazon S3, email notifications to Amazon SES, and exploring Amazon Bedrock for scalable AI workloads.
  • Collaborative Study Rooms: Real-time peer study sessions and shared flashcard decks.
  • OCR Handwriting Search: Full-text indexing of handwritten notes so students can search inside uploaded photos.
Share this project:

Updates

Submission history