← Back to list

nextjs-app-router
by jonit-dev
⭐ 0🍴 0📅 Jan 21, 2026
SKILL.md
name: nextjs-app-router description: Next.js 15 App Router patterns for this project. Use when creating routes, API endpoints, server components, or client components.
Next.js 15 App Router
Directory Structure
app/- Routes and API handlersclient/- Client components and utilitiesserver/- Server-side servicesshared/- Shared types and utilities
Route Handlers (API)
// app/api/example/route.ts
import { NextRequest, NextResponse } from 'next/server';
export async function POST(request: NextRequest) {
const body = await request.json();
// Validate with zod schema from shared/validation/
return NextResponse.json({ data });
}
Server Components (Default)
// No 'use client' directive
export default async function Page() {
const data = await fetchData(); // Direct DB/API calls
return <div>{data}</div>;
}
Client Components
'use client';
// Required for: hooks, browser APIs, event handlers, state
import { useState } from 'react';
Data Fetching
- Server Components: Direct async/await
- Client Components: Use
client/utils/api-client.ts
Caching
// Revalidate every hour
export const revalidate = 3600;
// Or disable caching
export const dynamic = 'force-dynamic';
Error Handling
error.tsx- Error boundary per routenot-found.tsx- 404 handlingloading.tsx- Suspense fallback
Metadata
export const metadata = {
title: 'Page Title',
description: 'Page description',
};
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon