A GEMINI.md configuration for Next.js 15 App Router projects covering Server Components, data fetching patterns, and performance best practices.
# Project: [PROJECT NAME] ## Next.js 15 + App Router + TypeScript ## General Instructions - Use Next.js App Router (not Pages Router) - TypeScript strict mode is mandatory - Use Server Components by default; only add "use client" when necessary - Prefer Server Actions over API routes for mutations - Use next/image for all images, next/font for fonts ## File Conventions - `page.tsx` — route segments - `layout.tsx` — shared layouts - `loading.tsx` — loading UI (Suspense boundary) - `error.tsx` — error boundary (must be "use client") - `not-found.tsx` — 404 handling ## Data Fetching - Fetch data in Server Components, not Client Components - Use React cache() for request deduplication - Set appropriate revalidate intervals or use `revalidatePath/revalidateTag` - Never expose sensitive data (API keys, tokens) to Client Components ## Styling - Use Tailwind CSS utility classes - Use `cn()` utility for conditional classes (clsx + twMerge) - Component-specific styles go in the component file - Design tokens in tailwind.config.ts ## Performance - Use dynamic imports for heavy Client Components - Implement Suspense boundaries around slow data fetches - Use `generateStaticParams` for known dynamic routes - Set metadata in layout.tsx and page.tsx for SEO
Workflows from the Neura Market marketplace related to this Gemini resource