Skip to content

brainRottedCoder/BeFocused

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BeFocused (ExtensionRaptor) πŸš€

A next-generation Chrome extension to help you reclaim your focus, defeat digital distractions, and build mindful, productive habits. BeFocused combines real-time monitoring, motivational nudges, analytics, and beautiful UI to empower you to do your best workβ€”every day.


πŸ“‘ Table of Contents

  1. Project Summary
  2. Features
  3. File Structure
  4. Deployment
  5. Contribution Guide

πŸ“ Project Summary

BeFocused is your digital accountability partner. It tracks your tab activity, blocks distractions, delivers personalized motivation, and visualizes your progressβ€”all in a seamless, modern interface. Whether you're a student, professional, or anyone seeking better digital habits, BeFocused helps you:

  • Stay on task and avoid mindless browsing
  • Build streaks and earn rewards for focus
  • Get timely, mood-based nudges and life tips
  • Visualize your productivity and distractions
  • Personalize your experience with dark mode and custom settings

✨ Features

🧠 Focus Dashboard

  • Central popup with all controls, stats, and quick actions.
  • Motivational status and streaks to keep you inspired.
  • One-click toggles for alerts, time-warp, and YouTube blur.

πŸ”„ Tab Switch & Distraction Monitoring

  • Real-time tab switch counter: See how often you switch tabs in the last 20 minutes.
  • Customizable alerts: Get notified if you exceed your focus threshold.
  • Distraction time tracking: Monitors time spent on distracting sites and gives warnings/penalties.
  • Penalty and reward system:
    • Lose points for distractions
    • Gain points for focus
    • Daily streaks for consistent productivity

⏳ Focus Sprint (Pomodoro)

  • Start/stop 25-minute sprints (Pomodoro technique) from the popup.
  • Blocks distracting content (YouTube Shorts, Instagram Reels, Facebook Watch, Netflix, etc.) during sprints.
  • Floating stop button and visual progress bar on active tabs.
  • Automatic break suggestion and reward on completion.
  • Confetti and celebration for completed sprints!

🧘 Mindful Feed Overlay & Nudges

  • Intentional Feed Overlay: After a set time on supported sites, an overlay asks how you feel and offers:
    • Personalized motivational quotes (by mood: tired, bored, inspired, etc.)
    • Life tips and micro-actions to reset your mind
    • Save a nudge: Write a message to your future self
    • Time Capsule: View and manage your saved nudges
    • Focus Link: Save and quickly access a meaningful link (e.g., reading list, journal)
    • Pin quotes to your screen for ongoing motivation
  • Customizable interval: Set how many minutes before the overlay appears ("Feed Notify").
  • Gentle sound and animation to break the scroll loop.

πŸ›‘οΈ Focus Mode

  • Allow only a specific site for a set duration (e.g., only docs.google.com for 30 minutes).
  • Blocks all other sites during focus mode.
  • Easy start/stop from the popup.
  • Visual feedback on allowed site and remaining time.

πŸ“Š Stats & Analytics

  • Distraction stats: See time wasted and number of distracting sites visited.
  • Points, penalties, and streaks: Visualize your productivity trends.
  • Full stats page: Detailed analytics and charts (powered by Chart.js).
  • Reset stats with one click.

πŸŒ™ Dark Mode

  • Toggle dark mode from the popup (bottom left).
  • Beautiful, accessible dark theme for all UI elements.
  • Preference is saved and persists across sessions.

βš™οΈ Customization & Settings

  • Settings page: Adjust tab switch threshold, enable/disable sound alerts, force dark mode, and more.
  • Blur YouTube thumbnails: Optional toggle to reduce visual temptation.
  • All preferences are saved using Chrome storage.
  • Accessible, responsive UI for all users.

πŸ—‚οΈ File Structure

ExtensionRaptor/
β”œβ”€β”€ background.js           # Background logic: tab monitoring, notifications, points, penalties
β”œβ”€β”€ block.html              # Block page for focus mode
β”œβ”€β”€ break.html              # Break suggestion page after sprints
β”œβ”€β”€ break.js                # Auto-close logic for break page
β”œβ”€β”€ chart.min.js            # Chart.js library for stats
β”œβ”€β”€ focusBlocker.js         # Content script for blocking non-allowed sites in focus mode
β”œβ”€β”€ focusContent.js         # Content script for enforcing focus mode
β”œβ”€β”€ focusSprint.js          # Content script for Pomodoro sprints and blocking distractions
β”œβ”€β”€ icon.png                # Extension icon
β”œβ”€β”€ intentionalFeed.js      # Main content script for overlays, nudges, quotes, and mindful features
β”œβ”€β”€ manifest.json           # Chrome extension manifest (v3)
β”œβ”€β”€ popup.css               # Styles for popup.html
β”œβ”€β”€ popup.html              # Main popup UI (dashboard)
β”œβ”€β”€ popup.js                # Logic for popup.html (UI, settings, dark mode, etc.)
β”œβ”€β”€ settings.css            # Styles for settings.html
β”œβ”€β”€ settings.html           # Settings page
β”œβ”€β”€ setting.js              # Logic for settings page
β”œβ”€β”€ stats.css               # Styles for stats.html
β”œβ”€β”€ stats.html              # Stats and analytics page
β”œβ”€β”€ stats.js                # Logic for stats page
β”œβ”€β”€ style.css               # Shared/global styles
β”œβ”€β”€ timeWarp.js             # Content script for time-warp/scroll-slowdown feature
β”œβ”€β”€ ytblur.js               # Content script to blur YouTube thumbnails

πŸš€ Deployment

  1. Clone or download this repository.
  2. Go to chrome://extensions/ in your Chrome browser.
  3. Enable Developer Mode (top right).
  4. Click "Load unpacked" and select the ExtensionRaptor folder.
  5. The extension icon should appear in your browser bar. Click it to open the Focus Dashboard.

No build step is required. All files are ready for direct use in Chrome.


🀝 Contribution Guide

We welcome contributions! To get started:

  1. Fork this repository and clone your fork.
  2. Create a new branch for your feature or bugfix:
    git checkout -b feature/your-feature-name
    
  3. Make your changes. Please:
    • Keep code clean and well-commented.
    • Follow the existing file and code style.
    • Test your changes thoroughly.
  4. Commit and push your branch.
  5. Open a Pull Request on GitHub with a clear description of your changes and screenshots if relevant.

Suggestions for Contribution

  • New motivational quote categories or life tips
  • UI/UX improvements (especially for dark mode or mobile)
  • New analytics or productivity features
  • Bug fixes or performance optimizations
  • Translations/localization

Questions or ideas? Open an issue or start a discussion!


Stay focused. Build your best self. πŸ¦–βœ¨

πŸ–ΌοΈ UI Previews

πŸŒ™ Dark Mode

Dark Mode

πŸ“Š Distraction Stats

Distraction Stats

πŸ›‘οΈ Focus Mode

Focus Mode

Reminder and Nudges

Main Dashboard

❗ Penalty Triggered

Penalty View

βš™οΈ Settings Panel

Settings

⏱️ Time Spent Analytics

Time Spent

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •