The Vault:作者開源一款 100% 在裝置上運行的 CBT 思維鏡像工具
I built a CBT mirror that runs 100% on-device — then gave it away
soundmandt 將 The Vault 以 GPL v3 開源,這是一款瀏覽器端 CBT 思維鏡像工具,作者強調它不是治療服務。
There's a version of this story where a guy has a hard year, builds an app about it, and puts it on a store. This isn't that story, because the app store was never going to let this exist the way it needed to.
I'm a sound engineer. Thirty-five years behind mixing boards. I am not a therapist, and The Vault is not therapy. It's a mirror: you type what's actually going on, and it reflects it back at you the way cognitive behavioral therapy teaches — spot the cognitive distortion, name it plainly, get offered a reframe that isn't a greeting-card slogan. No coddling. The mirror doesn't hug you. It shows you the shape of your own thinking and lets you decide what to do with it.
It was built for the people who will never get near actual mental healthcare. Cost, waitlists, geography, pride — pick your wall. If that's your situation, a sounding board that works at 2 a.m. and forgets everything you said is not a compromise. For a lot of people it's the only version that was ever going to happen.
Nothing stored is not a feature. It's the product.
Every design fight on this project ended at the same wall: the moment this thing has a server, an account, a database, analytics — it stops being safe to tell the truth to. So it has none of those.
The Vault is one HTML file plus a lib folder. Open it in a browser and a small language model runs on your device:
WebGPU path: WebLLM running Llama 3.2 1B
CPU fallback: Transformers.js running Qwen 2.5 0.5B
First open downloads the weights (roughly 800 MB on the GPU path, 400 MB on CPU) and caches them. After that it works offline, including on phones — it picked the GPU engine and ran fine on my iPhone, which still slightly blows my mind, because nothing about this went through Apple's ecosystem at all. It's a web page.
Conversation memory is five exchanges, held in RAM. There is a PURGE button, same size as SEND, one press, no confirmation dialog. Nothing is written to localStorage, ever. The TAKE FIVE button — slow breathing and a body scan, paced by voice — works before the model even loads, because the moment you need it is not the moment to watch a progress bar.
The crisis net is narrow on purpose
This is the decision people argue with, so I'll make the argument myself.
Most mental-health software treats any mention of self-harm as a five-alarm fire: interrupt everything, replace the conversation with a hotline form letter, lock the user out of the tool they came to. I understand why lawyers love that. I also know what it feels like from the other side of the screen: you finally said the true thing out loud, and the machine responded by hanging up on you — politely, with a phone number.
The Vault splits the world in two:
Imminent or active danger — a plan for tonight, pills already taken, bleeding that won't stop, voices issuing commands — stops everything. A human sentence, not a form letter ("I'm a mirror, not a lifeline…"), plus tappable real numbers: 988, 911, Poison Control, 211, the Crisis Text Line.
Ideation — "I want to die," the long dark middle most people actually live in — gets listened to. Serious mode, the mirror keeps working, and the same numbers sit in a box on screen, offered rather than imposed.
The matcher that makes this call is clause-based and negation-aware — it reads "I'm not going to hurt myself" differently from "I'm going to hurt myself tonight," because those are different sentences and they deserve different responses. PRs that widen the net get declined, and the README says why. Somebody is in a real crisis whether they have this app or not. Better to have it.
Why GPL, and why now
I could have kept it on my hard drive, where it was doing exactly one person any good. It's GPL v3 now — derivatives must stay open — at https://github.com/soundmandt-dot/the-vault, live at https://soundmandt-dot.github.io/the-vault/
Here's the part I mean most: I can't finish this. There are three issues open in the repo that are really doors:
A Spanish translation. Not a translation of the words — the safety matchers must be rebuilt in Spanish, negation and all, and the crisis numbers are jurisdiction-specific. A translator in Buenos Aires or Madrid owns things I can't: the language, the local numbers, and the battered low-end phone it has to run on.
A service worker, so the page itself — not just the model — survives fully offline.
Matcher test batteries. More scenarios trying to break the line between ideation and emergency, so the line holds.
I build sound for a living. I made this across some late nights because it needed to exist and nobody was selling it without a server attached. It's yours now. If you can carry it somewhere I can't — your language, your country, your $80 phone — that's not a fork. That's the point.
來源:DEV Community · dev.to