Start Here
Use this page as the shortest route through the docs. Orisun has a small API surface, but the right starting point depends on whether you are trying to run a server, embed the store, model consistency, or operate a deployment.
Pick Your Path
| Goal | Read first | Then read |
|---|---|---|
| Try Orisun locally | Getting Started | Tutorial |
| Embed Orisun in a Go service | Go Embedding | Storage Backends |
| Model a business invariant | Command Context Consistency | Positions |
| Save, query, and subscribe | EventStore API | Clients |
| Prepare production settings | Configuration | Deployment |
| Debug a running node | Troubleshooting | Observability |
Fastest Local Loop
For a local server, use SQLite first. It runs the event log, admin state, indexes, publisher checkpoints, and embedded JetStream state without a separate database.
- Download
orisun-sqlitefrom GitHub Releases. - Start it with the SQLite binary example.
- Verify gRPC with Verify the API.
- Save an event with Save your first event.
Move to PostgreSQL when you need multiple Orisun nodes or database-managed operations.
Mental Model
Orisun applications usually follow this loop:
- Define a boundary, such as
ordersorledger. - Query the event data that matters to the command.
- Save new events only if that queried context is still at the expected position.
- Subscribe with catch-up replay from storage, then continue from live JetStream messages.
event_type is the API field for the event's type. Orisun stores it in event data as the canonical eventType JSON key, derives returned event types from that key, and lets content criteria and JSON indexes use eventType without duplicating it in every payload.
NATS Choices
Standalone and embedded Orisun start embedded NATS JetStream by default.
Use embedded NATS when you want the simplest deployment. Set ORISUN_NATS_URL or use the Go embedding NATS options when you already operate a JetStream-enabled NATS server. Embedded Go callers can also use Orisun's in-process NATS handles directly instead of connecting to a URL.
SQLite remains single-node only and must run with NATS clustering disabled.