Development Guide
This guide is for someone who will change caps-engine, caps-app, or both. You can use a terminal, Git, and Docker. Installing CAPS for a server is the Deployment Guide. Running pipelines day to day is the User Guide.
A change lands in one of three repositories:
| Change | Repository | Tooling |
|---|---|---|
| HTTP API, worker, scheduler, Prisma, handlers, queues | hisptz/caps-engine | Bun, Vitest, Docker Compose |
| DHIS2 screens, Route setup, forms that edit handler config | hisptz/caps-app | pnpm, DHIS2 App Platform, Jest, Playwright |
| This documentation site | hisptz/caps-doc | pnpm, Astro Starlight |
flowchart LR browser[Browser] --> dhis2[DHIS2] dhis2 -->|routes/caps/run| api[API] api --> pg[(Postgres + outbox)] worker[Worker] --> pg worker --> mq[[RabbitMQ]] mq --> worker worker --> step[Step handler]
The diagram answers which product to open. Engine source and app source answer which folder. A new pipeline step usually touches both: a handler in the engine, and a form in the app whose key matches the Handlers enum string. That contract is Pipeline steps.
You are ready to change CAPS when:
- Postgres and RabbitMQ are up, and the engine API, worker, and scheduler reload on the host with
bun run dev:*. - The DHIS2 app runs at
http://localhost:3000and can reach an engine through a Route with codecaps. - You know which repository owns the change.
- You can run the same checks CI runs for that repository.
- Run the engine.
- Run the app.
- After both, Pipeline steps and Pull requests.