Skip to content

Next.js

Next.js is the framework behind arda-frontend-app, the production frontend. It serves both the React SPA and the Backend-For-Frontend (BFF) routes that proxy authenticated calls to the backend services.

  • Version: 16.1.6 (App Router).
  • Repository: arda-frontend-app/.
  • Role:
    • SPA host — renders the React application under app/.
    • BFFapp/api/* routes terminate user sessions, attach JWTs, and forward to internal services (operations, accounts-component, static-asset-repository).
    • Edge auth — middleware validates Cognito sessions and refreshes tokens before requests reach BFF handlers.
  • App Router only. Pages Router is not used.
  • BFF routes live under app/api/<area>/route.ts and follow the BFF naming and SSRF-guard rules captured in Architecture / Patterns / API Design.
  • Server Components for read paths; Client Components only where interactivity is required (Redux, AG Grid, modals).
  • Image and font assets use next/font and next/image — do not configure Babel globally (it disables the next/font SWC transform).
  • API Design — how BFF routes are shaped.
  • The react-best-practices skill — performance and component rules that apply to the frontend.
  • arda-frontend-app/CLAUDE.md — repo-specific conventions and gotchas.