A store is whereDocumentation Index
Fetch the complete documentation index at: https://zapo.to/llms.txt
Use this file to discover all available pages before exploring further.
zapo persists everything a session needs to survive a restart: pairing credentials, Signal protocol state, app-state collections, and optionally your message/thread/contact archive. You build one with createStore and pass it to the client.
The model
createStore separates backends (where data lives) from providers (which backend each domain uses). This lets you mix backends — e.g. keep hot signal state in Redis while archiving messages in Postgres.
backends entry required.
Persisted domains
These hold the state required to keep a session alive. Back them with a durable backend in production.| Domain | Holds |
|---|---|
auth | Pairing credentials and device identity. Persist this. |
signal | Signal sessions (umbrella over the sub-stores below). |
preKey | Signal pre-keys. |
session | Signal sessions. |
identity | Signal identity keys. |
senderKey | Group sender keys. |
appState | App-state collections (mute, pin, read, archive, …). |
privacyToken | Trusted-contact / privacy tokens. |
Optional archive domains
These accept'none' to disable persistence entirely:
| Domain | Holds |
|---|---|
messages | Message archive (B | 'memory' | 'none'). |
threads | Thread metadata. |
contacts | Contact directory. |
Cache domains
Configured undercacheProviders and default to bounded memory with TTLs:
| Domain | Holds |
|---|---|
retry | Outbound message retry queue. |
groupMetadata | Group metadata cache. |
deviceList | Device list cache. |
messageSecret | Message-secret cache for addons. |
Backends
SQLite
@zapo-js/store-sqlite — local, single-process.PostgreSQL
@zapo-js/store-postgres — distributed, relational.MySQL
@zapo-js/store-mysql — distributed, relational.Redis
@zapo-js/store-redis — cache + persistence.MongoDB
@zapo-js/store-mongo — document store.Memory
Built in. Great for tests; does not survive a restart.
Memory-only (tests)
For quick experiments or tests, omitbackends entirely — every domain falls back to memory:
