TinyStore documentation
TinyStore documentation
TinyStore gives an application SQL databases, key-value state, background jobs, files, search, channels, locks, settings, logs and metrics in one directory on its own disk. The core is written in Rust. Rust programs call it directly, and Bun, Node, Python and Go programs reach the same core through their SDK.
The documentation has three parts, each for a different moment:
- Learn from scratch: the Handbook builds one application, an AI chat, chapter by chapter, from a first store to copies in another region, and explains why TinyStore is built the way it is.
- Explore the engines: the Guides cover each engine, a page per feature, for when you know what you need: expiry in KV, retries in Jobs, filters in Search.
- Browse the API: the Reference lists every call of every SDK, generated from the source.
Every example is shown in TypeScript, Python, Go and Rust.
Handbook
Start
Building the chat
- Messages
- Sessions and limits
- Replies in the background
- Attachments
- Finding old messages
- Live updates
- Settings
- What it is doing
- How fast it is
- Keeping it
Under the hood
- The journey of a write
- SQLite as TinyStore runs it
- One budget of memory
- Time and errors
- How a job lives
- How logs and metrics pack
- How search finds
- One core, four languages
Beyond one machine
Production
Guides
Engines
SQL
- Overview
- Migrations
- Writes and transactions
- Tables and queries
- Rows that include rows
- Buckets and queues in a database
- FTS5 and R*Tree
KV
Jobs
- Overview
- Ids
- Schedules and cron
- Concurrency and rate
- Watching a job
- Steps
- Jobs in your database
- Testing
Blobs
Search
- Overview
- Fields and weights
- Typos
- Filters
- Vectors
- Words and vectors together
- A table's index
- Rebuilds