FocusGuard

Welcome to FocusGuard, a gamified productivity application that transforms your study schedule into an engaging runner experience.

Take control of your focus time by automatically generating dynamic study sprints using AI, and conquer distractions with an OS-level blocker that forces you to answer academic quizzes if you try to slack off.


Features


Prerequisites

To run FocusGuard locally, you’ll need:

Getting your API Key

  1. Go to console.groq.com
  2. Create a free account.
  3. Generate a new API Key in the API Keys section.

Installation & Setup

  1. Navigate to the backend directory:
    cd FocusGuard/bouncer
    
  2. Install all Python dependencies:
    pip install fastapi uvicorn pydantic python-multipart pygetwindow icalendar python-dotenv groq bcrypt
    
  3. Configure your Environment: Open the .env file located in FocusGuard/bouncer/ and paste your Groq API key:
    GROQ_API_KEY=your_api_key_here
    

How to Run the App

The application runs in two parts: a Python backend and an HTML frontend.

1. Start the Backend Guard

Open a terminal, navigate to the bouncer/ folder, and start the FastAPI server:

cd bouncer
python main.py

Leave this terminal window open. The Python guard is now monitoring for API requests and system distractions.

2. Launch the Web App

Open your file explorer, navigate to FocusGuard/app/, and double-click auth.html to register an account or log in. From there, you will be redirected to the main hub.

3. Start a Mission