AI-Powered Study Tool for Students
LectureLens transforms your lecture recordings and transcripts into comprehensive study materials using AI. Upload your lectures and get instant topic breakdowns, flashcards, practice questions, and intelligent Q&A capabilities.
Current Status: Backend processing complete (Milestone 1.1) | Frontend auth & UI in development
- Secure Authentication - User signup/signin with Supabase Auth
- Lecture Upload - Upload and store lecture transcripts
- AI Topic Extraction - Automatic extraction of 5-8 main topics from lectures using GPT-4o-mini
- Semantic Chunking - Intelligent transcript chunking with vector embeddings
- Row-Level Security - Full RLS policies for data isolation
- Processing Pipeline - Edge function-based lecture processing with status tracking
- Complete auth UI with sign up/sign in forms
- Global auth context and protected routes
- Navigation component with responsive design
- Landing page with hero and CTAs
- Processing trigger integration in upload flow
- Dashboard with lecture status display
- Topic display in lecture detail views
- Topic navigation and exploration
- Inline topic editing
- Lecture management (edit, delete, reprocess)
- Loading states and error handling
- AI-generated flashcards per topic
- Interactive study mode with card-flip UI
- Custom flashcard creation
- Spaced repetition tracking (optional)
- Practice questions with step-by-step solutions
- Interactive quiz mode
- AI answer evaluation
- Custom question creation
- Semantic search across lectures
- RAG-powered Q&A (ask questions, get grounded answers)
- Search history tracking
- Citation links to source chunks
- AI-generated personalized study plans
- Calendar view with progress tracking
- Email reminders (optional)
- Study analytics
- Deployment to Vercel
- Error monitoring (Sentry)
- Analytics integration
- Performance optimization
- SEO & onboarding flow
βββββββββββββββββββ
β Next.js App β (React, TypeScript, TailwindCSS)
β Frontend β
ββββββββββ¬βββββββββ
β
ββββ Authentication (Supabase Auth)
β
ββββ API Routes (Next.js API)
β
βΌ
βββββββββββββββββββ
β Supabase β
β Backend β
βββββββββββββββββββ€
β β’ PostgreSQL β (Lectures, Topics, Chunks, Users)
β β’ Vector Store β (pgvector for embeddings)
β β’ Edge Funcs β (Deno-based processing)
β β’ Storage β (Future: audio files)
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β Vercel AI GW β
βββββββββββββββββββ€
β β’ GPT-4o-mini β (Topic extraction, flashcards, Q&A)
β β’ text-emb-3 β (Semantic search embeddings)
βββββββββββββββββββ
lectures- User-uploaded lectures with processing statuslecture_chunks- Semantically chunked transcript pieces with embeddingstopics- AI-extracted main topics from lectures
flashcards- Generated study flashcards per topicqa_pairs- Practice questions with solutionssearch_history- User Q&A interaction historystudy_plans- Personalized study schedulesstudy_sessions- Scheduled study blocks
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript, TailwindCSS v4 |
| Backend | Supabase (PostgreSQL, Auth, Edge Functions) |
| AI/ML | OpenAI GPT-4o-mini, text-embedding-3-small (via Vercel AI Gateway) |
| Vector DB | pgvector (Supabase extension) |
| Hosting | Vercel (app), Supabase (backend) |
| Dev Tools | ESLint, Prettier, Husky, TypeScript |
- Node.js 20+ and npm
- Supabase account (supabase.com)
- Vercel AI Gateway API key (vercel.com/ai)
git clone https://github.com/egekaya1/LectureLens.git
cd LectureLensnpm installCreate .env.local in the root directory:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SERVICE_ROLE_KEY=your-service-role-key
# Vercel AI Gateway
AI_GATEWAY_API_KEY=your-vercel-ai-gateway-keyHow to get these values:
- Supabase: Project Settings β API in Supabase Dashboard
- Vercel AI Gateway: Create API key at vercel.com/ai
npx supabase init
npx supabase link --project-ref your-project-refnpx supabase db pushThis creates:
lecturestable with RLS policieslecture_chunkstable with vector embeddingstopicstable- Necessary indexes and triggers
npx supabase functions deploy process-lectureSet edge function secrets:
npx supabase secrets set AI_GATEWAY_API_KEY=your-key
npx supabase secrets set SERVICE_ROLE_KEY=your-service-role-key
npx supabase secrets set NEXT_PUBLIC_SUPABASE_URL=your-urlnpm run devOpen http://localhost:3000 in your browser.
Navigate to /login and create an account using email/password.
# Navigate to /upload
# Enter a title and paste a transcript
# Click "Upload Lecture"# Get your lecture ID from the database
# Call the edge function manually:
curl -X POST https://your-project.supabase.co/functions/v1/process-lecture \
-H "Content-Type: application/json" \
-d '{"lectureId": "your-lecture-id"}'Check the database:
-- View lecture status
SELECT id, title, status, topic_count FROM lectures;
-- View extracted topics
SELECT title, summary FROM topics WHERE lecture_id = 'your-lecture-id';
-- View chunks with embeddings
SELECT chunk_index, content FROM lecture_chunks WHERE lecture_id = 'your-lecture-id';lecturelens/
βββ src/
β βββ app/ # Next.js app router
β β βββ page.tsx # Landing page (to be updated)
β β βββ layout.tsx # Root layout with providers
β β βββ globals.css # Global styles
β β βββ dashboard/ # Dashboard page
β β βββ login/ # Auth page (to be built)
β β βββ upload/ # Upload page
β βββ components/ # React components (to be added)
β β βββ AuthForm.tsx # (Planned) Auth UI
β β βββ Navbar.tsx # (Planned) Navigation
β β βββ TopicList.tsx # (Planned) Topic display
β βββ context/ # React context (to be added)
β β βββ AuthContext.tsx # (Planned) Global auth state
β βββ lib/
β β βββ supabaseClient.ts # Supabase client initialization
β βββ types/
β βββ supabase.ts # Generated TypeScript types
βββ supabase/
β βββ functions/
β β βββ process-lecture/ # Edge function for AI processing
β β βββ index.ts # Main processing logic
β β βββ deno.json # Deno config
β βββ migrations/ # Database migrations
β β βββ *_init_tables.sql
β β βββ *_add_user_id_to_lectures.sql
β β βββ *_add_processing_fields.sql
β β βββ *_create_lecture_chunks.sql
β β βββ *_create_topics.sql
β β βββ *_add_lectures_rls_policies.sql
β βββ config.toml # Supabase config
βββ public/ # Static assets
βββ package.json
βββ tsconfig.json
βββ next.config.ts
βββ tailwind.config.ts
βββ README.md
All tables have RLS enabled with policies ensuring:
- Users can only access their own data
- Service role (edge functions) has full access
- Automatic
user_idfiltering on SELECT queries
- Supabase Auth handles secure password hashing
- JWT-based session management
- Protected routes via middleware (to be implemented)
- Service role keys never exposed to client
- API keys stored in Supabase secrets for edge functions
| Milestone | Duration | Status |
|---|---|---|
| M1: Auth UI & Processing | 1.5-2 weeks | π‘ In Progress (15% done) |
| M2: Lecture Detail Pages | 1-1.5 weeks | βͺ Not Started |
| M3: Flashcard Generation | 1.5-2 weeks | βͺ Not Started |
| M4: Q&A Generation | 1.5-2 weeks | βͺ Not Started |
| M5: Semantic Search & RAG | 2-2.5 weeks | βͺ Not Started |
| M6: Study Schedules | 1-1.5 weeks | βͺ Not Started |
| M7: Polish & Deploy | 1.5-2 weeks | βͺ Not Started |
Total Estimated Effort: 74-104 hours
See Development Plan below for detailed task breakdown.
Milestone 1: Auth UI & Processing Integration (CURRENT)
Goal: Enable complete user flow from signup β upload β view topics
- 1.1 Codify RLS Migration β DONE
- 1.2 Build Complete Auth UI (3-4 hours)
- Sign up/sign in forms with validation
- Password reset flow
- Error handling
- 1.3 Create Global Auth Context (1-2 hours)
AuthProvidercomponentuseAuth()hook- Session persistence
- 1.4 Build Navigation Component (1-2 hours)
- Responsive navbar
- Protected route links
- Sign out functionality
- 1.5 Replace Home Page with Landing (1 hour)
- Hero section
- Feature showcase
- CTA buttons
- 1.6 Add Processing Trigger to Upload Flow (2-3 hours) β
- Title input field
- Edge function integration
- Status feedback
- 1.7 Display Topics in Dashboard (2-3 hours) β
- Lecture cards with status badges
- Topic previews
- Expandable topic lists
- 1.8 Add Route Protection Middleware (30 min)
- Protected route redirects
- Auth state checking
Acceptance Criteria: Users can sign up, upload lectures, trigger processing, and view extracted topics in dashboard.
Milestones 2-7: Feature Development
Full task breakdowns available in the comprehensive development plan document. Key features:
- M2: Lecture detail pages with topic navigation
- M3: AI flashcard generation + study mode
- M4: Practice questions with quiz interface
- M5: Semantic search + RAG Q&A
- M6: Study schedule generation
- M7: Production deployment + monitoring
This is currently a portfolio project. Contributions, issues, and feature requests are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add some AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Run
npm run formatbefore committing (Prettier) - Run
npm run lintto check for issues (ESLint) - Husky pre-commit hooks enforce formatting
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI - GPT-4o-mini and text-embedding-3-small models
- Supabase - Backend infrastructure and edge functions
- Vercel - AI Gateway and Next.js hosting
- pgvector - Vector similarity search in PostgreSQL
Ege Kaya - @egekaya1
Project Repository: https://github.com/egekaya1/LectureLens
- Auth UI not yet implemented (manual auth via Supabase dashboard)
- Processing must be triggered manually via curl (UI integration pending)
- No error handling for failed processing in UI
- Dashboard shows raw data (needs styled components)
Track all issues on GitHub Issues.
Built with β€οΈ for students everywhere