Declarative .mdcCursor/Claude/Windsurf Rules & n8n WorkflowsIDE RuleZero-Secret Leak Audited

Next.js 16.4 App Router, proxy.ts & React 19.2 Architecture Rules

Declarative Cursor .mdc and CLAUDE.md ruleset enforcing Next.js 16 src/proxy.ts request interception, async params/searchParams, and Tailwind CSS v4 tokens.

Declarative Agent & IDE Rule Files

---
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
```

Community Setup Notes & Production Reviews (0)

No community notes yet. Share your production configuration tip below.

Post a Setup Note or Verification Tip

Exposed MCP Tools & Resource Schema Inspector

Tool / Resource IdentifierInput ParametersExecution Behavior
enforce_proxy_ts_conventionsrc/proxy.tsMandates Next.js 16 export function proxy(request) and forbids deprecated middleware.ts files.
enforce_async_rsc_paramssrc/app/**/page.tsxRequires awaiting Promise-typed params, searchParams, cookies(), and headers() in Server Components.