README: document the new module layout, drop the dead-endpoint note
Docker / test-build-push (push) Successful in 1m47s
Docker / test-build-push (push) Successful in 1m47s
The known-rough-edge section described POST /api/receipts as still present but scheduled for removal — the refactor already removed it. Replaced with a table of what each file now owns. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
0d825b4458
commit
e37a1d5798
@@ -86,9 +86,20 @@ curl https://trace.dev.xplwd.com/api/v1/public/projects/goonk/latest
|
|||||||
|
|
||||||
Full producer onboarding — registering a project, per-project tokens, the exact CI step shape, and the deploy-host responsibilities above — is in [`docs/INTEGRATING_PROJECTS.md`](docs/INTEGRATING_PROJECTS.md). `keep/scripts/deploy.sh` is the reference deploy-host implementation of the second `curl` above: after `docker compose up -d`, it polls the app's own embedded build identity until healthy, then submits exactly this receipt — opt-in per project via a `.trace-meta` marker file, never assumed.
|
Full producer onboarding — registering a project, per-project tokens, the exact CI step shape, and the deploy-host responsibilities above — is in [`docs/INTEGRATING_PROJECTS.md`](docs/INTEGRATING_PROJECTS.md). `keep/scripts/deploy.sh` is the reference deploy-host implementation of the second `curl` above: after `docker compose up -d`, it polls the app's own embedded build identity until healthy, then submits exactly this receipt — opt-in per project via a `.trace-meta` marker file, never assumed.
|
||||||
|
|
||||||
### A known rough edge
|
## Code layout
|
||||||
|
|
||||||
`POST /api/receipts` (Basic Auth, no `/v1`, no bearer token) still exists in `src/server.mjs` as a leftover from before the v1 events API was built. It writes to a `receipts` table nothing else ever reads from — dead code, not a second real API. Use `/api/v1/events` for everything; the old path is scheduled for removal, not a documented feature.
|
`src/server.mjs` is composition only — open the database, build each route module, wire the dispatch order, listen. Everything else lives by concern:
|
||||||
|
|
||||||
|
| File | Owns |
|
||||||
|
|---|---|
|
||||||
|
| `src/db.mjs` | Schema and migrations for the incident notebook (`openDb()`) |
|
||||||
|
| `src/views.mjs` | Pure HTML/Markdown rendering — no database or network access |
|
||||||
|
| `src/style.mjs` | The one shared stylesheet every page links to |
|
||||||
|
| `src/http-utils.mjs` | `form()`/`redirect()` request helpers |
|
||||||
|
| `src/routes/incidents.mjs` | The private notebook, the Git inbox, publish/unpublish — auth-gated once at the top |
|
||||||
|
| `src/routes/public-failures.mjs` | The read-only `/api/v1/public/failures*` projection |
|
||||||
|
| `src/receipts.mjs` | The deployment-receipts ledger and `/events` |
|
||||||
|
| `src/gitea.mjs` | Gitea-API-based commit scanning, no checkout needed |
|
||||||
|
|
||||||
## Configuration reference
|
## Configuration reference
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user