Skip to content

Frontend Architecture

Framework:

  • Next.js 14, Pages Router (pages/*), limited app/ usage to resolve feature flags for Vercel toolbar
  • Middleware: middleware.js applies withStableId and withAuth to most routes
  • Client-side data: Relay 14 with react-relay-network-modern (SSR middleware), SSR is currently unused
  • UI: MUI v5, custom components in components/*, containers in containers/*

Relay environment:

  • Client env: lib/createEnvironment/client.js with cache, SSR hydration, and /api/graphql endpoint
  • Server env: lib/createEnvironment/server.js for SSR requests
  • Artifacts: __generated__/ via Flow types (see relay.config.js)

State & hooks:

  • Many feature hooks in hooks/* for updaters and filters

Internationalization:

  • react-intl; translation JSON under lang/*.json; extraction scripts in scripts/*

Storybook (needs to be fixed):

  • Storybook config and stories under components