Installation
Prerequisites
- Node.js 22 or later
- TypeScript 5.9 or later
Install Packages
Install the core framework and configuration package:
npm install @bounda-dev/core @bounda-dev/config
Install the dev tools for code generation as a dev dependency:
npm install --save-dev @bounda-dev/codegen @bounda-dev/ops
Optional Packages
Depending on your stack, you may also need adapter or integration packages:
| Package | Purpose |
|---|---|
@bounda-dev/adapter-postgresql | PostgreSQL adapter for event stores and read models |
@bounda-dev/react-router | React Router integration for server-side rendering |
npm install @bounda-dev/adapter-postgresql
Create a Configuration File
Create a bounda.config.ts file at the root of your project:
import type { Config } from "@bounda-dev/config";
export default {
domain: {
order: {
eventStore: { type: "in-memory" },
},
},
read: {},
} satisfies Config;
This minimal configuration defines a single aggregate (order) with an in-memory event store. You can add read model adapters and additional aggregates as your application grows.
Run Code Generation
Generate types for your domain definitions:
npx bounda generate
This scans your project for events, commands, queries, projections, and other conventions, then writes fully typed interfaces to the .bounda/ directory. Run this command whenever you add or modify domain files.
Note: The generated
+types/directories are managed by Bounda. Do not edit these files manually.
Next Steps
- Quickstart — Build a working order system from scratch.