Inspiration

As a student, I always struggled with revision habits and smart study planning. After researching memory retention techniques, I discovered spaced repetition, a scientifically proven method where revising at increasing intervals helps retain knowledge long-term. The problem was setting reminders for every revision date manually was exhausting. I wanted AI to handle the scheduling automatically, and that became the core motivation behind StudyLens.

What it does

StudyLens is an AI-powered learning platform that turns any topic into a complete study system in seconds.

AI Study Planner — Enter any topic and get an instant 5-day study plan, key concepts, summary, flippable flashcards, MCQ quiz, and a spaced repetition revision schedule - all generated in one click. Smart Dashboard — Personalized overview showing syllabus progress, quiz average, weak topics, due revisions, and recent sessions at a glance. Flashcard System — AI-generated flashcards with four learning states (new → learning → review → mastered) so you always know where you stand. Adaptive Quiz — AI-generated MCQ quizzes per topic with full history, answer review, and automatic weak topic detection. Syllabus Tracker — Manually add subjects and chapters, mark them complete, and watch your progress bar grow. Schedule & Calendar — Add personal study events with a built-in calendar, with visual markers for upcoming events. Guest Mode — Try the full app without creating an account. Data is stored locally so nothing is lost mid-session.

How we built it

StudyLens is built with Next.js 15 (App Router) and TypeScript for the frontend, styled entirely with Tailwind CSS. Supabase handles authentication and the database with row-level security ensuring every user's data stays private. AI features are powered by Groq API running LLaMA 3.3 70B-versatile chosen for its generous free tier and incredibly fast inference. The app is deployed on Vercel. The architecture follows a clean separation — API routes on the server side keep API keys secure, while the client uses React context for theme switching and guest mode state management across pages.

Challenges we ran into

The biggest challenge was deploying to Vercel. Everything worked perfectly on localhost but after deployment the Supabase session was not being created after signup — users could register but couldn't log in. After debugging, the issue was that the Supabase redirect URLs and CORS settings weren't configured for the production domain. Fixing the Site URL and allowed redirect URLs in Supabase's authentication settings resolved it. Another challenge was building the guest mode — since middleware runs on the server and can't access localStorage, I had to use a cookie alongside localStorage to correctly detect guest users across both server and client rendering. The AI data saving race condition was tricky too — multiple updateGuestData calls were overwriting each other because each call used stale React state. Fixed it by using a useRef to always hold the latest data, ensuring sequential updates chain correctly.

Accomplishments that we're proud of

Building a fully functional AI study system solo in under 20 days is something I'm genuinely proud of. The AI planner generates a complete study package - study plan, flashcards, quiz, revision schedule and key concepts — from a single prompt in one API call. The guest mode works seamlessly with full localStorage persistence. The theme system lets users switch between four color palettes that update every card, background and component instantly across all pages.

What we learned

How spaced repetition works and why it's effective for long-term retention. Building guest mode with cookie + localStorage hybrid state management. How to structure a Next.js app with shared context (theme, guest) across auth and protected routes. Debugging Supabase session issues in production deployments. How to write efficient Groq prompts that return structured JSON reliably.

What's next for StudyLens

Light and dark mode - full theme support beyond the current color palettes. Google Calendar integration - sync study events and revision reminders directly to Google Calendar with push notifications. Email reminders - automated emails for due revisions and upcoming exams. Streak system - daily study streaks and gamification to build consistent revision habits. AI weak topic remediation - when a topic is flagged as weak, automatically generate a targeted re-study session for it. Mobile app - React Native version so students can study on the go.

Built With

Share this project:

Updates