A local-first, open-source web app that turns the moment of an impulsive urge into a meditative pause. It runs in any modern browser, on a phone or a computer.
When the urge to gamble, scroll, drink, smoke, or otherwise act on an impulse hits, you open Urge Surfer instead. You name what you want to do. You rate how strong the urge feels. You complete a slow drawing meditation — tracing self-compassion phrases in cursive, with simulated weight that forces the practice to be unhurried. You rate the urge again. You log the wave you just surfed.
Over time, the count of waves surfed grows. There are no streaks to break. Every pause counts as a win.
Early development. Formerly a Flutter phone app; now a plain HTML/CSS/JavaScript web app with no build step and no dependencies.
git clone <repository-url>
cd urge-surfer
docker compose up dev --build
Open http://localhost to play with the app. Development mode live-mounts the source tree, so edits appear after a browser refresh. It includes Just write and the pen lag checkbox. Stop it with docker compose down.
Without Docker, run python3 -m http.server 8000 and open http://localhost:8000. Opening index.html directly from disk does not work because browsers refuse ES modules over file://.
SITE_ADDRESS already defaults to urgesurfer.surf. Point that domain at the server, then run:
docker compose up prod -d --build
Production removes both development-only controls. Caddy obtains and renews HTTPS automatically. Run docker compose down before switching between development and production because both use port 80.
localStorage. What you typed, how you rated the urge and which phrase you traced are discarded and never sent anywhere.What this app protects:
localStorage under the origin you loaded the page from. It is never uploaded, and there is no cloud sync, analytics, or crash reporting. tool/check_no_network.sh proves the source contains no networking calls and references no remote hosts; CI runs it on every change.localStorage, so your waves do not follow you to other devices.What this app does not protect against, and where a web app is genuinely weaker than the phone app it replaces:
localStorage is not encrypted. Anyone who can use your unlocked browser profile can read it, including from the developer tools. The phone app kept an encrypted database with the key in the OS secure enclave; a browser has no equivalent.Contributions are welcome — code, translations, phrase reviews, and especially clinical or peer-support input on the phrase library. See CONTRIBUTING.md.
The phrase library is the highest-leverage content artifact. Phrases are reviewed against Kristin Neff's self-compassion framework and the Wood, Perunovic & Lee (2009) self-affirmation backfire criteria before any release. Linguistic and cultural translation is a real contribution category — not a mechanical translation task.
Source code: AGPL-3.0.
Phrase library content (assets/phrases/): CC BY-SA 4.0.
Sacramento reference font: SIL Open Font License 1.1.
Urge Surfer's handwriting system was inspired by Robin Linacre's letterpaths project. The editable lowercase centerlines were initially seeded from its MIT-licensed glyph data.
Mechanically informed by:
Brian J. Bonislawsky's Sacramento typeface is distributed under the SIL Open Font License 1.1 and is vendored as an aligned reference overlay for the glyph editor.
This project is not affiliated with any of the researchers, institutions, or projects above.
28 commits
Hacker News (1)
Python
59.8%
JavaScript
35.3%
CSS
2.2%
HTML
1.7%
A local-first, open-source web app that turns the moment of an impulsive urge into a meditative pause. It runs in any modern browser, on a phone or a computer.
When the urge to gamble, scroll, drink, smoke, or otherwise act on an impulse hits, you open Urge Surfer instead. You name what you want to do. You rate how strong the urge feels. You complete a slow drawing meditation — tracing self-compassion phrases in cursive, with simulated weight that forces the practice to be unhurried. You rate the urge again. You log the wave you just surfed.
Over time, the count of waves surfed grows. There are no streaks to break. Every pause counts as a win.
Early development. Formerly a Flutter phone app; now a plain HTML/CSS/JavaScript web app with no build step and no dependencies.
git clone <repository-url>
cd urge-surfer
docker compose up dev --build
Open http://localhost to play with the app. Development mode live-mounts the source tree, so edits appear after a browser refresh. It includes Just write and the pen lag checkbox. Stop it with docker compose down.
Without Docker, run python3 -m http.server 8000 and open http://localhost:8000. Opening index.html directly from disk does not work because browsers refuse ES modules over file://.
SITE_ADDRESS already defaults to urgesurfer.surf. Point that domain at the server, then run:
docker compose up prod -d --build
Production removes both development-only controls. Caddy obtains and renews HTTPS automatically. Run docker compose down before switching between development and production because both use port 80.
localStorage. What you typed, how you rated the urge and which phrase you traced are discarded and never sent anywhere.What this app protects:
localStorage under the origin you loaded the page from. It is never uploaded, and there is no cloud sync, analytics, or crash reporting. tool/check_no_network.sh proves the source contains no networking calls and references no remote hosts; CI runs it on every change.localStorage, so your waves do not follow you to other devices.What this app does not protect against, and where a web app is genuinely weaker than the phone app it replaces:
localStorage is not encrypted. Anyone who can use your unlocked browser profile can read it, including from the developer tools. The phone app kept an encrypted database with the key in the OS secure enclave; a browser has no equivalent.Contributions are welcome — code, translations, phrase reviews, and especially clinical or peer-support input on the phrase library. See CONTRIBUTING.md.
The phrase library is the highest-leverage content artifact. Phrases are reviewed against Kristin Neff's self-compassion framework and the Wood, Perunovic & Lee (2009) self-affirmation backfire criteria before any release. Linguistic and cultural translation is a real contribution category — not a mechanical translation task.
Source code: AGPL-3.0.
Phrase library content (assets/phrases/): CC BY-SA 4.0.
Sacramento reference font: SIL Open Font License 1.1.
Urge Surfer's handwriting system was inspired by Robin Linacre's letterpaths project. The editable lowercase centerlines were initially seeded from its MIT-licensed glyph data.
Mechanically informed by:
Brian J. Bonislawsky's Sacramento typeface is distributed under the SIL Open Font License 1.1 and is vendored as an aligned reference overlay for the glyph editor.
This project is not affiliated with any of the researchers, institutions, or projects above.
Hacker News (1)
28 commits
Python
59.8%
JavaScript
35.3%
CSS
2.2%
HTML
1.7%