Inspiration
Studying from long lecture notes, PDFs, and textbook chapters often means spending more time organizing the material than actually learning it. I wanted to build something that could take the study material I already have and immediately turn it into something useful for revision. That led to the idea for StudyLens — an AI study companion that understands a student's own material and transforms it into a personalized learning experience. I was particularly interested in using Gemini not just as a chatbot, but as the intelligence behind the entire learning workflow.
What it does
StudyLens turns uploaded PDF or TXT study material into an interactive study workspace. It uses Google Gemini to: 🧠 Generate a smart summary and key takeaways 💡 Identify important concepts and explain them ❓ Generate important exam/review questions 🎯 Create a 5-question MCQ quiz with scoring and explanations 💬 Provide Ask StudyLens, a contextual AI tutor for questions about the uploaded material The AI tutor is grounded in the uploaded content. If a question is unrelated to the material, StudyLens identifies that instead of pretending the information came from the uploaded document.
How we built it
StudyLens was built as a full-stack web application with React and Vite on the frontend and Node.js with Express on the backend. The application extracts text from uploaded PDF and TXT files and sends the relevant content to the Google Gemini API using the official @google/genai SDK. Gemini then analyzes the material and generates structured learning content such as summaries, concepts, questions, quizzes, and contextual answers. The Gemini API key is kept securely on the server using environment variables and is never exposed to the frontend. The project was developed using Google Antigravity, which helped accelerate the implementation, testing, and debugging of the application.
Challenges we ran into
One of the biggest challenges was making sure the AI-generated content was actually based on the student's uploaded material rather than producing generic answers. We addressed this by passing the document context to Gemini and adding a guardrail for questions that fall outside the uploaded material. We also had to handle practical issues such as PDF text extraction, structured responses from Gemini, API configuration, frontend-backend communication, environment variables, and making sure the API key was never exposed. Getting the complete flow — upload → extraction → Gemini analysis → generated learning content → interactive quiz → contextual chat — working reliably was the biggest technical challenge.
Accomplishments that we're proud of
We're proud that StudyLens became more than just a chatbot with a Gemini API attached to it. The entire learning experience is driven by the student's own study material. A single upload can produce a summary, important concepts, revision questions, a quiz, and contextual AI assistance. We're particularly proud of the grounded Ask StudyLens feature, which can distinguish between questions covered by the uploaded material and questions that fall outside its context. Most importantly, we built and verified a complete working end-to-end workflow using real Gemini API calls.
What we learned
Building StudyLens taught us that using an LLM effectively is not just about sending a prompt and displaying the response. We learned the importance of context management, structured outputs, prompt design, validation, error handling, and grounding AI responses in reliable source material. We also learned how important the application architecture is when working with AI APIs. Keeping the Gemini API key on the backend and separating the frontend from the AI service helped us build the application more securely. Most importantly, we learned how Gemini can be used as a core reasoning and content-generation layer inside a complete application rather than simply as a conversational interface.
What's next for STUDYLENS
The current version focuses on turning individual study materials into an interactive learning experience. There is a lot of room to take that further. Future versions could include: 📈 Persistent learning progress and performance tracking 🔄 Spaced-repetition flashcards 🧠 Adaptive quizzes based on weak topics 📚 Support for multiple documents and subjects 📊 Personalized learning analytics 🔐 User accounts and saved study sessions 🎙️ Voice-based interaction with the AI tutor The long-term goal is to make StudyLens more than a tool that summarizes notes — a personalized AI learning companion that understands what a student is studying and helps them learn, practice, and improve.
Built With
- 3.6
- ai
- api
- css
- express.js
- flash
- gemini
- generative
- html
- javascript
- node.js
- pdf-parse
- react
- rest
- vite
Log in or sign up for Devpost to join the conversation.