---
description: Enforce Next.js 16 src/proxy.ts routing, React 19 Server Components, and async dynamic APIs
globs: frontend/src/**/*.{ts,tsx,css}
alwaysApply: true
---

# Next.js 16.4 & React 19.2 App Router Standards

- Use `src/proxy.ts` exporting `export function proxy(request: NextRequest)` for locale and header routing; NEVER create legacy `middleware.ts`.
- Always `await params` and `await searchParams` (`Promise<{ locale: string, ... }>`) inside `page.tsx`, `layout.tsx`, and `generateMetadata`.
- Default every component to a React Server Component; add `"use client"` strictly to leaf interactive islands requiring browser state or event listeners.
- Fetch independent GraphQL/REST resources concurrently via `Promise.all([...])` to eliminate server waterfall latency.
- Use Tailwind CSS v4 `@import "tailwindcss";` with semantic CSS custom properties (`var(--bg-surface)`, `var(--text-primary)`) keeping light theme as default.

## Verification Check
```bash
npx tsc --noEmit && test ! -f src/middleware.ts
```
