@takuhon/api
v1.4.3
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 })— the server-rendered profile page atGET /(and/<locale>/) with Schema.org JSON-LD embedded in the HTML, plus the public read endpoints (/api/profile,/api/jsonld,/api/schema,/takuhon.json) and/.well-known/takuhon.jsonrenderProfileHtml/generateSite/renderCvHtml— pure,@takuhon/core-only static HTML rendering (no DOM, no bundler) shared by theGET /route and@takuhon/cli'sbuild/devcreateAdminApiApp({ 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.
