Focus-Roast: Unleashing AI-Powered Shame to Conquer Procrastination
Source: Dev.to
Overview
Focus‑Roast operates as a two‑part system:
- Python backend – handles the AI‑powered “roasting” logic.
- Chrome extension – acts as the vigilant gatekeeper, intercepting your browsing habits.
All data stays local and private; no third‑party servers log your activity.
Figure 1: A mock‑up of Focus‑Roast in action, displaying a context‑aware roast.
Features
Context‑Aware Roasts via Gemini AI
When you attempt to access a blacklisted site, the extension sends your predefined goal (e.g., “Study Calculus”) and the offending URL (e.g., instagram.com) to the backend. Gemini AI then generates a savage, personalized insult tailored to the transgression.
Audio Guilt (Text‑to‑Speech) 🔊
The roast appears on screen and is immediately converted to speech and played aloud, turning a quiet office or library into a moment of public self‑reproach.
Gallery of Disappointment (Visual Deterrence)
Random GIFs of famously disappointed figures (e.g., Gordon Ramsay, characters from The Office) are displayed to reinforce the guilt.
“Walk of Shame” (Cognitive Friction) 🚶♂️
There is no quick “Close” button. To regain access, you must manually type the phrase:
I am weak and lazy
This deliberate act of self‑admission creates significant cognitive friction.
Shame Rank System (Gamified Accountability) 📉
A persistent tally categorizes your “shame rank”:
| Attempts | Rank |
|---|---|
| 0‑2 | Safe… for now |
| 3‑5 | Certified Clown 🤡 |
| 10+ | Oxygen Thief 💀 |
Installation
Backend (Python)
# Clone the repository
git clone https://github.com/YOUR_USERNAME/focus-roast.git
cd focus-roast/backend
# Install dependencies
pip install -r requirements.txt
# Configure Gemini API Key
# Create a .env file with your key (obtain a free key from Google AI Studio)
echo "GEMINI_API_KEY=AIzaSy..." > .env
# Start the roasting server (live reload enabled)
uvicorn main:app --reload
Note: Ensure
GEMINI_API_KEYis correctly set in the.envfile. The key is required for AI roast generation.
Frontend (Chrome Extension)
- Open Chrome Extensions Manager:
chrome://extensions - Enable Developer mode (toggle in the top‑right corner).
- Click Load unpacked and select the
focus-roast/extensionfolder from the cloned repository.
The Focus‑Roast icon should now appear in your toolbar.
Usage
- Click the Focus‑Roast icon in the Chrome toolbar.
- Enter your current productivity goal (e.g., “Finish my resume”, “Prepare for API interview”).
- Press Lock In 🔒 to activate the blocker.
- Attempt to open a distracting site (Twitter, Instagram, Reddit, YouTube, etc.).
- Experience the AI‑powered roast, audio guilt, and visual deterrents.
Privacy‑First Design
Running the backend locally ensures that your browsing habits and AI interactions never leave your machine. There are no external servers logging activity, providing peace of mind alongside unparalleled productivity enforcement.
License
This project is released under the MIT License. Feel free to fork, modify, and contribute—whether by adding new roast categories, improving AI prompts, or introducing additional shame mechanisms.
Resources
- GitHub repository:
Tags: #productivity #ai #chrome-extension #python #gemini-api #fastapi #open-source #tutorial