Frontend infrastructure

Add canonical routing, metadata, sitemaps, theme tokens, formatting, and localization.

A custom board needs more than resource calls. This section turns Board API data into stable URLs, indexable pages, correct structured data, board-configured styling, and consistent language.

The helpers are framework-neutral and ship as dedicated package exports:

ExportResponsibility
@cavuno/board/pathsCanonical public paths and absolute board URLs
@cavuno/board/serverRedirect guards and server session helpers
@cavuno/board/seoMetadata descriptors and structured data
@cavuno/board/sitemapCatalog walking, chunking, and XML serialization
@cavuno/board/themeOptional hosted-board theme compatibility helpers
@cavuno/board/formatLocale-aware dates, locations, salaries, and UI copy
@cavuno/board/filtersListing filter vocabulary and URL parsing
  1. Lock routes with Paths and redirects.
  2. Add page metadata and JSON-LD with SEO and structured data.
  3. Publish the full corpus with Sitemap generation.
  4. Own design tokens, fonts, and color mode in your application; use Styling and formatting for formatting and optional hosted-board compatibility.
  5. Keep requests and presentation aligned with Localization.

Infrastructure boundary

The SDK returns strings and plain objects, not router, head-manager, or component instances. Your framework still owns:

  • Route declarations and HTTP responses.
  • <head>, <script>, <style>, and <link> elements.
  • Cache policy and revalidation.
  • Accessibility, layout, and interaction.
  • Deployment, monitoring, and rollback.

Build these helpers into your server-rendering boundary first. Public SEO and sitemap work should use a stateless client; user-specific responses must never share its cache.

Verify the infrastructure boundary

Confirm the path helpers produce the same URL shape your router will serve:

ts
import { boardUrl, jobDetailPath } from '@cavuno/board/paths';
const path = jobDetailPath('analytical-engines', 'staff-engineer');
const url = boardUrl('https://jobs.example.com/', path);
if (url !== 'https://jobs.example.com/companies/analytical-engines/jobs/staff-engineer') {
throw new Error('Canonical job URL drifted');
}
console.log(url);

This check is pure—it does not make a network request. It should print the canonical job-detail URL without a doubled slash.

Next step

Replace the first manually assembled job-detail link in your frontend with jobDetailPath, then render that same absolute URL as the page canonical and sitemap location. Follow Paths and redirects to handle an inbound non-canonical slug before adding JSON-LD.