The problem
SPAs and mobile clients want JSON APIs. The backend team picks Go or FastAPI; the ML team picks Python notebooks; the gateway proxies between them. Every API change is two PRs and an integration test suite that only runs in staging.
Why Ecko
- JSON first
http.jsonandjson_decodeare stdlib. Handlers stay small; validation uses thevalidatepackage or typed structs.- Modular grants
- Auth middleware gets no network; enrichment imports get
grant [net]. The API surface makes the trust boundary obvious. - Test without HTTP
- Call handler functions directly in tests with mock-mode AI. You do not need to spin up a port to verify response shapes.
In practice
fn create(req) {
body = json_decode(req.body)
item = ai "Normalise this listing" from body
http.json(item, status=201)
}
Try it on your workload.