Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 2.64 KB

AGENT.md

File metadata and controls

66 lines (50 loc) · 2.64 KB

cpa-stack for agents

Machine interface for cpa-stack: a docker compose recipe that runs a CPA firm's back office on five unmodified open-source applications (ERPNext, Kimai, Nextcloud, Documenso, Metabase). There is no code and no CLI in this repo; the interface is compose plus each application's own REST API.

Commands

cp .env.example .env            # then fill every REPLACE_ME (no defaults for secrets)
docker compose config -q        # validate the compose file + env (exit 0 = valid)
docker compose up -d            # start the stack
docker compose ps               # per-service state incl. healthchecks
docker compose logs -f erpnext-create-site   # one-shot site creation progress
docker compose down             # stop (volumes persist)

Documenso requires ./cert.p12 (PKCS#12 signing certificate) to exist before up; see README Quickstart step 2.

Health probes (host-side truth)

curl -sf http://localhost:8080/status.php        # Nextcloud
curl -sf http://localhost:8081/api/method/ping   # ERPNext
curl -sf -o /dev/null http://localhost:8082/     # Kimai
curl -sf -o /dev/null http://localhost:8083/     # Documenso
curl -sf http://localhost:8084/api/health        # Metabase

Never assume the stack is up; probe. ERPNext takes several minutes on first start (one-shot erpnext-configurator then erpnext-create-site must exit 0 before the web services serve).

Application APIs (what an agent integrates with)

App API surface Auth
ERPNext REST at /api/resource/<DocType>, /api/method/<method> token api_key:api_secret header
Kimai REST at /api/* (timesheets, projects, activities) X-AUTH-USER + X-AUTH-TOKEN or Bearer
Nextcloud WebDAV /remote.php/dav/, OCS /ocs/v2.php/ app password / Basic
Documenso REST at /api/v1/* (documents, recipients, fields) API key Bearer
Metabase REST at /api/* (cards, dashboards, queries) session or API key

All credentials are created inside each application after first login; nothing in this repo stores or proxies them.

Exit codes / verification

surface codes
docker compose config -q 0 valid; non-zero invalid
docker compose up -d 0 started; non-zero a service failed to create
health probes above curl exit 0 healthy; non-zero not ready

Backs the MCP tool

None. maxed-mcp fronts the suite's data tools; cpa-stack is the self-hosted application layer a firm runs. An agent talks to these applications through their own APIs above.

Build / test

No build. Validate with docker compose config -q (CI does the same with the env template).