Framework guides

Put the SDK in the correct server, route, cache, and error boundary for your framework.

@cavuno/board uses the platform fetch API and has no runtime dependencies. The client surface stays the same across frameworks; the important differences are environment access, server boundaries, cookies, caching, and routing.

Choose your framework

GuideData-loading boundaryRecommended session owner
Next.jsApp Router Server Components and server codeApplication-owned httpOnly cookie
React RouterFramework Mode loaders and actionsApplication-owned httpOnly cookie
TanStack StartRoute loaders backed by server functionsApplication-owned httpOnly cookie
AstroPrerendered public pages or on-demand server routesApplication-owned httpOnly cookie for personalized routes

Building a client-rendered SPA without a framework server? Use Client-side applications. Deploying at the edge? See Cloudflare Workers.

Invariants in every framework

  1. Create the client from an API URL and immutable pk_… key.
  2. Reuse a client when the runtime allows it, but keep shared server clients stateless.
  3. Put filters and pagination in the method’s query argument.
  4. Put authorization, abort signals, and cache directives in the trailing fetch-options argument.
  5. Cache only public responses in a shared cache.
  6. Preserve /companies/:companySlug/jobs/:jobSlug for canonical job details.
  7. Use board.context().features to decide which optional routes exist.

These guides wire a first jobs page and show the correct session boundary. They do not install, configure, or deploy the framework itself. Use the framework’s official deployment instructions after the SDK checks pass.

Verify the framework boundary

After wiring the client in the framework’s server or browser boundary, run both calls there:

ts
const context = await board.context();
const jobs = await board.jobs.list({ limit: 2 });
console.log({
board: context.name,
jobs: jobs.data.length,
runtime: typeof document === 'undefined' ? 'server' : 'browser',
});

The output must name the intended board and report the runtime you selected. In an SSR guide, it should print server; seeing browser means the SDK call crossed into the client bundle.

Next step

Open the guide for your framework above and implement its /jobs route plus session boundary. Then export PUBLIC_CAVUNO_BOARD and run npx @cavuno/board doctor --frontend http://localhost:3000, replacing the origin when your development server uses another URL. Set PUBLIC_CAVUNO_API_URL only for a Cavuno-supplied non-production override. Resolve every failure and account for every skipped check before deployment.