Skip to content

Directus integration

How the frontend reads content from Directus.

The shared Directus client is in frontend/src/util/directus.ts. It uses @directus/sdk with types derived from collection shapes.

Listings, destinations, holidays, pages, and navigation are fetched at build time (SSG) or on demand depending on the route.

Set in Cloudflare Workers secrets (or .env locally):

  • DIRECTUS_URL: Directus API base URL
  • DIRECTUS_TOKEN: read token for published content (server-side only)

Never expose write tokens or admin credentials to the browser.