Development Setup
This guide is for internal team contributors with source repository access. If you’re looking to use Causet today, sign up for Causet Cloud and install the CLI.
Prerequisites
| Tool | Version | Notes |
|---|---|---|
| Docker Desktop | latest | Required — all services build and run in containers |
| Docker Compose | v2 | Bundled with Docker Desktop |
| Node.js | 20 | Control plane UI only |
| Go | 1.21+ | CLI development only |
No local Gradle builds. Java services are built inside Docker images. Compile DSL with the
causetCLI (causet build compile), not./gradlew.
Get the source
Causet source is private. Team members receive repository access from engineering — there is no public clone URL.
# After access is granted:
git clone <your-internal-remote>
cd CausetStart the Local Stack
The local stack runs PostgreSQL, Kafka, Redis, and MinIO (S3-compatible) via Docker Compose.
docker compose up -dVerify all containers are healthy:
docker compose psWait for all services to show Up (healthy) before starting the application services.
Build All Services
docker compose buildThis builds all service images. To skip a service:
docker compose build causet-runtime-serviceBuild Individual Services
Use the rebuild scripts in shell_files/:
# Runtime service
./shell_files/rebuild-runtime.sh
# Projection worker
./shell_files/rebuild-projection-worker.sh
# Query service
./shell_files/rebuild-query-service.sh
# SaaS cloud
./shell_files/rebuild-saas.shRun Services Locally
Use the rebuild scripts or Docker Compose:
# Start all services
docker compose up -d
# Restart a specific service after code changes
./shell_files/rebuild-runtime.shCheck shell_files/ for rebuild scripts for each service.
Build and Run the Compiler
The compiler is bundled in the Causet CLI. Compile a sample app:
causet build compile --runtime ./examples/concert-app --out ./build/concert-app-outControl Plane (Next.js)
cd apps/causet-cloud-control-plane
npm install
npm run devThe control plane starts on port 3000. Configure Clerk keys in apps/causet-cloud-control-plane/.env.local:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
CAUSET_SAAS_URL=http://localhost:8085
CAUSET_QUERY_URL=http://localhost:8082Build the CLI
Install a released binary:
curl -fsSL https://raw.githubusercontent.com/Causet-Inc/causet-cli/main/install.sh | shWhen developing changes to apps/causet-cli itself:
cd apps/causet-cli
go build -o causet .
# Optional: add to PATH
export PATH="$PATH:$(pwd)"Run tests:
go test ./...Run All Tests
# All service tests
docker compose run --rm test-runner
# Integration tests (requires Docker Compose running)
docker compose run --rm integration-testsDevelopment Workflow
The typical loop for a platform change:
- Edit source (
.causetfixtures, service code, or compiler logic) - Build in Docker:
docker compose build <service>(or./shell_files/rebuild-*.sh) - Run locally:
docker compose up -dand verify end-to-end - Commit your changes
- Publish: push to
main— CI builds container images and tags them; cut a release tag to publish CLI binaries
For a DSL or compiler change:
- Edit
.causetfixtures or compiler source - Run compiler tests:
docker compose run --rm test-runner causet-compiler - Compile a sample app:
causet build compile --runtime ./examples/concert-app --out ./build/out - Rebuild affected service images and restart:
./shell_files/rebuild-runtime.sh - Submit an intent and verify the result end-to-end
For a projection worker change:
- Edit projection worker source
- Rebuild:
./shell_files/rebuild-projection-worker.sh - Submit an intent that produces the relevant event
- Verify the projection table is updated correctly
Service Ports (Local)
| Service | Port |
|---|---|
causet-runtime-service | 8080 |
ws-gateway-go | 8081 |
causet-query-service | 8082 |
causet-projection-worker | 8083 |
causet-saas-cloud | 8085 |
causet-cloud-control-plane | 3000 |
EntityBrowserGrpcService | 9090 |
PostgreSQL (causet) | 5432 |
PostgreSQL (projections) | 5433 |
| Kafka | 9092 |
| Redis | 6379 |
| MinIO (S3) | 9000 |
Common Issues
Compiler fails with Java version error: Java builds happen inside Docker — rebuild the image (docker compose build causet-compiler) rather than running Gradle locally.
Docker Compose containers not starting: Check for port conflicts. Run lsof -i :5432 to identify what is using the default PostgreSQL port.
Integration tests failing: Verify all Docker Compose services are healthy before running integration tests. The tests do not wait for services to be ready.
Control plane not connecting to backend: Check .env.local in the control plane directory. Ensure CAUSET_SAAS_URL matches the running SaaS service port.