A minimalist browser extension that blocks distracting websites and helps you stay focused.
- Add sites to block -- from the popup or the dashboard
- Visit a blocked site -- a full-screen overlay prevents access
- Request access -- complete a timed reflection challenge to proceed
- Session expires -- the overlay returns when your browse time runs out
- Wildcard patterns -- block
reddit.com,*.twitter.com, orreddit.com/r/funny/* - Exceptions -- allow specific pages even when the domain is blocked
- Configurable sessions -- set challenge duration, browse time, and session limits per rule
- Reflection prompts -- customizable prompts shown during the challenge timer
- Presets -- one-click import for Social Media and Video site blocks
- Import / Export -- share configs as JSON files
- Activity heatmap -- GitHub-style visualization of blocked distractions over the past year
- Dark mode -- follows your system preference
git clone git@github.com:the-wc/focus-mode.git
cd focus-mode
pnpm install
pnpm buildLoad the extension in Chrome:
- Open
chrome://extensions - Enable Developer mode
- Click Load unpacked
- Select the
.output/chrome-mv3folder
pnpm dev # Start dev server with hot reload
pnpm build # Production build for Chrome
pnpm build:firefox # Production build for Firefox
pnpm zip # Package for distributionfocus-mode/
entrypoints/
background.ts # Storage initialization
content/ # Overlay (Shadow DOM + React)
index.tsx # Content script entry
App.tsx # Dark mode wrapper
BlockedOverlay.tsx
TimerPrompt.tsx # Challenge timer + prompt
popup/ # Browser action popup
dashboard/ # Full-page settings UI
lib/
storage.ts # Typed storage definitions
matching.ts # Wildcard pattern matching
prompts.ts # Prompt pool + random selection
presets.ts # Built-in presets
block-configs/ # Preset JSON files
social-media.json
videos.json
default-prompts.json
components/ui/ # shadcn components
wxt.config.ts
Export and import configs as JSON:
{
"name": "My Config",
"rules": [
{
"pattern": "reddit.com",
"timerSeconds": 30,
"accessLimit": 2,
"limitPeriod": "day",
"browseSeconds": 300
}
]
}WXT -- React 19 -- Tailwind CSS v4 -- shadcn/ui -- Lucide Icons
Built to help you focus on what matters.
