From frontend-skills
Code organization and architecture decisions for React 19 + Next.js 15 App Router (TypeScript). WHERE code lives, not HOW to write it. Covers: project folder structure, feature-based organization, component splitting rules, constants/utils/helpers/services placement, business logic separation, naming conventions, state colocation, and Next.js Server/Client Component boundary decisions. TRIGGER when: "where to put", "folder structure", "project structure", "how to organize", "where does X live", "code organization", "feature folder", "colocation", "business logic", "utils vs helpers", "constants", "component splitting", "Server Component or Client Component", "Server Action or Route Handler", "where do I place". Does NOT cover: React hooks API, component implementation style, Next.js caching/metadata features, state management APIs (use react-best-practices, next-best-practices, or typescript-expert for those).
How this skill is triggered — by the user, by Claude, or both
Slash command
/frontend-skills:frontend-architectureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **WHERE code lives, not HOW to write it.**
WHERE code lives, not HOW to write it.
This skill covers structural and organizational decisions for React 19 + Next.js 15 App Router projects. It answers "where does this go?" — not "how do I implement it?". For component patterns and hooks API, see react-best-practices. For Next.js feature usage (caching, metadata, image optimization), see next-best-practices.
| Skill | What it covers (NOT this skill) |
|---|---|
react-best-practices | Component APIs, hooks patterns, performance, anti-patterns |
next-best-practices | RSC data fetching, caching, metadata, image optimization |
typescript-expert | Type-level programming, generic patterns, type utilities |
Is it used in only one feature?
├── YES → put it inside features/<name>/components/
│ (or colocated in the route segment if Next.js page)
└── NO → Is it a generic UI primitive (Button, Modal, Input)?
├── YES → components/ui/
└── NO (domain logic but shared) → components/ or shared/components/
Is it a pure function with no React dependency?
├── YES → Does it belong to one feature only?
│ ├── YES → features/<name>/utils.ts
│ └── NO (2+ features use it) → shared/utils/ or lib/
└── NO (uses React) → Is it a hook?
├── YES → features/<name>/hooks/ or shared/hooks/
└── NO → rethink: move React logic out
Used in one feature only?
├── YES → features/<name>/constants.ts (or colocated in the file that uses them)
└── NO → shared/constants/<domain>.constants.ts
Start with Server Component (default).
Add "use client" only if the component needs:
├── useState / useReducer
├── useEffect / useLayoutEffect
├── Browser APIs (window, document, localStorage)
├── Event handlers that trigger state changes
├── Third-party client-only libraries
└── Context consumers (that aren't server-compatible)
Rule: push "use client" as DEEP in the tree as possible.
Who calls this endpoint?
├── Your own UI (forms, buttons) → Server Action in app/lib/actions.ts
└── External system / third-party / webhook → Route Handler (route.ts)
Also Route Handler for:
├── Streaming responses
├── Large file uploads
└── Public REST API
"use client" last resort| File | What it covers |
|---|---|
| rules/folder-structure.md | Canonical directory tree, org strategies, src/ vs root |
| rules/feature-organization.md | features/ dir anatomy, boundary rules, FSD overview |
| rules/component-splitting.md | When to split, SRP test, composition patterns |
| rules/constants-utils.md | constants.ts, utils/, helpers/, services/ — what goes where |
| rules/business-logic.md | 3-layer model, hooks, API layer, DTOs |
| rules/naming-conventions.md | File/folder/export naming rules |
| rules/state-placement.md | Colocation, lifting state, Zustand scoping |
| rules/nextjs-specifics.md | Server/Client boundary, Server Actions, Route Handlers, route groups |
All 51 research URLs → README.md
npx claudepluginhub burnjohn/ai-demo-marketplace --plugin frontend-skillsGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.