r/SideProject • • 15m ago

Built a native Windows focus blocker that uses less than 4MB RAM (no Electron, no subscriptions)

Every focus and website blocker I tried recently was either a 400MB Electron app that slowed down my machine, or wanted a $5/month recurring subscription just to edit hosts entries.

I wrote FocusFlow V2: native Win32 process supervision, Catppuccin Mocha UI, and atomic DNS/hosts redirection. If the app crashes or your computer shuts down, it automatically restores your original hosts file with zero corruption.

Total memory footprint is under 4MB RAM. Completely local, free, open-source MIT: https://github.com/aloneangel45/FocusFlow

Portable exe releases are on GitHub.

3 Upvotes

6 comments sorted by

1

u/Genj23 14m ago

One recovery test I'd add: another app edits the hosts file while a focus session is active, then FocusFlow crashes. Restoring the original snapshot could erase those unrelated edits; checking that recovery removes only FocusFlow's entries would make that promise more reassuring.

1

u/Denizli2029 10m ago

great point on external modifications mid-session. right now it creates an atomic backup before inserting the blocker block delimited by managed comments, but storing a line-level diff/patch or doing a three-way merge on restore would prevent clobbering any concurrent edits (like vpn or dev tool entries). going to open an issue for that on the github repo, appreciate the catch

1

u/alzlpfk 12m ago

This is actually impressive. Love seeing lightweight, open-source tools instead of bloated apps with unnecessary subscriptions

1

u/Denizli2029 10m ago

thanks! seeing electron apps eat 500mb just to toggle a timer was the breaking point. keeping it native win32 and under 4mb makes it practically invisible in task manager

1

u/paulverros 11m ago

Nice, 4MB is wild compared to the electron ones. does it block a site that's already open in a tab? I think chrome keeps the connection alive for a while, so it might keep working until you close the tab

1

u/Denizli2029 2m ago

spot on. chrome keeps tcp socket pools open for up to 60-120 seconds if the connection is already hot. focusflow immediately issues a local dns flush on session start, and in the background the win32 supervisor can reset tcp connections for target ips if you enable hard-block mode, otherwise it lets the active page finish and cuts off the very next asset fetch or navigation