🚀 Live Site: https://smart-study-assistant-taupe.vercel.app/
Smart Study Assistant is an intelligent web application designed to help students optimize their learning experience. It allows users to write or upload study notes, automatically classify topics, generate concise summaries, take interactive practice quizzes, simplify complex ideas, and chat directly with their notes.
Powered by Next.js (App Router), Supabase (Auth, Database, and Row-Level Security), and OpenRouter AI models.
- Summarization: Condenses extensive notes into structured markdown summaries and key bullet points.
- Interactive Quizzes: Generates dynamic Multiple Choice and Short Answer practice questions. Answers are checked in real-time with instant validation and comparisons.
- Feynman Explanation: Simplifies complex terms, physics concepts, or mathematical formulas using easy-to-understand analogies.
- Contextual Note Chat: A dedicated sidebar chat interface to query and discuss the contents of study notes.
- Automatic Topic Tagging: Automatically classifies document contents into core academic subjects (Biology, Physics, Chemistry, Mathematics, Computer Science, History, Literature, Economics, or Other).
- PDF & Document Parsing: Extracts text from PDF, TXT, DOC, and DOCX documents with robust binary stream parsing and a 10MB safety boundary.
- Saves vs. History Separation: Restructures documents into static verified files (My Notes) and dynamic search sessions (History).
- Smart Syncing: Automatically auto-saves generation runs to history while avoiding duplication. The "Save" button updates existing history files instead of cluttering the database.
- Row-Level Security (RLS): Enforces table isolation in PostgreSQL ensuring data is strictly private to the authenticated owner.
- Forgot Password Recovery: Secure PKCE flow utilizing server-side routing handlers to exchange codes for auth sessions and update credentials.
- Password-Authenticated Deletion: Deleting accounts requires password verification and triggers a cascading wipe of all associated files and configurations.
- Adaptive Dark Mode: Sleek slate-charcoal interface with glowing violet highlights, powered entirely by CSS variables to prevent Server-Side Rendering (SSR) hydration flashes.
- Symmetrical Layout: Balanced layout matching the heights of the note workspace and the AI Results panel on desktop screens.
- Custom Favicon & Branding: Professional custom BookOpen browser favicon replacing default Next.js templates.
- Frontend: Next.js 15 (App Router, React 19), Tailwind CSS
- Database & Authentication: Supabase (PostgreSQL, GoTrue, Row Level Security)
- AI Cognitive Processing: OpenRouter API (utilizing free-tier LLM models)
- File Processing:
pdf-parse
Ensure you have Node.js installed (v18.x or higher is recommended).
Create a .env.local file in the root of the project with the following configuration:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key
# AI Provider Configuration
OPENROUTER_API_KEY=your-openrouter-free-api-keyExecute the SQL scripts inside supabase/schema.sql within your Supabase project's SQL editor to set up the necessary tables, policies, triggers, and RPC functions.
npm installnpm run devOpen http://localhost:3000 in your browser to view the application.
To compile and optimize the application for production deployment, run:
npm run buildTo preview the built production site locally, run:
npm run startThe application is fully compatible with Vercel out of the box:
- Push the code repository to GitHub, GitLab, or Bitbucket.
- Go to the Vercel Dashboard and click Add New Project.
- Import the repository.
- Input the environment variables (from
.env.local) in Vercel's Environment Variables configuration. - Click Deploy. Vercel will bundle the codebase and host it on HTTPS.