Skip to content

Installation

Get DeltaBase running in minutes

Install packages. Start building. Deploy anywhere.

DeltaBase is split into focused packages:

  • @delta-base/server - Core SDK for building event-sourced applications
  • @delta-base/cli - Local development server and deployment tools
  • @delta-base/toolkit - Application-level utilities (optional)

Most projects need server + cli. Add toolkit for advanced patterns.

Terminal window
npm create @delta-base/app my-app
cd my-app
npm install

This creates a new project with DeltaBase server SDK and CLI pre-configured.

If you already have a project:

Terminal window
# Core packages
npm install @delta-base/server @delta-base/cli
# Optional: application utilities
npm install @delta-base/toolkit

Run the DeltaBase CLI:

Terminal window
npx @delta-base/cli dev

This starts:

  • Local event storage (SQLite)
  • Development server
  • Studio UI at http://localhost:3000

Events stored locally. No cloud, no API keys, no setup.

Studio UI opens at http://localhost:3000 for debugging and monitoring.

Works with Hono for universal deployment:

import { Hono } from 'hono';
import { createEventStore } from '@delta-base/server';
const app = new Hono();
const eventStore = createEventStore('banking');
app.post('/accounts/:id/deposit', async (c) => {
const { amount } = await c.req.json();
await eventStore.appendToStream(c.req.param('id'), [
{ type: 'MoneyDeposited', amount }
]);
return c.json({ success: true });
});
app/api/deposit/route.ts
import { createEventStore } from '@delta-base/server';
const eventStore = createEventStore('banking');
export async function POST(request: Request) {
const { accountId, amount } = await request.json();
await eventStore.appendToStream(accountId, [
{ type: 'MoneyDeposited', amount }
]);
return Response.json({ success: true });
}
import express from 'express';
import { createEventStore } from '@delta-base/server';
const app = express();
const eventStore = createEventStore('banking');
app.post('/deposit', async (req, res) => {
const { accountId, amount } = req.body;
await eventStore.appendToStream(accountId, [
{ type: 'MoneyDeposited', amount }
]);
res.json({ success: true });
});

Define your event types:

interface BankingEvent {
type: 'MoneyDeposited' | 'MoneyWithdrawn';
amount: number;
}
const eventStore = createEventStore<BankingEvent>('banking');

Same code runs everywhere:

  • Cloudflare Workers
  • Vercel Edge Functions
  • Deno Deploy
  • Node.js servers
  • Docker containers

Events sync to your cloud storage automatically.

You’re ready. Try: