Framework guides
Put the SDK in the correct server, route, cache, and error boundary for your framework.
A
J@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
| Guide | Data-loading boundary | Recommended session owner |
|---|---|---|
| Next.js | App Router Server Components and server code | Application-owned httpOnly cookie |
| React Router | Framework Mode loaders and actions | Application-owned httpOnly cookie |
| TanStack Start | Route loaders backed by server functions | Application-owned httpOnly cookie |
| Astro | Prerendered public pages or on-demand server routes | Application-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
- Create the client from an API URL and immutable
pk_…key. - Reuse a client when the runtime allows it, but keep shared server clients stateless.
- Put filters and pagination in the method’s query argument.
- Put authorization, abort signals, and cache directives in the trailing fetch-options argument.
- Cache only public responses in a shared cache.
- Preserve
/companies/:companySlug/jobs/:jobSlugfor canonical job details. - Use
board.context().featuresto 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:
12345678const 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.
Next.js
Use the SDK in Next.js Server Components with per-call caching and server-owned sessions.
React Router Framework Mode
Load Cavuno data in React Router route modules, actions, and native error boundaries.
TanStack Start
Use the SDK in TanStack Start loaders and server functions with cookie-owned sessions.
Astro
Choose prerendered public pages or on-demand rendering for fresh and personalized Cavuno data.