Expand description
Unified SQLite database for Starpod’s transactional data.
All transactional data (sessions, cron scheduling, authentication) lives in
a single core.db file. A shared connection pool (WAL mode, foreign keys
enabled) serves all three domains.
§Architecture
┌──────────┐
│ CoreDb │ owns SqlitePool (max 10 conns, WAL, FK ON)
└────┬─────┘
│ pool.clone()
├──────────────► SessionManager::from_pool(pool)
├──────────────► CronStore::from_pool(pool)
└──────────────► AuthStore::from_pool(pool)§Databases kept separate
- memory.db — FTS5 + vector blobs, bulk reindex I/O, different access pattern
- vault.db — AES-256-GCM encrypted, optional (needs
.vault_key), isolated security boundary
§Usage
use starpod_db::CoreDb;
let db = CoreDb::new(std::path::Path::new(".starpod/db")).await?;
// Pass db.pool().clone() to SessionManager, CronStore, AuthStoreStructs§
- CoreDb
- Unified database for sessions, cron, and auth.