DEV Community

Lalit Mohan Oli
Lalit Mohan Oli

Posted on AI-assisted

🎯 Focus Mitra -> Gentle, Privacy-First AI Study Companion

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

What I Built

I built Focus Mitra for my close friend who has been preparing for competitive exams and technical interviews while battling severe study paralysis and ADHD.
Whenever he sits down with massive syllabi or dense topics—like Compiler Design, Operating Systems, or Data Structures—he often hits an invisible wall of executive dysfunction. Traditional productivity apps made things worse: cold timers, flashing red streak alerts, and rigid checklists only amplified anxiety.
In Sanskrit and Hindi, Mitra means Friend.
Focus Mitra reimagines productivity through empathetic, companion-based guidance:

  1. Smart Task Decomposition: Enter any overwhelming topic (e.g., "Understand LR Parsing" or "Prepare for Operating Systems Finals"), and the AI deconstructs it into bite-sized, 10–25 minute micro-steps with calm tips and time estimates.
  2. Empathetic Companion Chat: An AI study companion you can talk to when you feel stuck, confused, or unmotivated—offering quick concept clarifications and gentle reassurance without judgment.
  3. Adaptive Pomodoro Cycles: Low-pressure focus sessions with calming, restorative breaks.
  4. Procedural Ambient Soundscapes: Generative audio synthesized in real time via the browser's Web Audio API—binaural focus waves, rain, cozy cafe, forest rustle, and lo-fi hum—requiring zero external streaming, MP3 downloads, or subscriptions.

5. Private Progress Tracking: Mindful streak counters and reflections that praise consistency over perfection, stored entirely on your device.

Demo

4. Try breaking down a complex topic or turn on the ambient binaural soundscape!

Code

🎯 Focus Mitra

A gentle, privacy-first AI study companion for students and creators who struggle with focus, overwhelm, and study burnout.

Built with ❤️ for a friend who battles ADHD, procrastination, and anxiety when starting large study sessions.


🌟 Why "Focus Mitra"?

In Sanskrit and Hindi, Mitra (मित्र) means Friend.

Traditional productivity tools are often cold, rigid, and guilt-inducing with red streaks and harsh alarms. Focus Mitra reimagines study productivity through empathetic, companion-based guidance:

  • It breaks terrifying, complex topics into bite-sized, digestible micro-steps.
  • It provides warm, calm encouragement instead of judgment.
  • It combines adaptive Pomodoro cycles with a generative ambient soundscape and thoughtful check-ins.

🧠 Open-Source AI at the Core

Focus Mitra is built around open-source AI principles:

  • 100% Local & Private: Connects directly to Ollama running local open-weight models (llama3.2, mistral, deepseek-r1, phi3). Your personal study thoughts, struggles, and notes never leave…

- GitHub Repository: https://github.com/lalit-oli-mohan-479/Focus_Mitra

How I Built It

Focus Mitra is engineered with open-source AI, lightweight web standards, and privacy at its foundation:

1. Local Open-Source AI Engine (Ollama)

  • Direct integration with Ollama REST API running open-weight models such as Llama 3.2, Mistral, or DeepSeek-R1.
  • Model-agnostic design: Users can switch models on the fly depending on their hardware.
  • Custom system prompting tailored for calm, gentle peer encouragement rather than robotic instruction. ### 2. Cloud Fallback (Gemini API)
  • To ensure my friend could still use Focus Mitra on his lightweight travel laptop without a dedicated GPU, I built a smart dual-backend system that seamlessly falls back to Google's Gemini API with client-side API key storage (localStorage). ### 3. Procedural Audio Engine (Web Audio API)
  • Rather than streaming large audio files over the internet, ambient sounds (binaural beats, pink/white rain noise, cafe hum) are synthesized procedurally in real-time in the browser using Web Audio API oscillators and gain nodes. ### 4. Glassmorphism Design System

- Built with semantic HTML5 and vanilla modern CSS (custom tokens, flexbox/grid, and micro-interactions) to keep the app blazing fast, lightweight, and calming to look at.

Why Does Open Innovation Matter?

When you are struggling with focus or mental fatigue, your study notes, frustrations, and thoughts are deeply personal. Using closed, centralized AI services often means:

  • Your candid study struggles and notes get logged onto corporate cloud servers.
  • You are gated behind $20/month subscription paywalls that students cannot afford.
  • You are dead in the water the moment Wi-Fi cuts out in a library or train. Open innovation changes everything:
  • Zero Data Leakage (100% Private): Running open-weight models locally on Ollama ensures personal notes and reflections never leave your machine.
  • Offline Reliability: Works in rural areas, flights, or distraction-free offline study retreats with no internet connection.
  • Accessible to Every Student: High-performance open models like Llama 3.2 3B run comfortably on standard consumer laptops at zero cost.
  • User Agency: The user owns their AI companion—free to fine-tune prompts, adjust system temperatures, and switch backends whenever they choose. --- ## My Agent Session

Built with the assistance of an agentic pair-programming workflow in Google Antigravity, iterating from problem discovery through generative audio synthesis, local Ollama integration, UI refinement, and automated GitHub Pages deployment.

Top comments (0)