State & Storage
Key-value store, collections, and append-only streams.
Beyond your application database, Chimpbase provides built-in storage primitives for operational state.
Key-Value Store
Simple key-value storage for configuration, flags, and lightweight state:
Stored in the _chimpbase_kv table.
Collections
Schemaless JSON document storage for data that doesn't need a rigid schema:
Stored in the _chimpbase_collections table.
Streams
Append-only event streams for audit logs, activity feeds, and event sourcing patterns:
Stored in the _chimpbase_stream_events table.
Storage Engines
Chimpbase supports three storage engines. PostgreSQL is the recommended default for production.
PostgreSQL (Recommended)
Full distributed coordination. Use PostgreSQL when:
- Multiple runtime instances need to coordinate
- You need durable queues, workflows, and cron across processes
- You want application data and operational state in the same database
SQLite
Single-process coordination. Good for:
- Local development
- Tests
- Isolated single-runtime deployments
SQLite is available across Bun, Deno, and Node hosts.
In-Memory
Ephemeral storage for tests:
All state is lost when the process exits.
Internal Tables
Chimpbase manages its own tables, prefixed with _chimpbase_:
| Table | Purpose |
|---|---|
_chimpbase_events | Pub/sub event bus |
_chimpbase_kv | Key-value store |
_chimpbase_collections | JSON document storage |
_chimpbase_stream_events | Append-only event streams |
_chimpbase_cron_schedules | Durable cron metadata |
_chimpbase_workflows | Workflow state |
_chimpbase_queue_jobs | Job queue with retry tracking |
_chimpbase_logs | Persisted log entries |
_chimpbase_metrics | Persisted metrics |
_chimpbase_traces | Persisted trace spans |
These tables are created and migrated automatically. Your application tables live alongside them in the same database.
Schema Management
Use the CLI to generate and check schema migrations: