Your First Live Query
This tutorial uses the released KalamDB 0.8 server, Docker, and the built-in Admin UI. You will insert a row, subscribe to it, then change it in a second tab to see the first tab update without refreshing.
You need Docker and a terminal. No Node.js app, SDK or Rust compiler is required.
1. Start the server
Check that the server responds:
If you already have a container named kalamdb, reuse it or stop/remove it before repeating the command. The named Docker volume persists data between container replacements.
2. Set up local authentication
If the status response says "needs_setup": true, create the initial account:
These example passwords are for an isolated local tutorial only. Change them for any real deployment. Do not expose a remotely accessible setup endpoint on an untrusted network.
If setup reports that the server is already configured, use the credentials from that existing installation instead of repeating setup.
3. Create a private table
Open KalamDB Admin UI and sign in with admin and the password you used in step 2.
In SQL Studio, run:
You should see a todo row. TYPE = 'USER' means the table’s rows belong to the authenticated user. Another user will not see these private rows even when running the same SQL.
4. Watch the query update live
In one SQL Studio tab, enter only this query, turn on Live query mode and run it:
Keep that tab open. In another browser tab, sign in with the same account, open SQL Studio, and run:
The row should disappear from the filtered live result in the first tab without manually refreshing it. That is the core KalamDB live-query workflow.
Live SQL is intentionally narrower than general SQL: start with a single table and supported WHERE predicates. Avoid joins, aggregates, ORDER BY or LIMIT in the subscription query.
What you just used
| Building block | What happened |
|---|---|
| SQL | You created, inserted and updated rows using familiar SQL |
USER table | KalamDB scoped the data to the signed-in account |
| Live query | KalamDB pushed changes to a subscribed result set |
| Admin UI | You tested the backend without writing a frontend |
Build a real application next
Connect with the TypeScript SDK, Rust SDK, or Dart / Flutter SDK. For a complete application architecture, see how KalamDB works and topics and server functions.
0.8 SDK template note: The published CLI-generated TypeScript starters still reference older 0.7-beta SDK versions. Do not assume kalam init --template chat-with-ai or simple-live runs against 0.8 as generated. Use the 0.8 CLI compatibility notes before using those templates.