HyperFocus Dev
HyperFocus Dev
Block distractions, track deep work, and reclaim your coding flow.
Solo developers and indie hackers constantly battle digital distractions, leading to significant productivity loss and burnout. The 'always-on' nature of modern work, coupled with easy access to social media, news, and even non-essential dev tools, breaks their deep work 'flow state'. This context switching isn't just a minor annoyance; studies show it can take over 20 minutes to regain focus after an interruption. For a solo dev, this translates to losing 1-2 hours of effective coding time daily, potentially extending project timelines by 20-30% and delaying product launches. Existing tools either offer generic site blocking (which lacks intelligence) or are overly complex and expensive for budget-conscious builders. The core problem is the lack of a smart, developer-centric tool that understands when to block distractions and provides actionable insights to cultivate sustained periods of focused work.
HyperFocus Dev is a smart browser extension and web dashboard designed specifically for developers to achieve and maintain deep work states. Its core feature is context-aware distraction blocking: instead of a blunt 'block all social media,' it can intelligently block sites based on your current active development environment (e.g., blocking Reddit only when you're in VS Code or GitHub). Users can define custom focus profiles for different tasks. The web dashboard provides detailed analytics on focus sessions, including 'focus score,' time spent in deep work, and common distractions encountered. Unique to HyperFocus Dev is its ability to suggest personalized strategies for improving focus, derived from analyzing your own work patterns. It's designed for minimal setup, a clean UI, and actionable insights, enabling developers to reclaim their coding flow and ship faster.
Tech Stack
System Architecture
βββββββββββββββββββ
β Browser Ext. β
β + Web App β
ββββββββ¬βββββββββββ
β HTTP/S
βΌ
βββββββββββββββββββ
β Next.js API Rts β
β (Backend) β
ββββββββ¬βββββββββββ
β βββββββββββ
β β Supabaseβ
βββΊβ(Postgresβ
β β+ Auth) β
β βββββββββββ
β βββββββββββ
βββΊβ Stripe β
β β (Payment)β
β βββββββββββ
β βββββββββββ
βββΊβ Resend β
β β (Emails)β
β βββββββββββ
β βββββββββββ
βββΊβ OpenAI β
β (AI) β
βββββββββββDatabase Schema
-- Enable the uuid-ossp extension for generating UUIDs
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-- Users Table
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
email TEXT UNIQUE NOT NULL,
supabase_auth_id UUID UNIQUE REFERENCES auth.users(id) ON DELETE CASCADE, -- Link to Supabase auth.users table
name TEXT,
avatar_url TEXT,
stripe_customer_id TEXT,
subscription_status TEXT DEFAULT 'free' NOT NULL, -- 'free', 'pro', 'canceled'
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
COMMENT ON TABLE users IS 'Stores user profiles and subscription details.';
COMMENT ON COLUMN users.supabase_auth_id IS 'Foreign key to the auth.users table in Supabase.';
COMMENT ON COLUMN users.subscription_status IS 'Current subscription tier of the user.';
-- Focus Sessions Table
CREATE TABLE focus_sessions (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
start_time TIMESTAMP WITH TIME ZONE NOT NULL,
end_time TIMESTAMP WITH TIME ZONE, -- Null if session is ongoing
duration_minutes INTEGER, -- Calculated on end_time
blocked_urls_during_session TEXT[], -- Array of URLs blocked during this session
interruption_count INTEGER DEFAULT 0, -- How many times user tried to access blocked sites
productivity_score REAL, -- A score based on duration, interruptions, and blocked_urls (calculated)
notes TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE INDEX idx_focus_sessions_user_id ON focus_sessions(user_id);
CREATE INDEX idx_focus_sessions_start_time ON focus_sessions(start_time);
COMMENT ON TABLE focus_sessions IS 'Records individual focus work sessions for each user.';
COMMENT ON COLUMN focus_sessions.blocked_urls_during_session IS 'List of specific URLs that were blocked during this session.';
COMMENT ON COLUMN focus_sessions.productivity_score IS 'A calculated score indicating session effectiveness.';
-- Blocked Sites Configuration Table
CREATE TABLE blocked_sites_config (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
url_pattern TEXT NOT NULL, -- e.g., 'youtube.com', 'reddit.com/*', 'facebook.com'
label TEXT, -- e.g., 'Social Media', 'Distracting News'
is_active BOOLEAN DEFAULT TRUE NOT NULL,
block_duration_minutes INTEGER, -- Optional: block for a specific duration (e.g., 60 minutes)
block_mode TEXT DEFAULT 'strict' NOT NULL, -- 'strict' (always block), 'contextual' (block based on context - future feature)
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE INDEX idx_blocked_sites_config_user_id ON blocked_sites_config(user_id);
COMMENT ON TABLE blocked_sites_config IS 'Stores user-defined rules for blocking distracting websites.';
COMMENT ON COLUMN blocked_sites_config.url_pattern IS 'The URL pattern to be blocked (e.g., domain, subdomain, path).';
COMMENT ON COLUMN blocked_sites_config.block_mode IS 'Defines how the site should be blocked (e.g., always, or based on specific context).';
-- AI Suggestions Table
CREATE TABLE ai_suggestions (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
session_id UUID REFERENCES focus_sessions(id) ON DELETE CASCADE, -- Optional: link to a specific session
suggestion_text TEXT NOT NULL,
suggestion_type TEXT, -- e.g., 'break_reminder', 'focus_technique', 'environment_tip'
is_read BOOLEAN DEFAULT FALSE NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE INDEX idx_ai_suggestions_user_id ON ai_suggestions(user_id);
COMMENT ON TABLE ai_suggestions IS 'Stores AI-generated personalized suggestions for improving focus.';API Endpoints
/api/auth/signupRegisters a new user (with Supabase Auth)./api/auth/loginAuthenticates a user and issues a session token./api/user/meRetrieves the authenticated user's profile information./api/user/meUpdates the authenticated user's profile information./api/focus-sessionsStarts a new focus session./api/focus-sessions/:idEnds an ongoing focus session, updating duration, score, and notes./api/focus-sessionsRetrieves a list of all past focus sessions for the user./api/focus-sessions/statsRetrieves aggregate statistics for user's focus sessions (e.g., total focus time, average score)./api/blocked-sitesRetrieves the user's configured blocked sites list./api/blocked-sitesAdds a new URL pattern to the user's blocked sites configuration./api/blocked-sites/:idUpdates an existing blocked site configuration./api/blocked-sites/:idRemoves a blocked site configuration./api/browser-extension/configProvides the browser extension with the current user's blocked sites and session status./api/browser-extension/distraction-eventLogs an attempt to access a blocked site during a focus session./api/billing/checkout-sessionInitiates a Stripe checkout session for subscription./api/billing/webhookStripe webhook endpoint for subscription updates./api/ai-suggestionsRetrieves personalized AI suggestions for improving focus.Start Building with AI
Copy this prompt for Cursor, v0, Bolt, or any AI coding assistant
BuilderDaily Team
VerifiedIndie hackers and full-stack engineers creating validated Micro-SaaS blueprints with production-ready tech stacks.
Related Blueprints
More Micro-SaaS ideas you might like to build
API CostPilot
Real-time API expense tracking, forecasting, and optimization for developers.
EcoContent Auditor
Analyze and reduce the digital carbon footprint of your website content.
ClientFlow Metrics
Custom client progress tracking for health & wellness practitioners.
Gap Alert
Today's gap expires in ~14 hours
Get tomorrow's blueprint delivered to your inbox so you never miss a profitable idea.
(Email delivery launching soon β sign up to be first!)