MindTussle is an advanced, AI-powered focus guardian that acts as a ruthless personal proctor. Unlike simple website blockers, it uses Computer Vision (Gemini 1.5 Flash) to analyze your screen in real-time, detecting distractions even if they are in background tabs, split screens, or different windows.
"It's like having an exam proctor watching your screen, ensuring you stick to your allowed tools."
- Real-Time Screen Analysis: Captures screen activity every 5 seconds.
- Strict Whitelist Enforcement: You define EXACTLY what is allowed (e.g., "LeetCode", "VS Code").
- Zero Tolerance: If the AI detects ANY non-allowed site (YouTube, Twitter, Netflix) anywhere on your screen, it triggers an immediate RED ALERT.
- AI + Heuristic Hybrid: Combines Gemini's semantic understanding with hard-coded safety nets for instant detection of common distractions.
- Mission Control: Set your objective (e.g., "Study DSA for 2 hours").
- XP System: Earn
Focus XPfor every minute of clean, distraction-free work. - Drift Penalties: Lose integrity and XP when distractions are detected.
- Daily Analytics: Track your focus score, shield efficiency, and distraction patterns.
- Tactical Shield Extension: Connects with the dashboard to provide seamless feedback.
- Non-Intrusive: No page blocking or blurring—just clear, undeniable feedback when you drift.
- Frontend: Next.js 14, React, Framer Motion (for tactical animations).
- Styling: Tailwind CSS (Dark/Cyberpunk aesthetic).
- AI Core: Google Gemini API (
gemini-1.5-flash) for multimodal vision analysis. - State Management: LocalStorage for mission persistence across reloads.
- Extension: Chrome Manifest V3.
- Node.js 18+ installed.
- A Google Gemini API Key (Get it from Google AI Studio).
# Clone the repository
git clone https://github.com/Prakash-codeMaker/MindTussle.git
cd MindTussle
# Install dependencies
npm installCreate a .env.local file in the root directory:
GEMINI_API_KEY=your_api_key_herenpm run devOpen http://localhost:3000 to access the Tactical Dashboard.
- Go to
chrome://extensions/. - Enable Developer Mode (top right).
- Click Load unpacked.
- Select the
tactical-shield-extensionfolder inside this project.
- Enter Mission Control: Open the dashboard and define your goal.
- Set Allowed Tools: Be specific! (e.g., "LeetCode", "StackOverflow").
- Note: If you don't add it, the AI will flag it as a distraction!
- Start Monitoring:
- Click "Start Monitoring" in the Live Monitor.
- Select the screen or window you want to protect.
- Work:
- Limit your activity to your allowed tools.
- If you open YouTube or drift away, the Red Alert will trigger immediately.
MindTussle processes screen data ephemerally. Screenshots are sent to the Gemini API for analysis and strictly discarded afterwards. No video is recorded or stored on any server.
MIT License. Built for Hack Day.