Prometheus scraping endpoint — gated by the monitoring secret.
Returns the `text/plain; version=0.0.4` exposition format consumed by Prometheus / Grafana Agent. Counters and histograms registered in `app/lib/metrics.ts`. Same auth as `/health/ready` (header `x-monitoring-secret` or `Authorization: Bearer <MONITORING_SECRET>`).
Response Body
application/json
application/json
curl -X GET "https://example.com/metrics""# HELP http_request_duration_seconds …"{ "error": { "code": "AUTH_REQUIRED", "message": "Monitoring secret missing or invalid." }}Readiness probe — checks Postgres, Redis, Meilisearch, and the object store. GET
Gated by `x-monitoring-secret` (or `Authorization: Bearer <MONITORING_SECRET>`). Returns 200 only when every checked dependency responds within its timeout. Returns 503 with a per-dependency status breakdown on failure.
Owner home-screen aggregator — KPIs, recent orders, pending applications. GET
Single round-trip composition so the mobile owner home screen's first paint never fans out into ten separate queries. Returns counts (total / active / featured trucks; total / active jobs; total / active listings), revenue and order rollups over the last 7 + 30 days, the latest order rows, pending applicant count, and a weighted average rating across the owner's trucks. Every value is filtered on `owner_id = caller`.