nextjs-fullstack
Skill110 starsChanged 9 months agoApache-2.0View on GitHub
Next.js App Router patterns for full-stack applications. Use when building Next.js apps with App Router, Server Components, API Routes, authentication, or full-stack React applications.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- barisariburnu/skills-collectiontheir own version, first seen Jan 12, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- barisariburnu/skills-collection★ 1same name
- JameMy0001/antigravity-skills-hub★ 1same name
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 repository75 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- algorithmic-artSkill
- api-designSkill
- apple-notesSkill
- apple-remindersSkill
- article-writingSkill
- async-pythonSkill
- brand-guidelinesSkill
- camsnapSkill
- canvas-designSkill
- celery-tasksSkill
- claude-apiSkill
- coding-agentSkill
- content-engineSkill
- diffsSkill
- doc-coauthoringSkill
- docker-deploymentSkill
- docxSkill
- e2e-testingSkill
- email-serviceSkill
- fastapi-backendSkill
- frontend-designSkill
- frontend-slidesSkill
- gh-issuesSkill
- githubSkill
- git-workflowSkill
- graphql-apiSkill
- healthcheckSkill
- internal-commsSkill
- investor-materialsSkill
- jwt-authenticationSkill
- market-researchSkill
- mcp-builderSkill
- mermaid-diagramsSkill
- microservicesSkill
- mobile-react-nativeSkill
- model-usageSkill
- nodejs-expressSkill
- obsidianSkill
- openai-whisperSkill
- oracleSkill
- pdfSkill
- peekabooSkill
- planning-with-filesSkill
- postgres-databaseSkill
- pptxSkill
- prisma-ormSkill
- proseSkill
- pytest-patternsSkill
- react-typescriptSkill
- redis-cachingSkill
- s3-file-storageSkill
- security-reviewSkill
- session-logsSkill
- skill-creatorSkill
- slack-gif-creatorSkill
- sqlalchemy-ormSkill
- state-managementSkill
- strategic-compactSkill
- stripe-paymentsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 111
Default to Server Components — only use 'use client' when you need interactivity
- Distinctive: line 112
Use Server Actions for mutations (simpler than API routes for form submits)
- Very specific: line 115
Use loading.tsx for Suspense boundaries on slow data fetches
- Very specific: line 116
Use error.tsx for error boundaries
- Distinctive: line 117
Never fetch data in Client Components if a Server Component can do it
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Next.js App Router Patterns
Project Structure
app/
(auth)/ # Route group (no URL segment)
login/page.tsx
register/page.tsx
(dashboard)/
layout.tsx # Dashboard shell with nav
page.tsx # Dashboard home
users/page.tsx
api/ # API routes
auth/[...nextauth]/route.ts
users/route.ts
layout.tsx # Root layout (html, body, providers)
globals.css
components/
ui/ # Reusable primitives (Button, Input, Modal)
features/ # Feature-specific components
lib/
db.ts # Prisma client
auth.ts # NextAuth config
validations.ts # Zod schemasServer Component (default — no 'use client')
// app/users/page.tsx — runs on server, has direct DB access
import { db } from '@/lib/db'
export default async function UsersPage() {
const users = await db.user.findMany({ orderBy: { createdAt: 'desc' } })
return (
<div>
{users.map(u => <UserCard key={u.id} user={u} />)}
</div>
)
}Client Component (interactive)
'use client'
import { useState } from 'react'
export function Counter() {
const [count, setCount] = useState(0)
return <button onClick={() => setCount(c => c + 1)}>{count}</button>
}Server Action (form submit without API route)
// app/actions.ts
'use server'
import { revalidatePath } from 'next/cache'
import { db } from '@/lib/db'
export async function createUser(formData: FormData) {
const name = formData.get('name') as string
if (!name) throw new Error('Name required')
await db.user.create({ data: { name } })
revalidatePath('/users')
}
// Usage in Server Component:
<form action={createUser}>
<input name="name" />
<button type="submit">Create</button>
</form>API Route
// app/api/users/route.ts
import { NextRequest, NextResponse } from 'next/server'
import { getServerSession } from 'next-auth'
export async function GET(req: NextRequest) {
const session = await getServerSession(authOptions)
if (!session) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
const users = await db.user.findMany()
return NextResponse.json(users)
}
export async function POST(req: NextRequest) {
const body = await req.json()
const parsed = UserCreateSchema.safeParse(body)
if (!parsed.success) return NextResponse.json({ error: parsed.error }, { status: 400 })
const user = await db.user.create({ data: parsed.data })
return NextResponse.json(user, { status: 201 })
}Metadata & SEO
export const metadata: Metadata = {
title: 'My App',
description: '...',
openGraph: { title: '...', images: ['/og.png'] }
}Rules
- Default to Server Components — only use 'use client' when you need interactivity
- Use Server Actions for mutations (simpler than API routes for form submits)
- Validate ALL input with Zod on the server side
- Protect routes in middleware.ts (not just in components)
- Use loading.tsx for Suspense boundaries on slow data fetches
- Use error.tsx for error boundaries
- Never fetch data in Client Components if a Server Component can do it
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.

