Public preview · composable Go web toolkit

Web Foundations.

I kept solving the same careful web problems in different applications: which proxy can speak for a client, what a safe request record contains, how sessions are revoked, where tenant authority begins, and how operators can inspect the result. Web Foundations turns those answers into small ordinary Go packages.

Adopt one responsibility at a time

  • requestmeta resolves request IDs, HTTPS state, and client addresses through explicitly trusted proxy networks.
  • requestlog emits bounded, versioned, low-cardinality request records while sensitive fields remain opt-in.
  • websec supplies security headers, origin and CSRF primitives, safe redirects, body limits, and rate limiting.
  • auth, authhttp, authsqlite, and authwebauthn separate identity policy, browser integration, local persistence, and passkey ceremonies.
  • organizations and access model membership and scoped authority without treating platform operation as permission to read tenant data.
  • analytics turns approved request records into typed safe or sensitive projections without owning a dashboard.

Observable without collecting everything

The application chooses the route label and every sensitive field. A safe request record contains method, normalized route, status, response bytes, duration, and request ID. IP addresses, paths, query strings, referrers, user agents, and session correlation remain separate explicit decisions.

Gamertan Observatory consumes that versioned stream as application evidence. It normalizes durations for time-series queries and can correlate a request ID with separately filtered Caddy edge evidence. Tend deployment events remain a distinct lifecycle stream, so a release marker can be compared with traffic and latency without pretending an HTTP request and a deployment are the same kind of fact.

Security boundaries stay visible

The toolkit does not authorize an application's routes, select its data-retention policy, secure an incorrectly trusted proxy, or hide secrets placed into logs by application policy. Storage adapters reject unsafe final paths and use narrow file modes; the service still owns rotation, disk health, backups, and lawful retention.

Reusable libraries and adapters are MPL-2.0. Copyable starters and configuration are 0BSD. Any future standalone services and operational machinery stay on the AGPL-3.0-only side of the boundary.

Sandwich Hime is the view layer I reach for

Web Foundations deliberately has no template language. Sandwich Hime remains independently usable, but the two fit the same application style: visible typed HTML, ordinary net/http routing, explicit middleware, and production systems small enough to understand.

go get gamertan.com/web/requestmeta@v0.1.0-preview.21
go get gamertan.com/web/requestlog@v0.1.0-preview.21