Local development
Start Postgres and RabbitMQ, migrate, seed principals, and run Go services natively.
Stateful dependencies run in Docker Compose. Go services run on the host with go run or Make
targets.
Prerequisites
- Docker (Compose)
- Go 1.26+ (see
.mise.toml) - Node 22.13+ and pnpm 11 (for this portal only)
Start the stack
make dev-upThis starts Postgres and RabbitMQ and waits for healthchecks.
Databases
| Service | Database | Role |
|---|---|---|
| accounting | accounting | accounting / accounting |
| template | template | template / template |
| Admin | any | postgres / postgres |
Adding a service means extending scripts/init-databases.sh. Because that script runs only on an
empty Postgres volume, recreate the volume when adding a database:
docker compose down -v && make dev-up && make migrateRun services
make migrate
make dev-seed # principals for Cedar authz in dev
make dev # accounting on :8080
make dev-template # template on :8081, Swagger at /api-docsmake dev and make dev-template are separate targets because a foreground go run cannot become
two processes.
Try accounting
curl -s -X POST localhost:8080/v1/accounts \
-H 'X-Dev-Actor: fid_dev_controller' \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{"chart_code":"us","code":"10000","name":"ASSETS","classification":"asset","is_postable":false}' | jqTry template
curl -s -X POST localhost:8081/v1/widgets \
-H 'X-Dev-Actor: fid_dev_operator' \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{"code":"W-1000","name":"Standard widget","kind":"standard","quantity":3}' | jqSee docs/local-dev.md for the full reference including RabbitMQ management UI and database clients.