Vibe code your own Freedom

Vibe code your own Freedom with a browser blocklist and a session timer. Learn where enforcement belongs, how pause works, and which features to skip.

  • vibe-coding

Vibe code your own Freedom by putting a blocklist where navigation happens. A timer on a web page can remind you to focus. Blocking another site’s navigation needs an extension or another enforcement layer.

The Freedom catalog page calls this smaller project Focuslock. Build one browser extension and its settings page first. You can keep the list locally until you need multiple devices.

Vibe code your own Freedom for one browser

Start with a named list, a duration, and Start. The extension owns the active session. The dashboard reads that state, so closing the dashboard does not end the block.

Store an absolute end timestamp. If you decrement a counter every second, sleeping the laptop makes the timer wrong. After waking, compare the stored timestamp with the current clock and remove expired blocking rules.

Pick a narrow permission set. Ask for access to the domains on the active list. Explain those permissions before requesting them. A first version should tell the owner exactly which browser it supports.

Match hosts without catching unrelated domains

Treat news.ycombinator.com as a hostname. Decide whether a rule includes its subdomains. Matching a URL with includes() can accidentally block a harmless path containing that hostname.

Keep a small table of expected decisions. These are proposed app behaviors, not claims about Freedom’s implementation.

Rule Navigation Expected result
news.ycombinator.com news.ycombinator.com/newest Block during session
news.ycombinator.com flaviocopes.com/news.ycombinator.com Allow
youtube.com with subdomains m.youtube.com Block during session
youtube.com exact host music.youtube.com Allow

Use the browser’s supported blocking API rather than injecting a script that races the page. Check the current extension documentation for the chosen browser before asking an agent to implement permissions and rules.

A pause needs an expiry too

Pause removes the active rules until pausedUntil. The next state reconciliation either restores the rules or ends the session. Run that reconciliation when the extension starts and when its alarm fires.

Show the pause deadline beside the session deadline. Otherwise a user who pauses for a call cannot tell when the block returns.

Keep the escape hatch visible. Locked mode changes the project from a focus helper into an enforcement tool. A person who controls their browser can disable an extension; a personal v1 can accept that.

Ask for one behavior at a time

Give your coding agent this scope:

Build Focuslock for one supported browser. Store blocklists and an absolute
session deadline in extension storage. Apply host rules only during an active,
unpaused session. Reconcile rules after restart, wake, pause expiry, and end.
Show which permissions are needed before asking for them. Never store browsing
history. Include host-boundary tests and an explicit end-session control.

Test a blocked page, a harmless hostname, and an expired session. Quit the browser during a session and reopen it. Pause, close settings, then wait for the pause to expire. Those checks exercise the state transitions that a pretty countdown misses.

The catalog estimates eight hours for a basic blocklist and timer, three days for schedules and locked-mode work, and a month or more for native apps across devices. Treat those as planning estimates. Browser permissions and packaging can expand the first one.

A recurring schedule can wait until a manual session survives restart. The scoping post explains how to hold that boundary. Use the coding prompt post when your agent starts adding accounts, analytics, or a social focus feed.

Open the Freedom build prompt, choose one browser, and make the host-boundary checks pass before adding a calendar.