What problem does it solve?
This Skill provides frontend architecture guidelines to ensure consistent component placement, reuse, and maintainable code structure across a Next.js monorepo, reducing onboarding time and ambiguity.
Core Features & Use Cases
- Collocate page-specific components inside the App Router page directory (the same directory as page.tsx, layout.tsx, etc.) and place them under a _components/ folder.
- Centralize shared components and utilities under frontend/src/ following the existing project structure (src/ui/, src/shared/, src/theme/, etc.).
- Promote shared usage when components or utilities are reused across routes, layouts, or features to maintain a single source of truth.
Quick Start
Use these guidelines to organize Next.js app code:
- Place page-specific components in frontend/app/{route}/_components/ alongside page.tsx and layout.tsx.
- Keep shared components and utilities in frontend/src/, adhering to the existing architecture and naming conventions.
- Follow lint/format rules and prefer collocated components first before moving to shared directories.