@takuhon/api
v0.1.0
Published
Hono-based HTTP handlers, RFC 7807 error envelope, and response builders for takuhon
Maintainers
Readme
@takuhon/api
Hono-based HTTP route handlers, RFC 7807 Problem Details error envelope, and response builders for Takuhon.
Ships:
createPublicApp({ storage })— public profile read endpoints, JSON-LD output,/.well-known/takuhon.jsoncreateAdminApiApp({ storage, bearerToken, originAllowlist, cachePurger, auditLogger })—PUT/DELETE /api/admin/profilewith optimistic locking (If-Match), audit logging, and edge-cache purgingcreateAdminUiApp()— minimal HTML admin editor (token + JSON textarea + Save/Delete)CachePurgerandAuditLoggerdependency-injection interfaces (withnoopCachePurger/noopAuditLoggerno-op implementations)buildProblem/problemResponsehelpers and theProblemDetails/ErrorSlugtypes for RFC 7807 error envelopes
The package is framework-agnostic Hono — adapters (@takuhon/cloudflare, @takuhon/static, …) compose these factories with a storage backend and a runtime.
