Persistent storage backends for DomoTactical-TS - PostgreSQL, KurrentDB/EventStoreDB, and Cloudflare D1
npm install domo-tactical-storage









Persistent storage backends for DomoTactical-TS - providing production-ready Journal and DocumentStore implementations for KurrentDB/EventStoreDB, PostgreSQL, and Cloudflare D1.
DomoTacticalStorage-TS extends DomoTactical with pluggable persistence backends:
| Backend | Journal | DocumentStore | Best For |
|---------|---------|---------------|----------|
| KurrentDB | Yes | - | Event-first architectures, native event streaming |
| PostgreSQL | Yes | Yes | Traditional deployments, ACID compliance |
| Cloudflare D1 | Yes | Yes | Edge computing, serverless, global distribution |
All implementations are actor-based, async-first, and fully compatible with DomoTactical's event sourcing and CQRS patterns.
``bash`
npm install domo-tactical-storage domo-tactical domo-actors
`typescript
import { stage } from 'domo-actors'
import { KurrentDBConfig, KurrentDBJournal } from 'domo-tactical-storage/kurrentdb'
// Create configuration from connection string
const config = KurrentDBConfig.fromConnectionString('esdb://localhost:2113?tls=false')
// Create journal as an actor
const journal = stage().actorFor({
type: () => 'Journal',
instantiator: () => ({ instantiate: () => new KurrentDBJournal(config) })
})
// Register for your context
stage().registerValue('domo-tactical:myapp.journal', journal)
// Now your EventSourcedEntity classes will automatically use this journal
`
`typescript
import { stage } from 'domo-actors'
import { PostgresConfig, PostgresJournal } from 'domo-tactical-storage/postgres'
// Create configuration from connection string
const config = PostgresConfig.fromConnectionString(process.env.DATABASE_URL!)
// Create journal as an actor
const journal = stage().actorFor({
type: () => 'Journal',
instantiator: () => ({ instantiate: () => new PostgresJournal(config) })
})
// Register for your context
stage().registerValue('domo-tactical:myapp.journal', journal)
// Now your EventSourcedEntity classes will automatically use this journal
``
- DomoTacticalStorage Guide - Complete setup and usage documentation
- DomoTactical Documentation - Core framework documentation
- DomoActors Documentation - Actor model foundation
- KurrentDB Backend
- Native event store integration
- UUID v7 for time-ordered event IDs
- Stream lifecycle management (tombstone, soft-delete)
- Subscription support for projections
- PostgreSQL Backend
- Full Journal implementation with optimistic concurrency
- DocumentStore for query models
- JSONB storage for efficient querying
- Connection pooling support
- Cloudflare D1 Backend
- Edge-native SQLite storage
- Journal and DocumentStore implementations
- Optimized for Workers runtime
- ULID for k-sortable event IDs
- Node.js >= 18.0.0
- domo-tactical >= 0.3.0
- domo-actors >= 1.2.0
- KurrentDB: KurrentDB 26.0+
- PostgreSQL: PostgreSQL 12+ with JSONB support
- D1: Cloudflare Workers with D1 binding
Licensed under the Reciprocal Public License 1.5 (RPL-1.5)
See LICENSE.md for details.
- VLINGO/XOOM Platform - Original Java implementation
- DomoTactical-TS - Core tactical patterns
- DomoActors-TS - Actor model foundation
- Authored by Vaughn Vernon