← Back to list

api-endpoint
by jhlee0409
세상에서 가장 맛있는 사이드 프로젝트 레스토랑
⭐ 0🍴 0📅 Jan 3, 2026
SKILL.md
name: api-endpoint description: Creates Next.js API routes with Firebase. Use when adding GET/POST/PATCH/DELETE endpoints, implementing pagination, adding auth checks, or handling file uploads. Includes route templates and error handling.
API Endpoint Skill
Instructions
- Create routes in
src/app/api/following REST conventions - Apply security layers: Rate Limiting → Auth → Validation → Business Logic
- Use
verifyAuthfor protected routes - Use
validateString,validateUrlfromsecurity-utils.ts - Return Korean error messages with proper HTTP status codes
Quick Start
import { NextRequest, NextResponse } from 'next/server'
import { verifyAuth } from '@/lib/auth-utils'
import { validateString, CONTENT_LIMITS } from '@/lib/security-utils'
import { checkRateLimit, getClientIdentifier, RATE_LIMIT_CONFIGS } from '@/lib/rate-limiter'
export async function POST(request: NextRequest) {
// 1. Rate limiting
const clientIp = getClientIdentifier(request)
const { allowed } = checkRateLimit(clientIp, RATE_LIMIT_CONFIGS.AUTHENTICATED_WRITE)
if (!allowed) return NextResponse.json({ error: '요청이 너무 많습니다.' }, { status: 429 })
// 2. Auth
const authUser = await verifyAuth(request)
if (!authUser) return NextResponse.json({ error: '인증이 필요합니다.' }, { status: 401 })
// 3. Validate & process...
}
For complete templates (dynamic routes, pagination, file upload, toggle endpoints), see reference.md.
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