nextjs-app-router
Skill30 starsChanged 54 days agoMITView on GitHub
Next.js App Router best practices, Server Components, Server Actions, routing patterns, and data fetching strategies. Use when building Next.js applications with the App Router.
13 other projects use a version of this.
Adopted by
Most recently taken up by
- abdullahqureshi27/TaskCortextheir own version, first seen Nov 8, 2026
- geronco/commandvault-librarytheir own version, first seen Oct 13, 2026
- russolutionconsult/claude-skillstheir own version, first seen Oct 11, 2026
- SkillMedev/vercel-platformtheir own version, first seen Oct 5, 2026
- SkillMedev/full-stack-web-devtheir own version, first seen Oct 5, 2026
- jawwad-ali/claude-code-skillstheir own version, first seen Sep 5, 2026
Other versions13 projects use a version of this.
Word for word · 1
- desilokesh1/antigravity-fullstack-hq★ 2100% same
Edited · 0
None found.
Wrote their own version · 12
- jawwad-ali/claude-code-skills★ 4same name
- HamzaSheikh768/Agents-Skills-Lap★ 3same name
- LeahyCC/claude-skills★ 3same name
- amirrezaalasti/codescribe★ 2same name
- dennisrongo/claude-skills★ 1same name
- geronco/commandvault-library★ 1same name
- SkillMedev/full-stack-web-dev★ 1same name
- SkillMedev/vercel-platform★ 1same name
- abdullahqureshi27/TaskCortex★ 0same name
- bkjain655/agent-skills★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- claude/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- api-design-patternsSkill
- auth-patternsSkill
- backend-dev-guidelinesSkill
- brainstormingSkill
- code-review-patternsSkill
- deployment-guideSkill
- docker-patternsSkill
- docx-officialSkill
- frontend-designSkill
- github-actionsSkill
- git-workflowSkill
- nestjs-patternsSkill
- pdf-officialSkill
- pptx-officialSkill
- prisma-workflowSkill
- prompt-engineeringSkill
- react-best-practicesSkill
- security-checklistSkill
- skill-creatorSkill
- software-architectureSkill
- systematic-debuggingSkill
- tailwind-patternsSkill
- test-driven-developmentSkill
- typescript-patternsSkill
- webapp-testingSkill
- web-design-guidelinesSkill
- xlsx-officialSkill
The file
Files
Next.js App Router Patterns
Project Structure
app/
├── (auth)/ # Route Group
│ ├── login/page.tsx
│ ├── register/page.tsx
│ └── layout.tsx
├── (dashboard)/
│ ├── layout.tsx
│ ├── page.tsx
│ └── [projectId]/
│ └── page.tsx
├── api/
│ └── webhooks/route.ts
├── layout.tsx
├── page.tsx
├── loading.tsx
├── error.tsx
└── not-found.tsxServer vs Client Components
Decision Tree
- Need interactivity (onClick, useState)? -> 'use client'
- Need browser APIs? -> 'use client'
- Otherwise -> Server Component (default)
Server Component
// No directive needed - Server Component by default
import { prisma } from '@/lib/db'
export default async function UsersPage() {
const users = await prisma.user.findMany()
return <UserList users={users} />
}Client Component
'use client'
import { useState } from 'react'
export function Counter() {
const [count, setCount] = useState(0)
return <button onClick={() => setCount(c => c + 1)}>{count}</button>
}Server Actions
// lib/actions/users.ts
'use server'
import { revalidatePath } from 'next/cache'
import { redirect } from 'next/navigation'
export async function createUser(formData: FormData) {
const email = formData.get('email') as string
await prisma.user.create({ data: { email } })
revalidatePath('/users')
redirect('/users')
}Using in Forms
import { createUser } from '@/lib/actions/users'
export function CreateUserForm() {
return (
<form action={createUser}>
<input name="email" type="email" required />
<button type="submit">Create</button>
</form>
)
}Data Fetching
Parallel Fetching
export default async function Dashboard() {
const [user, posts] = await Promise.all([
getUser(),
getPosts()
])
return <DashboardView user={user} posts={posts} />
}Streaming with Suspense
import { Suspense } from 'react'
export default function Page() {
return (
<div>
<h1>Dashboard</h1>
<Suspense fallback={<Loading />}>
<SlowComponent />
</Suspense>
</div>
)
}Caching
// Revalidate every 60 seconds
fetch(url, { next: { revalidate: 60 } })
// No caching
fetch(url, { cache: 'no-store' })
// Static (default)
fetch(url)Protected Routes
// app/(dashboard)/layout.tsx
import { redirect } from 'next/navigation'
import { auth } from '@/lib/auth'
export default async function DashboardLayout({ children }) {
const session = await auth()
if (!session) redirect('/login')
return <div>{children}</div>
}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

