Skip to content

Run your own backend

The backend only matters in hosted mode. It is the part that holds provider keys. Running your own is a first-class option, because a hosted default only means something if the alternative actually works.

Run it with no accounts at all

It works with no accounts, but you have to ask for that by name, so an unconfigured deploy is never accidentally an open one.

SAATHI_ALLOW_ANONYMOUS=1 npm run dev -w backend
curl localhost:8787/health

It reports its own posture

/health answers with closed, anonymous or tokens, so you can see what you just deployed without reading the config back.

{"ok":true,"version":"0.2.0","auth":"anonymous"}

On your own box

selfhost/ has a Dockerfile, a compose file and a Caddy site block.

cd selfhost
docker compose up -d

Or straight onto a VPS

No default target is baked into the repository. You name the box.

export SAATHI_SERVER=root@your-box
npm run deploy:selfhost -- --env

Mac and Windows, from one agreement.

Two native clients that share no code: one Swift, one C#. The only thing holding them together is a contract, and nothing about a contract is checked by a compiler. So it is generated.

contract/schema/saathi.json

Swiftthe macOS client
C#the Windows client
TypeScriptthe backend

Generated, not written. The build fails the moment what is committed stops matching the schema, and a script runs both clients side by side to compare what they say.