Inspiration
Students often need the same topic explained at different levels and sometimes prefer learning in their native language. We wanted to build a simple AI tool that could turn any topic into personalized study material without requiring students to search through multiple resources.
This inspired us to create StudyMate AI, a bilingual AI study assistant powered by Gemma.
What it does
StudyMate AI allows users to enter a topic, select English or Bangla, and choose a difficulty level: Beginner, Intermediate, or Advanced.
Using the Gemma API, it generates:
- A clear explanation
- Key concepts
- Examples
- Python code when relevant
- Important points
- 5 quiz questions
- Quiz answers
Users can also copy the generated study material with one click.
How we built it
We built StudyMate AI as a lightweight web application using:
- Python + Flask for the backend
- HTML, CSS, and JavaScript for the frontend
- Google AI Studio API + Gemma for AI generation
- GitHub for version control
- Vercel for deployment
The frontend sends the topic, language, and difficulty to our Flask backend. The backend securely calls the Gemma API and returns the generated study material to the user.
The API key is stored securely as an environment variable and is not exposed in the frontend.
Challenges we ran into
One challenge was getting consistent and well-structured AI responses. We needed the output to be useful for studying rather than just being a general AI response.
We addressed this by creating a structured prompt that tells Gemma exactly what sections to generate and adjusts the explanation according to the user's selected language and difficulty.
Another challenge was securely connecting the web application to the AI API without exposing the API key. We solved this by keeping the API communication on the Flask backend and using environment variables for the credentials.
Accomplishments that we're proud of
We are proud of turning a simple idea into a working, deployed AI application within the hackathon.
We successfully:
- Integrated a real Gemma model through an API
- Added English and Bangla learning support
- Added multiple difficulty levels
- Generated structured study material and quizzes
- Implemented a copy-to-clipboard feature
- Added API error handling and loading states
- Deployed the application publicly
- Published the project as an open-source GitHub repository
What we learned
This project gave us practical experience with integrating generative AI into a real web application.
We learned how to:
- Work with an AI API
- Design effective prompts
- Build a Flask backend
- Connect JavaScript with a Python API
- Secure API credentials
- Handle API errors
- Deploy an AI-powered application
- Design AI-generated content for an actual use case
What's next for StudyMate AI
We want to expand StudyMate AI beyond basic topic-based study material.
Possible future improvements include:
- PDF and document-based learning
- AI-generated flashcards
- Personalized learning progress
- More languages
- Voice-based learning
- Interactive quizzes with scoring
- Study history and saved notes
- More advanced personalization based on the student's learning needs
Our long-term goal is to make StudyMate AI a more complete personal learning companion while keeping the experience simple and accessible.

Log in or sign up for Devpost to join the conversation.