Live by default
Watch a record, a query or a view. Changes stream in as they commit, and incremental views send only the delta.
THE REALTIME DATABASE
TwilightDB is a hosted database for apps. Queries stay live and send only what changed, every transaction is strictly serializable, and the same database runs on your own servers when you need it to.
// Issue is your protobuf type: every field is checked, no migrations
const db = new TwilightDB({ baseUrl, token: process.env.TWILIGHTDB_TOKEN }).database("tdb-…-main")
const issues = db.collection("issues", IssueSchema)
// live: the first page, then only what changed, never a re-sent list
for await (const ev of db.watchQuery(issues, { filters: [where("status", "==", Status.OPEN)] }))
render(ev.upserted, ev.removed)
// exact: strictly serializable, retried for you if another write got there first
await db.transaction(async (tx) => {
const sprint = await tx.get(sprints, id)
tx.put(sprints, id, { ...sprint!.value, committed: sprint!.value.committed + points })
})For app developers who'd rather never operate a database, and for agents building apps: everything an app needs from its data, without designing around a database's limits.
Watch a record, a query or a view. Changes stream in as they commit, and incremental views send only the delta.
Strictly serializable across any records you touch, on FoundationDB. No per-transaction document limits to design around.
Collections have protobuf types, stored as data. Change a type without a migration: add the new shape, retire the old.
A query builder in every SDK for everyday and live reads, read-only SQL for reports, full-text and vector search built in.
Validation and per-collection access rules live in the database, so browsers and phones can talk to it directly.
TypeScript, Go, Python, Swift, Java, Kotlin and Dart, plus a Rust client. Webhooks, change streams and Parquet or Iceberg export.
Supabase and Neon are excellent Postgres services. Pick them when you want Postgres; pick TwilightDB when you want live queries and exact transactions without building them yourself.
| TwilightDB | Supabase | Neon | |
|---|---|---|---|
| Data model | Typed records (protobuf), schema as data | Postgres tables | Postgres tables |
| Realtime | Live queries and incremental views that push only the change | Realtime: row changes and broadcast over websockets | Not built in (logical replication to your own consumer) |
| Transactions | Strictly serializable, always | ACID; read committed by default, serializable on request | ACID; read committed by default, serializable on request |
| SQL | Read-only SQL (joins, reports); writes through the SDKs | Full Postgres SQL and extensions | Full Postgres SQL and extensions |
| Branches | Branches and point-in-time restore (a branch copies its data; not yet self-serve on twilightdb.com) | Preview branches | Instant copy-on-write branches |
| Beyond the database | Database only; sign-in tokens checked by its rules | Auth, storage, edge functions included | Database only |
| Run it yourself | Yes: the same product (container, Debian package) | Yes: Docker | Open source; heavier to run |
| Maturity | New; SDKs aren't on package registries yet | Mature, large community | Mature, large community |
The hosted service and the self-hosted database are the same product, built on FoundationDB. Start here and take it in-house later, with the same API and the same data.
protobuf over Connectchange stream kept wholebehind a write fenceper database$0/month
2 databases · 500 MB each
$25/month
10 databases · 8 GB each
$149/month
50 databases · 50 GB each