Inspiration
We’ve all been there: staring at a massive to-do list, feeling completely drained, yet forcing ourselves to "just push through." The result? Burnout.
Most study planners are rigid—they treat us like robots with constant energy. But humans fluctuate. Some days we have high energy for deep calculus problems; other days, we barely have the mental bandwidth for flashcards.
I wanted to build a tool that feels less like a strict manager and more like a compassionate coach. FocusBuddy AI was born from the idea that productivity shouldn't cost your mental health. It adapts the plan to the person, not the other way around.
What it does
FocusBuddy AI is a smart study coach that generates personalized, bite-sized study sessions in real-time.
It takes three simple inputs:
- Subject (e.g., Quantum Physics)
- Time Available (e.g., 45 minutes)
- Energy Level (Low Battery, Medium, High Energy)
Based on these, it uses Google's Gemini 2.5 Flash model to craft a psychological strategy:
- If Energy is Low: It generates a "Gentle Review" plan—focusing on scanning notes, videos, and low-friction tasks to keep momentum without stress.
- If Energy is High: It switches to "Deep Work"—active recall, problem-solving, and teaching concepts aloud.
How we built it
The project is a full-stack web application built with:
- Backend: Python & Django. We chose Django for its robustness in handling form data and database models.
- AI Engine: Google Gemini API. We specifically targeted the experimental
gemini-2.5-flashmodel for its speed and reasoning capabilities. - Frontend: Bootstrap 5 for a clean, distraction-free UI, using custom Django template filters to render Markdown responses beautifully.
Challenges we ran into
The biggest technical hurdle was API Integration.
During development, we faced significant issues with the standard google-generativeai Python library, which was throwing deprecation warnings and 404 Model Not Found errors due to version mismatches with the latest Gemini models.
Instead of giving up, we built a custom "Universal Connector". We wrote a direct HTTP request handler using Python's requests library to bypass the SDK limitations entirely. This allowed us to:
- Connect directly to the
v1betaREST endpoints. - Dynamically handle model selection to find the active model (
gemini-2.5-flash) available to our API key. - Ensure 100% uptime regardless of library updates.
Accomplishments that we're proud of
- The "Empathy Engine": We spent time refining the system prompts. The AI doesn't just list tasks; it speaks encouragingly ("You're doing great," "Just dip your toes in").
- Overcoming the API Block: pivoting from a broken library to a custom HTTP implementation was a huge win.
- Clean MVP: We went from an empty folder to a working, deployed application with a polished UI in a single hackathon sprint.
What we learned
- Direct API manipulation: Sometimes libraries break, and knowing how to send raw HTTP requests (
POST) is a superpower for developers. - Prompt Engineering: We learned that giving the AI a "persona" (e.g., "friendly study coach") drastically changes the quality of the output compared to a generic query.
- Django Templating: We learned how to write custom template tags to parse Markdown content safely into HTML.
What's next for FocusBuddy AI
- Pomodoro Integration: Adding a live timer directly next to the generated tasks.
- Session History: Saving past plans so users can track their consistency over time.
- Voice Mode: Integrating speech-to-text so users can "talk" to their coach when they are too tired to type.
Log in or sign up for Devpost to join the conversation.