{"slug": "studybuddy-ai-transforming-messy-lecture-notes-into-interactive-quizzes-with", "title": "StudyBuddy AI: Transforming Messy Lecture Notes into Interactive Quizzes with Local Gemma Models", "summary": "A computer science student built StudyBuddy AI, an offline-first study companion that converts lecture notes in PDF, Markdown, or TXT form into interactive quizzes, 3D flashcards, and mock viva sessions using open-weight Gemma models served locally through Ollama. The full-stack app pairs a React 19 frontend with a Node-based parser and a JSON repair layer to keep model output usable, and requires no API keys or cloud inference.", "body_md": "As computer science students, my friends and I often find ourselves overwhelmed before semester exams and viva voce evaluations. We spend hours reading lengthy PDFs, scattered Markdown summaries, and messy lecture slides—wishing we had a dedicated tutor to quiz us, point out missing details, and conduct practice mock vivas.\n\nExisting cloud-based AI tools can generate quizzes, but they come with significant drawbacks for students:\n\nThis weekend, I built **StudyBuddy AI** for my friends and classmates to solve this exact problem: a **100% local, offline-first study companion** that turns any lecture note into interactive practice quizzes, 3D flashcards, and mock viva sessions using open-weight **Gemma** models.\n\n**StudyBuddy AI** is a full-stack, local-first web application designed to run seamlessly on a student's laptop without sending a single byte of data to the cloud.\n\n`gemma:2b`, `gemma2:2b`, or `gemma:7b`).\n\n```\n┌─────────────────┐       ┌─────────────────┐       ┌──────────────────┐\n│ 📄 Upload Notes │ ────> │ 🔍 Node Parser  │ ────> │ 🤖 Ollama / Gemma │\n│ (PDF / MD / TXT)│       │ & Text Cleaner  │       │   (Local Engine) │\n└─────────────────┘       └─────────────────┘       └────────┬─────────┘\n                                                              │\n                                                              ▼\n┌─────────────────┐       ┌─────────────────┐\n│ 📊 Interactive  │ <──── │ 🔧 Robust JSON  │ <───────────────┘\n│   React 19 UI   │       │   Repair Layer  │\n└─────────────────┘       └─────────────────┘\n```\n\nBuilding StudyBuddy AI on open-source foundations wasn't just a technical choice—it was essential to fulfilling the project's purpose:\n\n**Zero Financial Barriers for Students:** By leveraging Google's open-weight **Gemma** models running via Ollama, StudyBuddy AI delivers AI inference without requiring expensive API keys or recurring subscription fees. Any student with a compatible laptop can run smaller Gemma models locally.\n\n**Total Data Privacy:** Personal class notes, assignment solutions, and university materials can remain entirely on the user's local machine. No cloud-based AI service is required for inference.\n\n**True Offline Resilience:** University hostels, libraries, and remote areas often lack stable internet access. Because StudyBuddy AI executes inference locally through Ollama, students can study without depending on a continuous internet connection.\n\n**Resilience via Open Ecosystems:** If a proprietary AI API changes pricing, availability, or access requirements, cloud-dependent applications can be affected. Open-weight models give developers greater control over the AI layer of their applications.\n\nStudyBuddy AI relies on Google's **Gemma** family of open-weight models (`gemma:2b`, `gemma2:2b`, and `gemma:7b`) served locally via Ollama.\n\nIt uses structured prompts and JSON-oriented generation to transform unstructured student notes into:\n\nA JSON repair layer helps make model-generated responses more robust before they are consumed by the frontend.\n\nWant to run StudyBuddy AI locally on your machine?\n\nEnsure [Ollama](https://ollama.com/) is installed, then pull your preferred Gemma model.\n\nFor standard laptops, a smaller model such as `gemma2:2b` can be used:\n\n```\nollama pull gemma2:2b\n```\n\nYou can also use:\n\n```\nollama pull gemma:2b\n```\n\nor:\n\n```\nollama pull gemma:7b\n```\n\nStart the Ollama local server:\n\n```\nollama serve\n```\n\nClone the repository:\n\n```\ngit clone https://github.com/Babin123456/StudyBuddy_AI.git\ncd StudyBuddy_AI\n```\n\nInstall the frontend dependencies:\n\n```\nnpm install\n```\n\nInstall the backend dependencies:\n\n```\ncd backend\nnpm install\ncd ..\n```\n\nOpen two terminal windows.\n\n```\ncd backend\nnpm run dev\nnpm run dev\n```\n\nNavigate to:\n\nin your browser.\n\nDrag and drop your lecture notes and start preparing for your exams locally.\n\nThe complete workflow looks like this:\n\n```\n📄 Lecture Notes\n      │\n      ▼\n┌──────────────────────┐\n│ PDF / Markdown / TXT │\n└──────────┬───────────┘\n           │\n           ▼\n   🔍 Text Extraction\n           │\n           ▼\n   🧹 Text Cleaning\n           │\n           ▼\n   🧠 Structured Prompt\n           │\n           ▼\n   🤖 Gemma via Ollama\n           │\n           ▼\n   🔧 JSON Repair Layer\n           │\n           ▼\n   📊 React 19 Interface\n           │\n     ┌─────┼─────┐\n     ▼     ▼     ▼\n   Quiz  Cards  Viva\n```\n\nInstead of simply reading notes repeatedly:\n\n```\nRead → Highlight → Read Again → Forget → Panic\n```\n\nStudyBuddy AI turns the same material into an active learning workflow:\n\n```\nUpload Notes\n     ↓\nExtract Concepts\n     ↓\nGenerate Questions\n     ↓\nPractice\n     ↓\nIdentify Weak Areas\n     ↓\nReview\n     ↓\nPractice Again\n```\n\nThe goal is not to replace studying.\n\nThe goal is to make the material students already have **more interactive and useful for active recall**.\n\nStudyBuddy AI is designed around a local-first architecture.\n\nThe intended processing pipeline is:\n\n```\n┌─────────────────────────────────────┐\n│          Student's Computer         │\n│                                     │\n│   📄 Lecture Notes                  │\n│          │                          │\n│          ▼                          │\n│   🔍 Node.js Parser                 │\n│          │                          │\n│          ▼                          │\n│   🧹 Text Cleaner                   │\n│          │                          │\n│          ▼                          │\n│   🤖 Ollama + Gemma                 │\n│          │                          │\n│          ▼                          │\n│   🔧 JSON Repair                    │\n│          │                          │\n│          ▼                          │\n│   📊 React Interface                │\n│                                     │\n└─────────────────────────────────────┘\n\n          No required\n        cloud AI inference\n```\n\nThis means the application can be used without sending lecture notes to a remote AI provider for inference.\n\nLocal AI provides several practical advantages for a student-focused application.\n\nStudy materials can contain:\n\nKeeping inference local reduces the need to upload these materials to third-party AI services.\n\nRunning an open-weight model locally eliminates the need for a paid AI API for the core inference workflow.\n\nOnce the required software, dependencies, and models are installed, the application can continue operating without requiring a continuous internet connection.\n\nThe developer controls:\n\nStudyBuddy AI can transform lecture material into multiple-choice questions.\n\nEach question can include:\n\nThis allows students to immediately test their understanding.\n\nImportant concepts can be converted into interactive flashcards.\n\nThe interface uses smooth 3D animations to create a more engaging revision experience.\n\nA typical card contains:\n\n```\n┌─────────────────────────┐\n│                         │\n│       QUESTION          │\n│                         │\n│   What is a process?    │\n│                         │\n└─────────────────────────┘\n\n            ↓ Flip\n\n┌─────────────────────────┐\n│                         │\n│         ANSWER          │\n│                         │\n│ A program in execution. │\n│                         │\n└─────────────────────────┘\n```\n\nStudents can practice open-ended questions similar to those they might encounter during a viva.\n\nThe workflow is:\n\n```\nViva Question\n     ↓\nStudent's Answer\n     ↓\nModel Answer\n     ↓\nComparison\n     ↓\nIdentify Missing Concepts\n```\n\nThis encourages students to practice explaining concepts rather than simply recognizing correct answers.\n\n| Layer | Technology | \n|---|---|\n| Frontend | React 19 | \n| Build Tool | Vite | \n| Styling | Tailwind CSS v4 | \n| Animation | Framer Motion | \n| Icons | Lucide Icons | \n| Backend | Node.js | \n| API Framework | Express.js | \n| AI Runtime | Ollama | \n| AI Model | Google Gemma | \n| Document Inputs | PDF, Markdown, TXT | \n| Architecture | Local-first / Offline-first | \n\n| Traditional Cloud AI Workflow | StudyBuddy AI | \n|---|---|\n| Cloud AI service | Local AI inference | \n| Internet dependency | Offline-first design | \n| API keys may be required | No AI API key required | \n| Recurring API costs may apply | Local model usage | \n| Notes may be uploaded | Local processing | \n| General-purpose AI | Study-focused workflow | \n| Generic interaction | Quiz, flashcards & viva | \n\nFuture versions of StudyBuddy AI could include:\n\nThe long-term goal is to evolve StudyBuddy AI into a complete **private local AI study environment**.\n\nThe idea came from a simple observation:\n\n**Students already have the study material. What they often lack is an interactive way to practice it.**\n\nInstead of requiring students to upload their notes to another company's servers, StudyBuddy AI brings the AI directly to the student's machine.\n\nThat makes the project particularly useful for students who value:\n\nStudyBuddy AI follows three simple principles:\n\nStudents shouldn't need expensive subscriptions to experiment with AI-powered learning.\n\nA student's lecture notes shouldn't need to leave their computer simply to generate a quiz.\n\nOpen-weight models such as Gemma allow developers to experiment, build, modify, and integrate AI into applications without depending entirely on proprietary APIs.\n\n```\n┌───────────────────────────────────────────────┐\n│                 STUDYBUDDY AI                 │\n├───────────────────────────────────────────────┤\n│                                               │\n│  📄 Input                                     │\n│  PDF / Markdown / TXT                         │\n│                                               │\n│                  ↓                            │\n│                                               │\n│  🔍 Processing                                │\n│  Node.js + Express                            │\n│                                               │\n│                  ↓                            │\n│                                               │\n│  🤖 Intelligence                              │\n│  Ollama + Gemma                               │\n│                                               │\n│                  ↓                            │\n│                                               │\n│  🔧 Structured Output                         │\n│  JSON Repair / Validation                     │\n│                                               │\n│                  ↓                            │\n│                                               │\n│  📚 Learning                                  │\n│  Quiz + Flashcards + Viva                     │\n│                                               │\n│                  ↓                            │\n│                                               │\n│  🧠 Active Revision                            │\n│                                               │\n└───────────────────────────────────────────────┘\n```\n\nStudyBuddy AI started with a simple weekend challenge:\n\n**What if a student could have an AI study companion without sending their notes anywhere?**\n\nThe result is a local-first learning platform powered by open-weight Gemma models and Ollama.\n\nIt combines:\n\n**Open AI Models + Local Inference + Student Notes + Interactive Learning**\n\ninto one privacy-focused study workflow.\n\nThe bigger idea is simple:\n\n**AI should not always require the cloud.**\n\nFor students, developers, and privacy-conscious users, local AI can provide a practical alternative to cloud-only applications.\n\nBuilt with passion by **Babin Bid** for the **Hacktoberfest 2026 Weekend Challenge**.\n\nBecause every student deserves a **private, offline, and accessible AI study companion.**", "url": "https://wpnews.pro/news/studybuddy-ai-transforming-messy-lecture-notes-into-interactive-quizzes-with", "canonical_source": "https://dev.to/babin_bid_123/studybuddy-ai-transforming-messy-lecture-notes-into-interactive-quizzes-with-local-gemma-models-55gl", "published_at": "2026-10-02 21:26:13+00:00", "updated_at": "2026-10-02 21:37:30.278632+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "generative-ai", "ai-products", "developer-tools"], "entities": ["StudyBuddy AI", "Gemma", "Ollama", "Google", "React 19", "Node.js", "GitHub"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/studybuddy-ai-transforming-messy-lecture-notes-into-interactive-quizzes-with", "markdown": "https://wpnews.pro/news/studybuddy-ai-transforming-messy-lecture-notes-into-interactive-quizzes-with.md", "text": "https://wpnews.pro/news/studybuddy-ai-transforming-messy-lecture-notes-into-interactive-quizzes-with.txt", "jsonld": "https://wpnews.pro/news/studybuddy-ai-transforming-messy-lecture-notes-into-interactive-quizzes-with.jsonld"}}