DEV Community

Cover image for Notes Study
Sukhjit Singh
Sukhjit Singh

Posted on

Notes Study

What I Built

The Story: Building for My Friend

A few weeks ago, I watched my close friend sit at a university library desk surrounded by 60-page PDF lecture slides, handwritten margin notes, and textbook extracts, preparing for grueling semester exams.

Like many students, my friend was caught in the trap of the fluency illusionβ€”passively re-reading highlighted lecture decks until the words felt familiar, only to draw a blank when facing an empty exam paper. When they tried using mainstream cloud AI chatbots to generate revision questions, three major frustrations quickly surfaced:

  1. Hallucinations & Disconnect from the Syllabus: Generic chatbots frequently answered with facts or definitions outside their professor's course scope, confusing them right before exam day.
  2. Privacy & Coursework Restrictions: My friend was uncomfortable (and university honor codes discouraged) pasting proprietary lecture notes, unreleased research handouts, and assignment drafts into commercial, closed-source cloud AI platforms that retain user data for retraining.
  3. Paywalls & Cloud Reliance: Cloud AI tools charge steep monthly subscriptions that student budgets can't maintainβ€”and in the basement of the university library where Wi-Fi drops, cloud tools become completely useless.

I built Study From My Notes to solve this exact problem: a distraction-free, local-first study workspace that transforms a student's own documents into an active-recall revision experience, powered 100% on their own machine by open-weight AI.


What It Does

Study From My Notes does not just passively summarize documents. It actively coaches the student to understand, memorize, and test themselves strictly against the text they provide:

  • πŸ“„ In-Browser Document Extraction & Quality Auditor: Drag-and-drop PDFs, .txt, or .md files. Extracted text is processed entirely in the browser using pdfjs-dist, preserving page numbers and word counts. A built-in Quality Auditor detects scanned/empty pages and lets students inspect and correct raw text page-by-page.
  • πŸ’‘ Explain My Notes (6 Pedagogical Modes): Explains challenging passages in six distinct learning frameworks:
    • Simple Language (Feynman Technique): Translates dense jargon into plain, intuitive analogies.
    • Step by Step: Deconstructs multi-stage processes sequentially.
    • Practical Analogy: Connects theoretical models to everyday situations.
    • Compare & Contrast: Sharpens distinctions between easily conflated concepts.
    • Exam Model Answer: Structures responses with thesis, evidence, and conclusion.
    • Socratic Challenge: Tests comprehension by asking probing follow-up questions.
  • πŸ” Ask My Notes (Zero-Hallucination Q&A): Grounded question answering that delivers confidence indicators, relevance scores, and clickable page citations that jump straight to the source passage in the reader.
  • πŸ—‚οΈ Tactile Active Recall Flashcards: Interactive 3D flip cards with Leitner/SuperMemo-inspired spaced repetition ratings (Again, Hard, Good, Easy) and full keyboard navigation (Space to flip, 1-4 to rate).
  • 🎯 Diagnostic Quizzes & Instant Feedback: Generates multiple-choice and True/False questions with plausible distractors. Every explanation quotes the supporting passage from the student's notes verbatim.
  • πŸ”„ Smart Revision Queue: Automatically logs missed quiz questions and difficult flashcards into a focused review queue, so my friend can drill their weakest concepts in a one-click "Retry Missed Questions" flow.

Demo

Experience the live application or run it locally in under a minute:

How to Run Locally with Ollama:

# 1. Clone the repository
git clone https://github.com/the-sukhsingh/notes-study.git
cd notes-study

# 2. Install dependencies & run development server
npm install
npm run dev

# 3. (Optional) Run with local open-weight models via Ollama
ollama run llama3.2
Enter fullscreen mode Exit fullscreen mode

Open http://localhost:3000. The app automatically detects Ollama at http://localhost:11434, or you can toggle the built-in deterministic offline engine with zero setup!


Code

The entire codebase is open source under the MIT License.

Repository: https://github.com/the-sukhsingh/notes-study

