What is DeltaBase?
A TypeScript-native event store that doesn't suck
What is DeltaBase?
Section titled “What is DeltaBase?”DeltaBase is the event store that doesn’t make you hate event sourcing.
The Problem You Know Too Well
Section titled “The Problem You Know Too Well”Your customer calls: “My account balance is wrong, but I can’t tell you what happened because we overwrote the data.”
Your auditor asks: “Prove this transaction was authorized.”
Your PM wants: “Can we add real-time notifications without rebuilding everything?”
Your database says: “Here’s your current state. Good luck figuring out how you got here.”
What DeltaBase Actually Does
Section titled “What DeltaBase Actually Does”Instead of losing your data’s story, DeltaBase keeps every chapter:
// Your database loses historyawait db.users.update(userId, { balance: 150 });// How did we get $150? Nobody knows.
// DeltaBase preserves the storyawait eventStore.append('user-123', [ { type: 'MoneyDeposited', amount: 100, source: 'payroll' }, { type: 'MoneyDeposited', amount: 50, source: 'refund' }]);// Perfect audit trail. Time travel debugging. Zero data loss.
The result? Every bug is reproducible. Every audit is trivial. Every “how did this happen?” has an answer.
Why We Built It
Section titled “Why We Built It”After years of building software for Fortune 150 companies - dealing with SOX compliance, gathering requirements under pressure, and maintaining audit trails - we went down the rabbit hole: clean code → DDD → CQRS → event sourcing.
Event sourcing was a revelation. Perfect audit trails. No data loss. Functional architecture that actually works. But the tooling sucked.
The problems we kept hitting:
- Too much overhead - EventStoreDB requires containers, VMs, complex setup
- Expensive cloud offerings - Existing solutions cost a fortune and perform poorly
- Poor TypeScript support - Built for Java/C#, not modern JavaScript
- Serverless incompatible - Can’t run on Cloudflare Workers, Vercel Edge, Lambda
- Scary reputation - People think event sourcing is complex (it’s not, when done right)
What we built instead:
- Zero-config local development -
npx @delta-base/cli dev
and you’re running - TypeScript-native - Built for modern JavaScript, not ported from Java
- Edge-first - Runs on Cloudflare’s global network, close to your users
- Beautiful tooling - Studio UI that makes debugging feel like time travel
- Honest documentation - We tell you when NOT to use event sourcing
We’re fixing event sourcing’s adoption problem by making it actually enjoyable to use.
The Package Ecosystem
Section titled “The Package Ecosystem”DeltaBase is split into focused packages:
@delta-base/server
Section titled “@delta-base/server”Your event store client. Like a database driver, but for events.
import { DeltaBase } from '@delta-base/server';
const eventStore = deltabase.getEventStore('banking');await eventStore.appendToStream('account-123', events);
@delta-base/cli
Section titled “@delta-base/cli”Local development server and deployment tools.
npx @delta-base/cli dev# → Local event store + Studio UI
@delta-base/toolkit
(optional)
Section titled “@delta-base/toolkit (optional)”Application-level patterns like command handlers and projections.
import { createDecider } from '@delta-base/toolkit';
const accountDecider = createDecider({ decide: (command, state) => events, evolve: (state, event) => newState});
When to Use DeltaBase
Section titled “When to Use DeltaBase”✅ Great fit when you need:
Section titled “✅ Great fit when you need:”- Audit trails - Financial systems, healthcare, legal compliance
- Time travel debugging - “What did the system look like last Tuesday?”
- Collaborative features - Multiple users editing the same data
- Complex business workflows - Multi-step processes with rollbacks
- Independent read scaling - Different views of the same data
❌ Skip it when:
Section titled “❌ Skip it when:”- Simple CRUD is enough - Basic user profiles, settings pages
- Your team isn’t ready - Event sourcing adds conceptual complexity
- Data rarely changes - Reference data, configuration
How It Works
Section titled “How It Works”- Commands - What users want to do (
DepositMoney
,PlaceOrder
) - Events - What actually happened (
MoneyDeposited
,OrderPlaced
) - State - Current reality, calculated from events
// Business logicconst events = decide(command, currentState);
// Store the factsawait eventStore.append(streamId, events);
// Update viewsconst newState = evolve(currentState, events);
Real-World Example
Section titled “Real-World Example”Traditional e-commerce:
UPDATE inventory SET quantity = quantity - 1 WHERE product_id = 'pizza';UPDATE orders SET status = 'confirmed' WHERE id = 'order-123';-- What if something fails? What was the original quantity?
DeltaBase e-commerce:
await eventStore.append('inventory-pizza', [ { type: 'ItemReserved', orderId: 'order-123', quantity: 1 }]);
await eventStore.append('order-123', [ { type: 'OrderConfirmed', items: [...], total: 15.99 }]);
// Perfect audit trail, can replay any scenario, debug any issue
What Makes It Different
Section titled “What Makes It Different”-
TypeScript-Native: Built for modern JavaScript/TypeScript apps, not ported from Java.
-
Edge-First: Runs on Cloudflare Workers, Vercel Edge Functions, anywhere V8 runs.
-
Developer Experience: Beautiful Studio UI, zero-config local development, great error messages.
-
Honest Documentation: We tell you when NOT to use event sourcing.
The Platform
Section titled “The Platform”DeltaBase runs on Cloudflare’s edge network. This means:
- Global performance - Your events are stored close to your users worldwide
- Automatic scaling - From zero to millions of events without configuration
- Multi-tenant ready - Spin up event stores programmatically via API
- Always available - Built on Cloudflare’s 99.99% uptime infrastructure
The platform includes:
- Event Store API - Append events, read streams, query data
- Management API - Create and manage event stores programmatically
- Event Bus - Subscribe to events via webhooks or WebSockets
- Studio UI - Beautiful visualization and debugging interface
Getting Started
Section titled “Getting Started”Ready to see it in action?
- Store your first event - Working code in 2 minutes
- Package installation - Add to existing projects
- Learn the concepts - Understand the theory
Event sourcing isn’t rocket science. Events go in, state comes out. Everything else is just details.