Dashboard › opencode › HttpApiBuilder thin handlers
01a0a5c1-2720-78c5-b40a-a454d47369caAlways implement declared endpoints, including SSE, with HttpApiBuilder.group(...). Keep handlers thin: decode input, read request context, call services, and map transport errors; business rules belong in services. Chose stable layers provided once at the application boundary over Effect.provide(...) inside handlers because broad provisioning rebuilds dependencies, hides ownership, and makes tests drift. Reserve HttpRouter.use(...) for routes outside the API contract.