Crafting experience...
10/26/2025
A Project Made By
Blake Fowler
Engineer
omar sayeh
Engineer
Rishabh Fuke
Engineer
Shanmukha Harshith Karamala
Engineer
Stuti Ruparel
Engineer
Submitted for
Built At
Gator Hack IV
Hosted By
What is the problem you are trying to solve? Who does it affect?
In a world overflowing with distractions, staying focused and motivated during long study or work sessions is increasingly challenging, and mental burnout only makes it easier to lose track of time and productivity. According to a 2015 study by Microsoft Canada, the average human attention span has dropped from 12 seconds in 2000 to just 8 seconds which is shorter than a goldfish’s attention span. More recent research by Dr. Gloria Mark, a human-computer interaction expert at the University of California, Irvine, finds that in digital environments, the average focused attention span is about 47 seconds.
Many people start tasks with energy but gradually lose concentration without realizing it. Traditional productivity tools only track time spent, not how focused someone actually is or how to recover motivation once it drops. This problem affects students struggling to stay attentive while studying, remote workers and professionals trying to maintain focus without supervision, and anyone pursuing self-improvement goals who needs consistent motivation.
What is your idea? How does it fix the problem?
FocusMind is an AI-driven web application designed to enhance productivity and study efficiency by combining real-time focus tracking, motivational coaching inspired by American motivational speaker David Goggins, and the Pomodoro technique.
It uses AI-powered face tracking built with MediaPipe and OpenAI to automatically detect attention levels through the webcam. Intelligent computer vision algorithms generate a focus score (0–100) and trigger threshold-based interventions when attention drops below set levels (80%, 60%, 50%, 40%). Users receive context-aware motivational nudges and David Goggins–style voice coaching, powered by OpenAI text-to-speech, for real-time encouragement.
FocusMind integrates 25-minute Pomodoro sessions with visual and audio cues, automatic break reminders, and a session counter to track daily progress. After each session, users can view Matplotlib-powered focus charts, color-coded attention indicators, and performance analytics that visualize attention trends and consistency over time.
The platform features a modern, responsive UI optimized for all devices, offering live attention visualization, smooth animations, and a minimalist design that keeps users immersed and distraction-free. In essence, FocusMind delivers an intelligent, motivational, and data-driven focus experience helping users monitor, understand, and strengthen their concentration habits in real time.
How do all the pieces fit together? Does your frontend make requests to your backend? Where does your database fit in?
FocusMind is built as a full-stack AI web application that tightly integrates computer vision, motivational coaching, and structured productivity management.
The frontend, developed with React and Tailwind CSS, provides a responsive, distraction-free interface for running Pomodoro sessions, displaying focus scores, and showing real-time feedback. It uses MediaPipe and OpenCV for on-device webcam tracking, which analyzes face position, gaze direction, and blink rate to determine user attention. These focus metrics are displayed through a live overlay and visualized on a dynamic progress bar.
The backend, powered by Python (FastAPI/Flask), receives data from the frontend via RESTful API calls. It calculates an attention score (0–100) using OpenAI-based models for intelligent scoring and triggers threshold-based interventions (at 80%, 60%, 50%, and 40%) that deliver motivational messages. When attention drops, the backend uses OpenAI Text-to-Speech (Onyx voice) to generate David Goggins–style motivational audio, which is streamed back to the user. A smart audio system ensures that voice tracks do not overlap and manages both automatic and manual playback.
The Pomodoro system is fully synchronized between the frontend and backend. Each 25-minute session is tracked with automatic break reminders, session counters, and configurable timers. Upon session completion, the backend aggregates focus data and stores it in a PostgreSQL database, maintaining session logs, attention scores, and user performance history.
For visualization, the backend generates Matplotlib-based charts that are displayed on the analytics dashboard, allowing users to review trends in focus consistency and productivity.
All updates occur in real time: the frontend continuously fetches focus data, displays the current attention score, and plays motivational cues as needed. The architecture ensures seamless coordination between AI tracking, motivational audio, and Pomodoro management, delivering a fully hands-free and interactive productivity experience.
What did you struggle with? How did you overcome it?
We had issues with the voice motivation feature failing to trigger when the user's focus score fell below the defined thresholds. We had to debug extensively going to identify and resolve the root cause.
Eye tracking wasn't working accurately working accurately for every user. To fix it, we added a calibrating tool that adjusts the tracking parameters based on each user's eye features (and camera settings).
The early implementations of the focus-score algorithm wasn't very precise. The algorithm uses a lot of variables like gaze direction, head rotation, blink rate etc. and we had to extensively fine-tune their influence to get it to work reliably.
What did you learn? What did you accomplish?
Building FocusMind taught us how to integrate multiple technologies—computer vision, AI-driven motivation, and web development—into one cohesive system. We gained hands-on experience working with MediaPipe for real-time face tracking, OpenAI APIs for both intelligent attention scoring and text-to-speech motivation, and full-stack synchronization between a React frontend and a Python (FastAPI) backend.
We successfully developed a working prototype that can analyze user focus in real time, trigger motivational voice interventions when attention drops, and visualize productivity patterns through interactive analytics dashboards. The Pomodoro timer and focus chart integration provided a smooth, data-driven user experience that reinforced disciplined study habits.
Through this project, we deepened our understanding of using AI-driven voice generation, real-time face tracking and RESTful communication. Most importantly, we learned how to create a product that combines AI, psychology, and design to solve a real human problem - helping people stay focused and motivated.
What are the next steps for your project? How can you improve it?
Moving forward, our goal is to make FocusMind smarter, more personal, and easier to use.
Enhancing accuracy:
Integrating deep learning models will improve emotion and gaze detection allowing us to distinguish between different distraction types (e.g., fatigue vs. phone use).
Personalized motivation:
Introducing customizable motivation profiles, will allow users to choose from various coaching styles or voices beyond David Goggins.
Advanced analytics:
Implementing long-term focus tracking with daily and weekly performance insights will help users monitor progress over time.
Wearable integration:
Exploring synchronization with smartwatches and other wearable devices will extend access to physical indicators like heart rate and stress levels.
Improving accessibility:
Deploying cloud-based processing will support lower-end devices and ensure smooth real-time performance.
Mobile expansion:
Developing a mobile companion app for on-the-go focus tracking and productivity management.