DEV Community

Shashank Chakraborty
Shashank Chakraborty

Posted on

Focus-Roast: Unleashing AI-Powered Shame to Conquer Procrastination

Focus-Roast: Unleashing AI-Powered Shame to Conquer Procrastination

Tired of politely ignored site blockers? We've all been there. Most productivity tools offer gentle nudges or a serene blank screen when you stray, making it all too easy to bypass them and dive back into the rabbit hole of distractions.

Enter Focus-Roast: a novel, open-source approach to productivity that leverages artificial intelligence to ruthlessly bully you into staying on task. This isn't your grandma's site blocker; it's an uncompromising digital drill sergeant designed to make procrastination an uncomfortably public and embarrassing experience.

Focus-Roast Demo
Figure 1: A mock-up of Focus-Roast in action, displaying a context-aware roast.

😈 Core Functionality & Architecture

Focus-Roast operates as a two-part system: a Python backend handles the AI heavy lifting, and a Chrome extension acts as the vigilant gatekeeper, intercepting your browsing habits. This architecture ensures your browsing data remains entirely local and private.

Key Features:

  • Context-Aware Roasts via Gemini AI: At its heart, Focus-Roast integrates with Google's 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. The AI then generates a savage, personalized insult tailored to your specific transgression.
  • Audio Guilt πŸ”Š (Text-to-Speech): Not only does the roast appear on screen, but it's also immediately converted to speech and played aloud. Imagine trying to surreptitiously scroll through social media in a quiet office or library while Focus-Roast declares your "oxygen thief" status.
  • Gallery of Disappointment (Visual Deterrence): To amplify the guilt, the system displays random GIFs featuring famously disappointed figures (e.g., Gordon Ramsay, characters from The Office), providing a constant visual reminder of your failure to focus.
  • The "Walk of Shame" πŸšΆβ€β™‚οΈ (Cognitive Friction): There's no quick "Close" button. To regain access to the distracting site, you are forced to manually type the phrase: "I am weak and lazy". This deliberate act of self-admission creates significant cognitive friction, making you consciously confront your procrastination.
  • Shame Rank System πŸ“‰ (Gamified Accountability): Focus-Roast keeps a persistent tally of your failures, categorizing your "shame rank":
    • 0-2 attempts: Safe... for now.
    • 3-5 attempts: Certified Clown 🀑
    • 10+ attempts: Oxygen Thief πŸ’€

πŸ› οΈ Local Setup: Running Your Personal Roaster

Focus-Roast is designed to run entirely locally, giving you full control over your data and eliminating any third-party server dependencies.

1. The Brain (Backend) 🧠

The backend is built with Python, leveraging uvicorn and FastAPI to serve the AI roasting logic.

# Clone the repository
git clone https://github.com/YOUR_USERNAME/focus-roast.git
cd focus-roast/backend

# Install Python dependencies
pip install -r requirements.txt

# Configure your Gemini API Key
# You'll need a free API key from Google AI Studio (aistudio.google.com).
# Create a .env file in the 'backend' directory with your key:
echo "GEMINI_API_KEY=AIzaSy..." > .env

# Start the roasting server
# The --reload flag enables live reloading during development.
uvicorn main:app --reload
Enter fullscreen mode Exit fullscreen mode

Ensure your GEMINI_API_KEY is correctly set in the .env file. This key is crucial for the AI roast generation.

2. The Trap (Chrome Extension) 🌐

The frontend is a standard Chrome extension that monitors your browsing and communicates with your local backend.

  1. Open Chrome Extensions Manager: Navigate to chrome://extensions in your Chrome browser.
  2. Enable Developer Mode: Toggle the "Developer mode" switch, usually found in the top-right corner.
  3. Load Unpacked Extension: Click the "Load unpacked" button.
  4. Select Extension Directory: Browse to and select the focus-roast/extension folder from your cloned repository.

The Focus-Roast icon should now appear in your browser's toolbar.

πŸš€ How to Play (and Get Roasted)

  1. Click the Extension Icon: Locate and click the Focus-Roast icon in your Chrome toolbar.
  2. Enter Your Goal: In the pop-up, clearly state your current productivity goal (e.g., "Finish my Resume," "Prepare for API interview").
  3. Click "Lock In πŸ”’": This activates Focus-Roast.
  4. Test Your Willpower: Attempt to open a distracting site like Twitter, Instagram, Reddit, or YouTube.
  5. Brace for Impact: Experience the full force of AI-powered disappointment.

Why Local? Privacy and Control

One of the primary design decisions for Focus-Roast was to ensure complete privacy. By running the backend locally, your browsing habits and AI interactions never leave your machine. There are no external servers logging your activity, providing peace of mind alongside unparalleled productivity enforcement.

License

This project is released under the MIT License. Feel free to fork it, modify it, and contribute to making it even more potent (or, dare I say, even meaner). Your pull requests for new roast categories, improved AI prompts, or additional shame mechanisms are highly encouraged!


Tags: #productivity #ai #chrome-extension #python #gemini-api #fastapi #open-source #tutorial

πŸ”— https://github.com/Shashank0701-byte/roast-me

Top comments (0)