frontend-structure

Organize Next.js App Router pages, containers, components, and hooks.

Updated Apr 29, 2026
One-click install
npx skills add https://github.com/moking55/next-nest-monorepo-boilerplate --skill frontend-structure-moking55
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-structure
Source: https://github.com/moking55/next-nest-monorepo-boilerplate/tree/main/.agents/skills/frontend-structure
Command: npx skills add https://github.com/moking55/next-nest-monorepo-boilerplate --skill frontend-structure-moking55

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers maintain a consistent frontend architecture by guiding the creation and organization of Next.js App Router pages, containers, components, and hooks.

Core Features & Use Cases

  • App Router Structure Guidance: Defines where to place authenticated and public screens and keeps page components minimal.
  • Component and Hook Organization: Provides conventions for containers, presentational components, shared hooks, and type exports.
  • Architecture Validation: Checks implementation details such as server-only pages, dedicated container hooks, import patterns, and state management practices.

Quick Start

Use the frontend-structure skill to create a new authenticated feature page following the repository's Next.js App Router conventions.

Frequently Asked Questions about frontend-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Next.js App Router pages and components?

To structure Next.js App Router pages, keep page components minimal and organize authenticated or public screens in designated directories. This maintains a consistent frontend architecture by defining clear boundaries for containers, presentational components, and hooks.

What is the best way to separate hooks in Next.js frontend projects?

Separate hooks by creating dedicated container hooks that manage state and data logic away from presentational components. This enforces repository-specific frontend organization standards and maintains clean separation of concerns within the apps/frontend directory.

Do I need server components for my Next.js App Router architecture?

Yes, server components are needed for Next.js App Router architecture to adhere to server-only page patterns. Keeping pages as server components ensures consistent implementation details and proper state management practices across the application.

How does App Router component organization handle type exports?

App Router component organization handles type exports by enforcing specific type export rules alongside defined import patterns. This architecture validation ensures containers and components maintain strict boundaries for consistent application architecture.

Can I use this frontend structure for both authenticated and public screens?

Yes, this frontend structure supports both authenticated and public screens. It explicitly defines where to place each screen type within the apps/frontend directory using Next.js App Router conventions to maintain architectural consistency.

Why does my Next.js page structure fail architecture validation checks?

Next.js page structure fails architecture validation when implementation details violate server-only page patterns, dedicated container hooks, or defined import patterns. It also flags improper state management practices and incorrect type export rules.