A request in the backend
How it fits together

A request in the backend

The request for your projects arrives at the backend, which is a Hono application. It passes through these stages, in this order.

Description
  1. Middleware. The request is given an id. Its origin is checked against the registry of sites. A timing clock starts. The database connections are attached. A usage record is opened. The feature the route belongs to is checked to be on for the ecosystem. The size of the body is bounded.
  2. The principal. The route's authentication reads the credential and establishes who is calling and in which ecosystem, as well as whom they act as and with what scope. A missing credential is refused.
  3. The transaction. A database transaction opens with the caller's ecosystem, user, admin status and actor bound into it. From here on, the database hides every row outside the ecosystem.
  4. The handler. A route written by hand, like Projects, or one generated from a table, like markdown content, runs its query narrowed to what the caller owns, applies its hooks, and returns. If the caller is out of budget, the usage gate answers on the way with payment required or too many requests.
  5. The response. The transaction commits, even when the handler answered with an error, because the error is the answer. The usage record closes, and the timing is written into the response.
Tech Detail
Frameworks
Hono