Tech Stack:

  • Frontend: Next.js 16 (App Router), React 19, TypeScript
  • Styling & Motion: Tailwind CSS v4, Motion (Framer Motion), Apple-inspired minimalist design tokens
  • PDF Processing: pdfjs-dist (100% client-side text extraction)
  • Local State & Storage: Browser localStorage with full JSON backup & restore

How I Built It

Dual AI Architecture

To ensure my friend could study anywhereβ€”from high-performance home desktops to low-spec library laptops without an internet connectionβ€”I engineered a Dual AI Architecture:

                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚          Student Study Material        β”‚
                  β”‚         (PDFs / Notes / Slides)        β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                      β”‚
                         Client-side PDF Extraction
                         & Page-by-Page Audit Loop
                                      β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β–Ό                                   β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚   Ollama Local LLM    β”‚           β”‚   Built-In Offline    β”‚
        β”‚      (Open Weights)   β”‚           β”‚      NLP Engine       β”‚
        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€           β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
        β”‚ β€’ Llama 3.2 / Mistral β”‚           β”‚ β€’ 100% Client-Side    β”‚
        β”‚ β€’ Structured JSON     β”‚           β”‚ β€’ Zero Dependencies   β”‚
        β”‚ β€’ Page-by-Page chunks β”‚           β”‚ β€’ Deterministic Closesβ”‚
        β”‚ β€’ Rich Feynman Logic  β”‚           β”‚ β€’ TF-IDF Term Ranks   β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Enter fullscreen mode Exit fullscreen mode
  1. Local Open-Weight Model Integration (Ollama):

    • The app communicates directly with a local Ollama daemon (http://localhost:11434).
    • Supported open-weight models include Meta's Llama 3.2, Mistral, Phi-3, and Qwen 2.5.
    • To prevent malformed responses, the app enforces Structured Outputs (format: 'json') with strictly typed Zod/TypeScript schemas.
    • Document passages are chunked page-by-page so the model always receives exact page boundaries, allowing it to cite verbatim excerpts and precise page numbers without hallucination.
  2. Deterministic Built-In Offline Engine:

    • For friends studying on lightweight laptops without local LLM capabilities or GPU acceleration, I built an extractive natural-language processing engine directly into the TypeScript bundle.
    • It uses rule-based clause extraction, sentence tokenization, and TF-IDF term scoring to generate valid flashcards, Feynman-style summaries, and diagnostic multiple-choice questions without any external network request or LLM installation.
  3. Local-First Privacy & Zero Telemetry:

    • Notes never touch an external server. Everythingβ€”extracted pages, generated flashcard decks, quiz score histories, and SRS intervalsβ€”is persisted in the browser's localStorage.
    • Complete data sovereignty: students can export their entire study deck as a portable JSON backup and wipe their local state with a single click.

Why Does Open Innovation Matter?

This project directly embodies the ethos of open innovation and open-weight AI:

  • Data Sovereignty & Academic Privacy: Proprietary university syllabi, medical lecture slides, and personal student notes should belong to the student. Closed APIs require sending sensitive data to external servers where it can be logged, analyzed, or retained. Open-weight models running locally guarantee complete privacy.
  • Eliminating the Economic Barrier to Education: Premium cloud AI subscriptions ($20/month) create an inequitable divide between students who can afford AI-assisted learning and those who cannot. Open-weight models like Llama 3.2 running on free tools like Ollama democratize high-level active recall for every student with a laptop.
  • True Resilience & Offline Accessibility: Closed APIs fail the moment campus Wi-Fi throttles or internet access goes down. Open innovation ensures tools work on a train, in a flight, or in a Wi-Fi-dead library basement.
  • Inspectable, Controllable Intelligence: With closed APIs, providers can stealthily modify system prompts, alter model guardrails, or deprecate models without warning. With open weights, we can inspect prompt dynamics, constrain temperatures, fine-tune specific study behaviors, and verify that citations are strictly grounded in truth.

Prize Categories

  • Hacktoberfest Overall Challenge: Build for a Friend

(Note: While this project emphasizes 100% local-first client & Ollama inference, the web application can also be deployed to partner runtimes such as Render).


Top comments (0)