@takuhon/vercel
Read-only Vercel adapter for takuhon.
It publishes a profile on Vercel by mounting the framework-agnostic public app
from @takuhon/api on the Vercel
runtime: the server-rendered profile page (with embedded Schema.org JSON-LD),
the public read API, and the canonical takuhon.json. There is no database,
admin UI, or auth — you edit takuhon.json in Git, push, and Vercel
redeploys.
What it serves
GET /andGET /<locale>/— the server-rendered profile page with JSON-LDGET /api/profile·GET /api/jsonld·GET /api/schemaGET /takuhon.json·GET /.well-known/takuhon.jsonGET /health
The same public privacy filter as every other surface is applied, so
settings.publicVisibility and the field-level controls behave identically to a
Cloudflare deployment.
Not included (use the Cloudflare adapter for these)
Image uploads (/assets/*), the MCP endpoint (/mcp), and the activity badge /
sync (/activity.svg, cron) are Cloudflare-only. On Vercel, GET /api/activity
answers 404 and the discovery document omits mcp.
Install
npm install @takuhon/vercel
Quick start (Next.js App Router)
Add a catch-all route that mounts the app, and bundle your takuhon.json:
// app/[[...route]]/route.ts
import { createTakuhonVercelApp, BundledTakuhonStorage } from '@takuhon/vercel';
import { handle } from 'hono/vercel';
import profile from '../../takuhon.json';
const app = createTakuhonVercelApp({ storage: new BundledTakuhonStorage(profile) });
export const GET = handle(app);
// vercel.json
{ "framework": "nextjs" }
That's it — vercel deploy publishes the profile. To change it, edit
takuhon.json, commit, and push.
Data source
The canonical takuhon.json can come from two places:
- Bundled (default). Import the file and pass it to
BundledTakuhonStorage, as above. The document is validated once at startup, so an invalid profile fails fast. - Fetched from a URL. Set
TAKUHON_DATA_URLand useUrlTakuhonStorage; the profile is fetched once per serverless instance and cached.
import { createTakuhonVercelApp, UrlTakuhonStorage } from '@takuhon/vercel';
import { handle } from 'hono/vercel';
const app = createTakuhonVercelApp({
storage: new UrlTakuhonStorage(process.env.TAKUHON_DATA_URL!),
});
export const GET = handle(app);
API
createTakuhonVercelApp({ storage, fallback? })— returns a Hono app to mount withhono/vercel'shandle.BundledTakuhonStorage(profile)— read-only storage over an in-memory profile.UrlTakuhonStorage(url, { fetch? })— read-only storage fetched once fromurl.