Inspiration
One of our teammates has ADHD and constantly struggles with maintaining focus during study sessions. We watched him battle distractions, lose track of time on social media, and feel defeated when his productivity plummeted. And we knew this wasn't just a problem that he had. In fact, over 11% of children in the United States struggle with ADHD. Furthermore, we realized that traditional productivity tools weren't working—they were boring, punishing, and made focusing feel like a chore. We asked ourselves: what if getting "laser focused" could be fun, rewarding, and even addictive? That's when LaserLock was born. We wanted to transform the struggle of concentration into an engaging game where every minute of focus earns rewards, unlocks achievements, and builds genuine study habits that lead to better grades and academic success.
What it does
LaserLock is an AI-powered focus companion that uses real-time eye-tracking and intelligent app monitoring to detect when you're distracted. The moment your eyes wander or you switch to a distracting app, LaserLock catches it, logs it, and gently guides you back to focus. But here's where it gets exciting: every focused minute earns you XP, unlocks achievements, and builds your focus streak. You can see beautiful visualizations of your productivity—pie charts showing your focus vs. distraction time, bar graphs revealing which apps steal your attention, and timeline charts mapping your concentration throughout each session. It's like a Fitbit for your brain, gamifying productivity to help students with ADHD and attention challenges build better habits and reach their full academic potential. For even more fun, you can compete against friends on local or even global boards to see who is truly the most locked in.
How we built it
We built LaserLock with a powerful tech stack that brings together computer vision, real-time data processing, and modern web technologies:
- Eye-tracking AI: Python backend using OpenCV and MediaPipe for real-time gaze detection, blink tracking, and attention monitoring
- Screen monitoring: Custom screen capture system that detects active windows, tracks app usage, and identifies distracting applications with the help of Claude
- Backend infrastructure: Python executable that processes eye-tracking data and app usage events, feeding them into Firebase, and utilizing Flask API to connect the backend to the front end
- Frontend: Next.js 16 with React 19, TypeScript, and Tailwind CSS for a beautiful, responsive UI
- Data visualization: Recharts library for creating intuitive pie charts, bar graphs, area charts, and timeline visualizations
- Gamification system: Custom achievement engine with XP tracking, level progression, and unlockable rewards
- Database: Firebase Firestore for real-time data synchronization and user session management
- Authentication: Firebase Auth for secure user accounts and data privacy
- API: Flask API
The architecture connects the Python eye-tracking engine to the web frontend through Firebase, creating a seamless real-time feedback loop that turns raw tracking data into actionable insights and engaging gamification.
Challenges we ran into
Database integration complexity: Connecting our Python backend to Firebase while maintaining real-time data flow was incredibly challenging. The eye-tracking software generated hundreds of events per minute, and we had to architect a system that could batch writes, handle network failures gracefully, and keep the frontend synchronized without overwhelming Firestore's rate limits. Furthermore, we had to integrate Flask API to make sure all the features in the backend were accessible through the web app. This proved challenging with all of the data we were sending.
Frontend-backend communication: Bridging the gap between our Python executable and the Next.js frontend required creative problem-solving. We couldn't use traditional REST APIs because we needed bidirectional real-time communication, so we built a Firebase-based event system that acts as a message broker between the two systems.
Eye-tracking accuracy and performance: The MediaPipe face mesh detection was computationally expensive and initially caused significant lag. We had to optimize frame processing, implement smart caching, and fine-tune the Eye Aspect Ratio (EAR) algorithm to detect blinks and distractions accurately without killing performance.
Intuitive data visualization: We struggled to make complex tracking data understandable at a glance. After multiple iterations, we designed a multi-chart dashboard that segments data by time, app, and distraction type—transforming raw numbers into stories users can learn from and not find boring.
Gamification balance: Making the system rewarding without being manipulative was tricky. We tested different XP curves, achievement thresholds, and reward frequencies to find the sweet spot where users feel motivated but not overwhelmed.
Session state management: Handling edge cases like app crashes, network disconnections, and manual session terminations required robust error handling and state recovery mechanisms we hadn't initially planned for.
Cross-platform screen capture: Building a screen monitoring system that works reliably across different operating systems and window managers pushed us to learn low-level OS APIs we'd never touched before.
Accomplishments that we're proud of
🎯 Built a fully functional eye-tracking system that processes real-time video, detects gaze direction, eye dilation, identifies blinks, and accurately determines when users are distracted—all running at 30 FPS without lag.
📊 Created beautiful, intuitive data visualizations that transform complex tracking metrics into actionable insights through pie charts, bar graphs, area charts, and timeline visualizations that tell a story.
🔗 Achieved seamless real-time integration between Python computer vision, Firebase/Flask API backend, and Next.js frontend
📱 Designed a polished, responsive UI with glassmorphism effects, smooth animations, and a cohesive design system that makes productivity tracking feel premium and engaging.
🎮 Engineered a complete gamification system with 15+ achievements, XP progression, level milestones, and rarity tiers that make focusing genuinely fun and addictive.
📈 Implemented intelligent app monitoring that doesn't just track what apps you use, but calculates exactly how much time you spend distracted and which applications steal your focus most. It even creates scores for how productive a certain session was, so you can quantify your progress over time
🏆 Built achievement tracking with progress bars that show users exactly how close they are to unlocking the next reward, creating anticipation and motivation.
⚡ Optimized performance to handle real-time eye tracking, database writes, and UI updates simultaneously without stuttering or lag.
What we learned
Computer vision is harder than it looks: We thought eye-tracking would be straightforward, but learned about the intricacies of facial landmark detection, the Eye Aspect Ratio algorithm, pupil detection through contour analysis, and the countless edge cases that arise with different lighting conditions, glasses, and camera angles.
Real-time data architecture requires careful planning: We learned how to design systems that handle high-frequency events, implement batching strategies, manage connection failures gracefully, and keep frontends synchronized with backends through Firebase's real-time listeners.
Gamification is a psychological science: Creating reward systems that motivate without manipulating requires research into operant conditioning, variable reward schedules, and intrinsic vs. extrinsic motivation. We learned that achievements need to be achievable but challenging, and rewards need to feel earned.
User experience trumps features: We initially built complex features that confused users. Through rapid iteration, we learned that simplicity, clear visual hierarchy, and intuitive navigation matter more than feature lists.
Firebase is incredibly powerful: We discovered Firebase's ecosystem—Firestore's real-time subscriptions, Authentication's ease of use, and the ability to build production-ready backends without managing servers.
Data visualization tells stories: We learned that charts aren't just decorative—they're storytelling tools. The right visualization can transform "you were distracted 23 times" into an "aha!" moment that changes behavior.
Accessibility and neurodiversity matter in design: Building for users with ADHD taught us about reducing cognitive load, providing immediate feedback, using color psychology thoughtfully, and designing interfaces that work with—not against—different brains.
What's next for LaserLock
📱 Mobile companion app: We want to build an iOS/Android app that tracks focus sessions on-the-go, sends gentle reminders when you've been distracted too long, and provides quick stats at a glance. Imagine studying at the library and having your phone vibrates when LaserLock detects you're losing focus—bringing the eye-tracking experience everywhere.
🏆 Competitive multiplayer mode: Study sessions with friends become challenges! We'll build leaderboards, head-to-head focus battles, and team competitions where students can compete to be the most locked in. Real-time graphs showing who's winning would create accountability and make studying social.
🤖 AI-powered focus coaching: Using the distraction patterns we collect, we want to build an ML model that predicts when you're about to lose focus and intervenes proactively with personalized suggestions like "You usually get distracted around 25 minutes—take a quick break now!"
📊 Advanced analytics dashboard: Weekly and monthly reports showing focus trends, identifying peak productivity hours, detecting patterns in distraction triggers, and providing personalized recommendations for optimal study schedules.
🎯 Smart break recommendations: Using the Pomodoro technique enhanced with AI—LaserLock would learn your natural attention span and suggest breaks at scientifically optimal times.
🔔 Website blocking integration: When LaserLock detects repeated distractions from specific apps or websites, it could offer to temporarily block them during focus sessions.
🌐 Study group sessions: Virtual study rooms where groups can join synchronized focus sessions, see each other's progress in real-time, and celebrate achievements together.
💡 Focus insights and tips: Personalized recommendations based on your data—"You're 40% more focused in the morning" or "Discord" distracts you for an average of 12 minutes—consider closing it during sessions."
🎨 Customizable themes and rewards: Unlockable visual themes, profile badges, and cosmetic rewards that let users personalize their LaserLock experience and show off their focus achievements.
Built With
- class-variance-authority
- css
- datetime
- eslint
- firebase
- firestore
- flaskapi
- git
- html
- javascript
- logging
- mediapipe
- next.js
- opencv
- python
- pywin32
- radix
- react
- recharts
- tailwind
- typescript

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