try it — the whole api fits on one screen
curl -X PUT $URL/kv/welcome -H "Content-Type: application/json" -d '{"value":"hello","ttl":3600}' {"ok":true,"key":"welcome","seq":43,"queued":false,"persisted":true} curl $URL/kv/welcome {"key":"welcome","value":"hello"} curl $URL/keys {"keys":["welcome","session:9f2c","flag:beta"]} curl $URL/health {"ok":true,"mode":"long","journal":{"seq":43,"pendingOps":0,"snapshotEvery":10}}
strata --help
- --git
- every write is a commit. history is the database — grep it, revert it, audit it.
- --journal
- one tiny json op appended per change; snapshot consolidates every 10 ops.
- --ttl
- keys expire on their own. urls, tokens, feature flags.
- --token
- set API_TOKEN and everything answers 401 without Bearer. timing-safe.
- --concurrency
- instances racing on the same op renegotiate the seq and retry. no lost writes.
- --deps
- zero. node ≥ 20.6 is the entire stack.
cat how-it-runs.txt
client ─▶ PUT /kv/x ─▶ journal/000043.json (one small commit per op)
│
└─ every 10 ops ─▶ snapshot.json ─▶ old journal entries compacted
| long-lived — node · docker · heroku · render | serverless — vercel · netlify | |
|---|---|---|
| reads | memory, zero round-trips | revalidated per request |
| writes | instant reply, async queue | committed before answering |
| storage | local file or codeberg | codeberg |
deploy — pick your platform
| vercel | button above; needs STORAGE + CODEBERG_* vars |
| netlify | netlify.toml is already in the repo |
| docker | docker run -p 8787:8787 --env-file .env strata |
| heroku | app.json manifest, deploys from your dashboard |
| render | render.yaml, healthcheck on /health |
| node | npm install && npm start — that's the whole install |
man strata — API
| method | path | |
|---|---|---|
| GET | / | this page |
| GET | /health | journal status; never requires auth |
| GET | /keys | list non-expired keys |
| GET | /kv/:key | read a value |
| PUT | /kv/:key | write {"value":…,"ttl":3600} |
| DELETE | /kv/:key | delete a key |
figure out responses
writes reply with seq (journal position) plus queued/persisted, so the client always knows which durability guarantee it actually got.