Four services that share one identity, one permission model and one space. Use them from an HTML page, the REST API or MCP.
A real SQL database for every space, close to your data.
- Each table is a SQLite table on a Durable Object, not JSON rows
- Indexes, required, unique and default columns, relations between tables
- Exported to separate storage every night
-- One real SQLite database per space
SELECT "Name", "Due" FROM "Tasks"
WHERE "Status" != 'Done'
ORDER BY "Due";
Realtime editing and presence for every page in a space.
- Operational transform with a server referee, not last write wins
- Live cursors, who is where, and changes pushed to every open tab
- Shared live state for HTML pages, per user
// HTML page: live state, synced across your tabs
think.setState({ filter: "mine" });
addEventListener("think:state", (e) => render(e.detail));
addEventListener("think:data", () => reload());
Serverless routes, schedules and table triggers for each space.
- Routes written like Hono, served at their own URL
- Cron schedules, handlers that run when a table changes, webhooks
- Runs as a service account, while policy still checks the caller
app.post("/tasks/:id/complete", async (c) => {
const { store } = c.var.think;
await store.update("Tasks", c.req.param("id"), { Status: "Done" });
return c.json({ ok: true });
});
One place that decides who can see and change what.
- Row policies per table, written in a small subset of CEL
- The same rule guards the web app, REST API, MCP and HTML pages
- Databases are closed by default until you add a policy
[
{ "action": "select", "using": "true" },
{ "action": "update", "using": "me in row.Assignee",
"columns": ["Status"] }
]