DEV Community

Cover image for StudyMate AI: Your Notes, Your Tutor, Your Study Companion
J Sai Vardhan
J Sai Vardhan

Posted on

StudyMate AI: Your Notes, Your Tutor, Your Study Companion

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

StudyMate AI — A Study Companion Built for a Friend Who Was Always Running Out of Time

What I Built

I built StudyMate AI, a personalized AI study companion for a friend who was constantly juggling lectures, assignments, and exams — especially when there was too much material to revise and not enough time.

The problem wasn't a lack of study material. It was not knowing what to study next.

StudyMate turns a student's own lecture PDFs and notes into an interactive study companion.

You can:

  • Upload lecture notes and PDFs.
  • Ask questions grounded in your own study material.
  • Choose different learning modes, including Quick, 2-Mark, 5-Mark, and 10-Mark answers.
  • Use Teach Me mode to learn concepts step by step.
  • Generate quizzes and MCQs from uploaded material.
  • Track performance and identify weak topics.
  • Generate a personalized study plan.
  • Use Last-Minute Rescue before an exam to focus revision on important material and weak areas.

The idea was simple:

Instead of giving a student another generic AI chatbot, give them an AI tutor that actually studies their notes with them.

I built it around a real student problem: "I have all my notes, but I don't know what to revise first."

Demo

Live Demo:
https://studymateai-fea9.onrender.com/

Source Code:
https://github.com/saivardhan1245/StudyMateAI

How I Built It

The core of StudyMate is Gemma, Google's open-weight model.

I wanted the project to use an open-weight model as a real part of the application rather than simply wrapping a generic chatbot.

The architecture is:

Student → React + Vite Frontend → Express + TypeScript Backend → PDF Processing → Hybrid Retrieval → Relevant Study Material → Gemma → Grounded Study Response

Grounded Study Chat

When a student asks a question, StudyMate retrieves relevant sections from their uploaded material before generating the response.

The retrieval layer uses:

  • PDF.js page-level text extraction
  • 256-dimensional normalized feature-hashing embeddings
  • BM25-style lexical scoring
  • User-scoped document retrieval
  • Relevance filtering
  • Page-level provenance

This allows the application to use the student's own study material as the context for AI-generated answers.

If there are no uploaded documents or no relevant material can be found, StudyMate prevents the normal grounded response flow instead of pretending that the answer came from the student's notes.

Learning Modes

Quick — concise answers for fast revision.

2-Mark / 5-Mark / 10-Mark — answers structured for different academic answer lengths.

Teach Me — explains concepts step by step.

Practice — generates MCQs and tracks performance.

Study Plan — organizes revision based on study material and progress.

Last-Minute Rescue — combines available study material, exam timing, and weak areas into a focused revision session.

Technology

Frontend

  • React
  • TypeScript
  • Vite
  • Tailwind CSS
  • Motion

Backend

  • Node.js
  • Express
  • TypeScript
  • PDF.js
  • JWT authentication
  • bcrypt

AI

  • Gemma open-weight model
  • Google GenAI SDK

Database

  • MongoDB Atlas

Deployment

  • Render

Why Does Open Innovation Matter?

For StudyMate, open innovation isn't just about choosing a different model. It is about having more control over how the AI becomes part of the product.

A closed AI API can provide a powerful general-purpose chatbot, but StudyMate needs something more specific: an AI tutor where the student's own material becomes the foundation for the interaction.

Using an open-weight model such as Gemma gives me the flexibility to build my own retrieval and grounding layer around the model and control how it is used inside the application.

It allows me to:

  • Choose how the model is integrated into the application.
  • Build my own retrieval and grounding workflow.
  • Control the study experience instead of handing the entire experience to a black-box chatbot.
  • Experiment with different models and inference approaches as the project evolves.
  • Keep the application architecture independent from a single closed AI provider.

The important part is that Gemma is not just included for the sake of using an open model.

It is part of the actual study-generation workflow. StudyMate retrieves relevant content from the student's documents and provides that context to Gemma to generate the learning response.

That makes the open model part of the product's core architecture rather than an afterthought.

Prize Categories

I am entering the following categories based on technologies actually used in StudyMate:

  • Best Use of Gemma
  • Best Use of Render
  • Best Use of MongoDB Atlas

    #devchallenge #weekendchallenge #hf26challenge

Top comments (0)