This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
StudyMate Offline: A Privacy-First AI Study Companion That Works Without Internet ๐
What I Built
I built StudyMate Offline, a privacy-first AI study companion, designed specifically for a college friend who has a daily two-hour commute with dead cell service and frequently studies in our campus library's basement where Wi-Fi drops out.
Like many students, they faced three major barriers with existing AI study tools:
- Connectivity barriers: Cloud study tools break down the second you lose Wi-Fi on a train, flight, or in a basement study room.
- Academic privacy risks: Discomfort with uploading private lecture materials, draft assignments, and thesis research to third-party commercial AI clouds where data can be logged or scraped.
- Access costs: Expensive \$20โ\$40/month subscriptions that students simply cannot afford.
StudyMate Offline addresses these challenges by bringing AI-powered study assistance directly to the student's personal computer.
It allows students to:
- Upload and organize lecture notes (PDF and text files).
- Search documents using semantic similarity powered by local vector embeddings.
- Ask questions and receive explanations strictly grounded in their course notes.
-
Inspect verifiable source citations (
[Source 1]) linked directly to exact text snippets. - Generate practice MCQs with instant grading and explanatory rationales.
- Create personalized study plans calibrated to exam dates and available daily hours.
Its core mode runs 100% locally via Ollama using lightweight open-weight models (llama3.2:3b and nomic-embed-text). After downloading the models once, the entire study experience operates with airplane mode enabledโzero internet required.
The philosophy is simple: Your study materials should remain yours, and learning should never stop when the Wi-Fi does.
Demo
- Live Cloud Preview: https://studymate-offline.onrender.com
- Judges' 5-Minute Local Reproduction Guide: docs/JUDGES_REPRODUCTION_GUIDE.md
(Note: The hosted Render preview features an automatic cloud AI fallback so judges can test it online 24/7. The full, 100% offline, zero-data-transmission experience is demonstrated through the local setup guide).
Code
rudrarajsinh920
/
studymate-offline
A privacy-first, locally runnable AI study companion for students (100% offline RAG with Ollama)
StudyMate Offline ๐
A privacy-first, locally runnable AI study companion for students.
Grounded document Q&A with source citations, semantic vector search, practice quiz generation, and adaptive study planning powered entirely by local open-source models (Ollama).
100% offline. Zero cloud data transmission. Zero subscription fees.
๐ Table of Contents
- Problem Statement
- Solution & Target Users
- Key Features
- Technology Stack
- Architecture Overview & Mermaid Diagram
- How Local AI & Offline Functionality Work
- Supported Document Formats
- Prerequisites & System Requirements
- Fresh Local Setup & Installation Commands
- How to Run Frontend, Backend, and Ollama
- Automated Verification & Testing
- Privacy Guarantees & Technical Limitations
- Deployment Feasibility Assessment
- Hackathon Judging & Demonstration Resources
- License
๐จ Problem Statement
Modern students and researchers rely heavily on digital learning aids, but current AI study assistants suffer from severe structural flaws:
- Academic Surveillance & Privacy Insecurity: Commercial cloud LLMs retain, inspect, and train on uploaded user documents. Students uploading proprietaryโฆ
- GitHub Repository: https://github.com/rudrarajsinh920/studymate-offline
- License: MIT Open Source
- Architecture: TypeScript monorepo with React frontend, Express backend, SQLite storage, and local Ollama inference.
How I Built It
StudyMate Offline is engineered for edge execution on consumer-grade laptops without discrete GPUs:
AI Models & Runtime
- Meta's Llama 3.2 (3B): Run via Ollama for conceptual explanations, study planning, and quiz generation.
- Nomic Embed Text: Generates 768-dimensional embeddings for high-precision semantic document retrieval.
Technology Stack
- Frontend: React 18, TypeScript, Vite, Tailwind CSS, Lucide React
-
Backend: Node.js, Express, TypeScript, Multer,
pdf-parse - Database: SQLite (WAL mode) for document chunks, binary vector BLOB caching, chat sessions, and quiz attempts
- AI Runtime: Ollama (Local) with optional Gemini Flash fallback for 24/7 cloud hosting
Key Engineering Features
- Grounded Retrieval-Augmented Generation (RAG): The system retrieves relevant document excerpts and strictly constrains model context before generating answers.
-
Source Transparency: Answers feature inline
[Source N]citations that allow students to verify the exact source passage in their notes. -
Honest Refusal Guardrails: When relevant evidence is missing from the uploaded notes, the tutor explicitly declines to answer (
insufficientEvidence: true) instead of hallucinating false facts. - Context & Token Budgeting: Enforces concise response budgets (256โ512 tokens) and top-$k$ filtering to keep CPU inference times under ~30 seconds on standard laptops.
- 100% Test Coverage: Verified with 18/18 milestone integration tests and 10/10 automated system audit workflows passing.
Why Does Open Innovation Matter?
Open innovation made the core concept of StudyMate Offline possible:
- Privacy & Data Ownership: Students process personal academic materials locally instead of surrendering their data to commercial AI providers.
- Accessibility & Equity: Open-weight models democratize AI education, eliminating the need for expensive monthly subscriptions.
- Uninterrupted Learning: Learning shouldn't depend on network stability or cloud server uptime.
- Freedom to Customize: Open model ecosystems allow developers to tailor inference and prompts directly to student needs and laptop hardware.
- Trust Through Transparency: Verifiable citations prevent students from blindly trusting generic AI outputs during high-stakes exam prep.
Open innovation is not just about free softwareโit enables developers to build technology around the real-world constraints of everyday students.
Prize Categories
- Best Overall "Build for a Friend" Project
- Best Use of Open-Source / Open-Weight AI
Top comments (0)