← back to AbramsEgo
build-queue/done/37-billable-report.md
15 lines
# Task 37 — billable_work engine: sellable Fleet Health Report generator (engine 3)
Read SPEC.md. The dashboard's own data is the product. ~15 min.
1. server.js: GET /api/report/fleet-health → generates a polished self-contained HTML report from
the current snapshot (fleet up/down, canary verdicts, cost trend, P&L, uptime notes) with an
AbramsEgo brand header + generated-at 🕓 timestamp + "$<price>" price tag from env
REPORT_PRICE_USD (default 29). Auth-gated like everything else.
2. Add a "Sample report" link on the landing (renders a redacted/demo variant at
/api/report/sample so prospects see the artifact; include in PUBLIC_LANDING allowlist).
3. If Stripe test keys are configured (task 33), register a test product/price for the report and
note the id in data/revenue.json's billable_work note; else leave a TODO note in the engine note.
4. pm2 restart; curl both report routes render non-empty HTML. Commit
`feat(billable): fleet health report generator + sample`. Local only.