Declarative .mdcCursor/Claude/Windsurf 규칙 및 n8n 워크플로IDE 규칙제로 비밀 유출 감사
Next.js 16.4 앱 라우터, Proxy.ts 및 React 19.2 아키텍처 규칙
Next.js 16 src/proxy.ts 요청 차단, async params/searchParams 및 Tailwind CSS v4 토큰을 시행하는 선언적 커서 .mdc 및 CLAUDE.md 규칙 세트입니다.
선언적 에이전트 및 IDE 규칙 파일
---
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
```커뮤니티 설정 참고 사항 및 제작 리뷰 (0)
아직 커뮤니티 메모가 없습니다. 아래에서 프로덕션 구성 팁을 공유하세요.
노출된 MCP 도구 및 리소스 스키마 검사기
| 도구/자원 식별자 | 입력 매개변수 | 실행 동작 |
|---|---|---|
| enforce_proxy_ts_convention | src/proxy.ts | Mandates Next.js 16 export function proxy(request) and forbids deprecated middleware.ts files. |
| enforce_async_rsc_params | src/app/**/page.tsx | Requires awaiting Promise-typed params, searchParams, cookies(), and headers() in Server Components. |