nextjs-full-stack

Next.js Full Stack Patterns

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "nextjs-full-stack" with this command: npx skills add sraloff/gravityboots/sraloff-gravityboots-nextjs-full-stack

Next.js Full Stack Patterns

When to use this skill

  • Building features in Next.js (App Router).

  • Creating API endpoints (Route Handlers).

  • Implementing Server Actions for mutations.

  1. App Router Structure
  • Colocation: Keep related files (helpers, components, styles) inside the route segment folder unless they are truly shared.

  • Pages: page.tsx should remain light; import client/server components for the UI.

  • Layouts: Use layout.tsx for shared UI (nav, unrelated to route params) and template.tsx if you need state reset on navigation.

  1. Server Components (RSC)
  • Default: All components are Server Components by default.

  • Data Fetching: Fetch data directly in RSCs (async/await). No useEffect needed.

  • Secrets: Server components can safely access process.env secrets.

  1. Server Actions
  • Mutations: Use Server Actions ('use server' ) for form submissions and simple mutations.

  • Validation: Validate inputs (Zod) inside the action before processing.

  • Revalidation: Use revalidatePath or revalidateTag to update cache after mutation.

  1. Middleware
  • Auth: Use middleware for route protection (redirecting unauthenticated users).

  • Performance: Keep middleware lightweight (Edge runtime compatible).

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

apache-lamp-config

No summary provided by upstream source.

Repository SourceNeeds Review
General

caddy-modern-config

No summary provided by upstream source.

Repository SourceNeeds Review
General

mysql-lamp-legacy

No summary provided by upstream source.

Repository SourceNeeds Review
General

redis-caching-queues

No summary provided by upstream source.

Repository SourceNeeds Review