Deployment Overview
Causet is a suite of services deployed together. This section covers how to run them in production, what infrastructure they depend on, and how to move from a compiled IR artifact to a live deployment.
Services
| Service | Language | Port(s) | Role |
|---|---|---|---|
causet-runtime-service | Java / Spring WebFlux | 8080 (HTTP), 9090 (gRPC) | Intent processing, ledger writes, rule evaluation |
causet-query-service | Java / Spring WebFlux | 8082 | Named query execution against projection tables |
causet-projection-worker | Java / Spring WebFlux | — (Kafka consumer) | Consumes projection events, UPSERTs into projection tables |
causet-saas-cloud | Java / Spring | 8085 | Control plane API: platforms, applications, releases, forks |
causet-cloud-control-plane | Next.js | 3000 | Web UI for the control plane |
ws-gateway-go | Go | 8081 | WebSocket gateway for real-time event push |
causet-compiler | Java | — (CLI) | Compiles .causet DSL files into IR artifacts |
causet-cli | Go | — (CLI) | Developer CLI: deploy, release, query |
Service dependency graph
Required infrastructure
| Component | Purpose | Local equivalent |
|---|---|---|
| PostgreSQL (causet DB) | Event store (ledger_events) + tenant schemas | Docker Compose Postgres |
| PostgreSQL (projections DB) | Projection tables per tenant | Same Postgres instance, separate DB |
| Kafka / Redpanda | Event streaming between runtime and projection worker | Redpanda in Docker Compose |
| Redis | IR artifact cache + optional query result cache | Redis in Docker Compose |
| S3 / MinIO | Compiled IR artifacts per release version | MinIO in Docker Compose |
| Clerk | JWT authentication for control plane and SaaS API | Clerk dev instance |
Deploy artifacts
A Causet release consists of two IR artifacts produced by causet-compiler:
causet.runtime.json— rule definitions, action schemas, event definitions loaded bycauset-runtime-servicecauset.projections.json— projection definitions and DDL loaded bycauset-projection-workerandcauset-query-service
Both artifacts are uploaded to S3 under a versioned path:
s3://{bucket}/{irVersion}/causet.runtime.json
s3://{bucket}/{irVersion}/causet.projections.jsonServices fetch their IR artifact from S3 on startup and when a new release is activated.
Release flow
- Compile — run
causet-compileragainst your.causetfiles - Upload IR — push both artifacts to S3 at the versioned path
- Create release — register the IR version in
causet-saas-cloud - Deploy to fork — activate the release on a specific fork (e.g.,
production) - Services reload — runtime and projection worker fetch new IR, DDL is applied
Deployment models
Local Docker Compose
All services run in a single docker compose up -d. Infrastructure (Postgres, Redpanda, Redis, MinIO) is included. Suitable for development and integration testing.
See Local Stack.
AWS ECS
Production deployment uses AWS ECS with:
- RDS PostgreSQL (two instances or two databases)
- Amazon MSK or self-managed Redpanda on EC2
- ElastiCache Redis
- S3 for IR artifacts
- ECR for Docker images
- ALB for HTTP routing
See AWS / ECS.
Any container platform
Causet services are standard Docker containers. They can run on Kubernetes, Fly.io, Railway, or any platform that supports Docker. The only requirements are network connectivity to the infrastructure listed above and the environment variables described in Environment Variables.
Section pages
- Local Stack —
docker compose upfor local development - Docker — building images, container configuration
- AWS / ECS — production deployment on AWS
- Database Migrations — how schema changes work
- Environment Variables — complete env var reference
- Health Checks —
/actuator/healthand ECS configuration - Release Checklist — pre-deploy and post-deploy verification