Inspiration
I'm a second-year physics student. Last term I spent three full days revising thermodynamics before my January exam. I felt solid. Walked in confident. Question 2 asked me to derive the Clausius inequality from first principles and I just... stared at the page. I thought I understood it. I could recognise all the terms on my notes. But I couldn't actually reproduce the reasoning under pressure.
The worst part? I'd skipped electromagnetism to cram thermo, and it turned out I already knew the EM content fine. I wasted my revision time on the wrong thing because I couldn't tell what I actually understood versus what I just felt familiar with.
That's the problem. It's not a content problem. Students have more content than ever. It's a self-awareness problem. Psychologists call it the Dunning-Kruger effect, but every student just calls it "that horrible exam moment." No study tool makes this visible. Quizlet tests recall. Anki schedules flashcards. ChatGPT answers your questions. None of them ask you how confident you are first, then test you, then show you where you were wrong about yourself.
We built StudyLens to fix that.
As an MSc Computer Science student, I’ve experienced similar moments, feeling very comfortable with a concept during revision or preperation, only to realize under exam pressure that familiarity with patterns isn’t mastery. That alignment made the problem immediately relatable and technically interesting to solve.
What it does
You upload your lecture notes (PDF, images, whatever you've got). Gemini reads them natively and pulls out every concept: names, definitions, formulas in LaTeX, Bloom's taxonomy levels, prerequisites, even diagram relationships between topics.
Then comes the key step. Before any quiz, you rate your own confidence on each concept. 1 to 5. "How well do you think you know this?" Be honest. (Or don't. The app will find out either way.)
The AI generates a quiz calibrated to those ratings. If you said 5, you get harder edge-case questions that test real understanding. If you said 2, you get fundamentals. Multiple choice and true/false, each mapped to a specific concept.
Then the magic: the gap reveal. A per-concept bar chart showing your confidence next to your actual quiz score. The overconfident topics glow red. The ones where you nailed it are green. Sorted by gap size, biggest blind spots at the top. You see, in one screen, exactly where your self-assessment was wrong.
For every blind spot, StudyLens walks you through a guided study path. It starts with a text explanation grounded in your notes (not Wikipedia). If text isn't enough, it generates a concept map. Still stuck? A visual study poster. You can listen to a voice explanation too. There's a quick check at the end to see if it clicked.
And then spaced repetition keeps it going. Concepts you were overconfident on come back sooner. A calibration score tracks how well you know yourself over time. Streaks, XP, badges, a daily focus card that tells you what to study today. It's not a one-time diagnostic. It's the study companion that tells you the truth.
How we built it
Frontend: Next.js 15 with App Router, Tailwind CSS for styling, Zustand for client state. Dark-themed UI with OKLCH color tokens.
AI (the big one): Gemini 2.5 Flash handles almost everything. Multimodal PDF extraction with structured JSON output. Quiz generation calibrated to confidence. Targeted explanations. Mermaid.js concept map generation. Tutor chat with context handoff from study mode. Cross-session exam simulation. We also use Gemini 2.5 Flash Image for study poster generation and Gemini 2.5 Flash Preview TTS for two-host discussion audio (think NotebookLM-style, but personalized to your weak concepts). Three model variants, one API key, eight distinct use cases.
Voice: ElevenLabs eleven_multilingual_v2 for the main voice explanations. We wrote a 240-line normalization pipeline that converts LaTeX, code operators, Greek symbols, and math notation into natural speech before sending to TTS. So \frac{a}{b} comes out as "a divided by b" instead of "backslash frac a b."
Database: MongoDB Atlas for all persistence. Sessions, users, spaced repetition state, and a SHA-256 content-hash caching layer with TTL indexes that auto-expire old entries. Rate limiting uses atomic $inc counters with upsert. Compound indexes on user + timestamp for the dashboard.
Auth: Clerk, with optional demo mode. You can try the full app without signing in, then claim your session after.
Deploy: Vercel with Fluid Compute for 60-second AI route timeouts. Marketing videos rendered with Remotion.
Challenges we ran into
The one that ate the most hours: making math speakable. We have this TTS normalization layer, tts-text.ts, and it's 240 lines of regex transformations. LaTeX to words. Code operators to words. Greek symbols to their names. Superscripts to "to the power of." Getting \theta = \frac{mv^2}{r} to sound like "theta equals m v squared over r" instead of "backslash theta equals backslash frac mv caret 2 r" took more iteration than any other feature. Every time we thought we'd caught all the edge cases, someone would upload notes with a new notation style.
The second challenge was more of a design problem. The gap reveal has this pause between when the confidence bars appear and when the actual performance bars render. About 800 milliseconds. That tiny delay is what makes people go "oh no." We tuned it by literally watching each other's faces. Too fast and the impact doesn't land. Too slow and it feels like lag. 800ms was the sweet spot.
Then the classic hackathon stuff. Gemini wrapping its JSON responses in markdown code fences that broke our parser. MongoDB connection pooling doing weird things in serverless. And at about 3 AM, realising our quiz prompt was generating "define X" questions instead of actually testing understanding, so we had to rewrite the entire prompt with 12 explicit rules about question quality.
Accomplishments we're proud of
We showed the gap reveal to friends at the hackathon and there's this moment, every time, where someone sees a concept they rated 5/5 come back as 40% and their face just changes. One of our teammates said "I hate this app" and then immediately uploaded his own lecture notes. That reaction is exactly the point.
The remediation flow works the way we hoped. You click on a red concept and it walks you through: text explanation first, then a concept map if you need the visual, then a poster, then voice. Each modality builds on the last. It feels like a tutor who's paying attention to whether you're getting it.
On the technical side: 12 API routes, 16 library modules, 7 versioned prompt templates, a Playwright test suite, and a full companion dashboard with streak tracking, calibration scoring, badges, and SM-2 spaced repetition weighted by your confidence gap. 24 hours.
What we learned
The big one: metacognition is the actual bottleneck in learning. Students don't need more content. They don't need another flashcard app. They need something that honestly tells them where their self-assessment is wrong. Every feature we built traces back to that one insight.
The surprising one: prompt engineering for structured educational content is hard. Getting Gemini to reliably produce JSON with concept names, LaTeX formulas, Bloom levels, prerequisites, and Mermaid diagram syntax from messy lecture notes (mixed notation, abbreviations, half-drawn diagrams) took way more iteration than any of the features that actually look impressive on screen.
The exciting one: multimodal AI has crossed a threshold. Sending a raw physics PDF to Gemini and getting back accurate, structured concept extraction in a single API call... that just wasn't possible a year ago. The fact that a hackathon team can build on top of that in 24 hours says something about where education tools are headed.
What's next for StudyLens
Course-level tracking. Right now you upload one set of notes at a time. The next step is uploading a whole semester and seeing your blind spots across the course. "You've struggled with differential equations in 4 separate sessions" is way more useful than any single quiz score.
A proper math assessor. MCQ only goes so far. We want to check your working step by step. "You got the right answer but your approach to integration by parts was roundabout" is the kind of feedback that actually improves technique.
Cohort insights for instructors. If 70% of students are overconfident on the same concept, the lecturer needs to know. Pattern recognition across users to surface systemic gaps.
Mobile. Students study on their phones. The daily focus card and spaced repetition queue are begging to be a native app.
Built With
- clerk
- elevenlabs
- gemini
- katex
- mermaid.js
- mongodb
- next.js
- recharts
- remotion
- tailwind-css
- typescript
- vercel
- zustand
Log in or sign up for Devpost to join the conversation.