The Unified, AI-Powered Student Dashboard & Revision Hub.
AI StudyOS is a highly optimized, premium study dashboard designed to centralize textbook materials, automate active-recall study tasks, and schedule exam preparation timelines.
It pairs a structured course hierarchy (Dashboard → Semester → Subject → Chapter) with on-device text parsing, local similarity vector searches (RAG), spaced-repetition algorithms, and generative AI APIs (Gemini & Groq).
- 📁 Structured Course Manager: Inline creation and deletion trees for semesters, subjects, and topics—persisted directly on navigation.
- 📄 CORS-Resilient PDF Parsing: On-device, client-side PDF text extraction using a Same-Origin local Web Worker bundle (
pdfjs-dist). - 📸 WASM-Based Scan OCR: Pure-JS character recognition of hand-written note snapshots or whiteboards using
tesseract.jsweb workers. - 🧠 Spaced Repetition (SM-2): Recall master decks utilizing the SuperMemo-2 (SM-2) algorithm to calculate next-review intervals and ease factors based on recall difficulty ratings (Forgot, Hard, Good, Easy).
- 📝 AI Summaries & Notes: Generates structured markdown notes, definitions, formulas, and bulleted takeaways.
- 🎯 Challenge Quizzes: Dynamic multiple-choice questions with plausible distractor options, immediate correctness scoring, and rationale explanations.
- 💬 Client-Side RAG Chat: Ask questions directly referencing your files. Runs local TF-IDF tokenization and Cosine Similarity vector matching to rank and retrieve context chunks, feeding them to the AI models.
- 📅 Monthly Revision Planner: Color-coded calendar events separating exams (red), homework assignments (orange), and spaced-repetition reviews (blue), complete with manual event creation forms.
- 🌓 HSL-Based Dark/Light Themes: Responsive, glassmorphic layout system with anti-flicker blocker scripts to detect and paint theme preferences instantly.
AI StudyOS is engineered with a zero-dependency fallback layer to allow immediate testing without requiring API keys or cloud databases:
- 🔑 API Mode (Live AI & Cloud):
When
GEMINI_API_KEYorGROQ_API_KEYis present in.env.local, the serverless routes invoke Gemini 2.5 Flash (or Llama 3 on Groq) to generate summaries, quizzes, and chat responses. Data can also sync to Supabase. - 📴 Fallback Heuristic Mode (Free & Offline):
If API keys are missing, the system activates custom client-side NLP regex parsers. It analyzes your PDF text, extracts sentences matching definition patterns (e.g.
is,are,refers to,occurs when), and automatically compiles them into formatted study guides, active recall card decks, and distractors. Database data falls back tolocalStorage.
- Frontend: Next.js (App Router, TypeScript, React 19)
- Styling: Vanilla CSS (HSL Custom Properties, Glassmorphism, CSS 3D Transforms)
- Icons: Lucide React
- PDF Extraction: PDF.js (v4.10.38 with locally hosted worker script)
- Scan OCR: Tesseract.js (WASM)
- AI Orchestration: Google Generative AI SDK (
gemini-2.5-flash), Groq SDK (llama3-8b-8192) - Database Fallback: LocalStorage (seeded with sample curriculum data) / Supabase
Make sure you have Node.js (v18.0 or higher) and npm installed.
Clone the repository and install the dependencies:
git clone https://github.com/YOUR_USERNAME/AI_StudyOS.git
cd AI_StudyOS
npm installCopy the environment variables template and add your API keys:
# Rename the placeholder configuration file
copy .env.local.example .env.localOpen .env.local and paste your Google AI Studio or Groq developer keys:
GEMINI_API_KEY=your_gemini_key_here
GROQ_API_KEY=your_groq_key_hereStart the Next.js development server:
npm run devOpen http://localhost:3000 in your browser.
Compile the application for production hosting:
npm run build
npm run start