AI-powered class management built with Next.js App Router, NextAuth, Prisma, and Groq.
- Authentication with custom
/signinand/signuppages- Email/password credentials login
- Optional Google OAuth login when env vars are configured
- Auto user creation for OAuth users with unique username generation
lastLoginAtandlastSeenAttracking
- Persistent app shell
- Shared sidebar + header layout across pages
- Profile menu with sign-out
- Theme toggle (light/dark) persisted to DB + local storage
- Timezone sync from browser to user profile
- Class management
- Create class
- List classes (sidebar + home)
- Delete class
- Set/adjust current week (1–20) for weekly schedule generation
- Personal notes per class (create, edit, delete)
- Document pipeline
- Upload class documents (
pdf,docx,doc) up to 10MB - Blob storage upload via Vercel Blob
- Server-side text extraction (PDF via
pdfjs-dist, DOCX viamammoth) - Timeout guardrails for blob fetch + extraction to avoid stuck processing
- Resilient PDF extraction with invalid-page early stop and reduced warning noise
- Document status lifecycle:
pending -> processing -> done/failed - Original blob reference cleared after extraction (
storageKeyset tonull) - Document delete API + class-scoped document list UI (ready docs shown)
- Unified uploader-owned loading state until processing completes
- Upload class documents (
- AI class chat (
/api/chat)- Uses only authenticated user + selected class documents
- Optional inclusion of class personal notes in AI context
- Native Groq SDK streaming call with model from
GROQ_CHAT_MODEL(fallback:llama-3.3-70b-versatile) - Chat tuning via env:
GROQ_CHAT_TEMPERATURE,GROQ_CHAT_REASONING_EFFORT - Daily usage quotas (per-user + global) enforced in DB
- Source filename attribution streamed via end-of-response metadata marker
- Lecture-note resource curation (
/api/resources)- Analyzes uploaded lecture notes for a class and extracts a primary concept title
- Returns exactly 3 curated external learning resources when quality gates pass
- Restricts to trusted educational sources and strict JSON output shape
- Weekly schedule dashboard
- AI-generated “This week” + “Upcoming” cards from schedule/syllabus text
- Schedule tuning via env:
GROQ_SCHEDULE_TEMPERATURE,GROQ_SCHEDULE_REASONING_EFFORT - Week cache persisted in
WeekScheduletable with fingerprints - Auto week rollover via Sunday boundary based on
currentWeekSetAt - Primed after schedule/syllabus processing and when current week is updated
- Optional refresh endpoint for cron-based precompute of next week
/- landing page or chat hub (if signed in and classes exist)/home- same Home entry behavior as//signin- sign in/signup- sign up/classes/new- create class + upload initial docs/classes/[id]- class details, documents, weekly dashboard
GET /api/auth/[...nextauth]POST /api/auth/[...nextauth]GET /api/classes- list classes for session userPOST /api/classes- create classDELETE /api/classes- delete class by idPATCH /api/classes- update classcurrentWeek(+ anchor timestamp)GET /api/documents?classId=...- list documents (optional class filter)POST /api/documents- upload + process documentDELETE /api/documents- delete document by idGET /api/documents/[id]- get single owned documentPOST /api/chat- class-scoped AI Q&APOST /api/resources- curated external learning resources from class lecture notesGET /api/notes?classId=...- list notes for owned classPOST /api/notes- create class notePATCH /api/notes- update class noteDELETE /api/notes- delete class notePOST /api/schedules/refresh- precompute next-week schedules (cron-friendly)
- Next.js 16 (App Router)
- React 19
- TypeScript
- NextAuth v5 beta
- Prisma 7 + PostgreSQL
- Vercel Blob
- Groq SDK
- Authorization is enforced in API routes using
auth()+ ownership checks. - Chat context is built only from
Documentrows matching(userId, classId, status=done). - Daily quota windows are timezone-aware for users and UTC-based globally.
- Schedule uploads can trigger week verification UI to set the class current week.
- Weekly schedule records are fingerprinted to avoid unnecessary regeneration.
- Fix weekly recommendations
- Improve recommendation relevance, ranking, and consistency across weeks.
- Add a calendar page
- Introduce a unified calendar view for class schedule items.
- Combined all-classes calendar system (post-beta)
- Expand the calendar into a single system that aggregates all class timelines in one place.
- Phone-friendly chat and class experience
- Improve responsive layout and controls for mobile screens.
- Token usage visibility in chat UI
- Show per-message output token usage and daily usage feedback in the interface.
- Chat UI polish
- Improve message spacing, readability, and interaction flow.
- Chat response quality improvements
- Improve prompts/context handling for clearer, more accurate answers.
- Auto-detect current week from document dates
- Remove manual “what week are you in?” step and infer week from syllabus/schedule date anchors.
- Open uploaded files directly in the app
- Let users view submitted files from the website without leaving the product.
- Lecture notes ingestion + readability pass
- Upload lecture notes and auto-convert into cleaner, easier-to-read study notes.
- Study material generation from lecture content
- Generate quiz questions and flashcards from uploaded lecture materials.
- Personal notes support
- Improve notes editing experience and discoverability in class view.
- Weekly web resource recommendations
- If syllabus/schedule includes highlighted weekly topics, scan the web for helpful supporting resources.
- Return curated links/summaries tied to the current week’s material.