api-architecture

Design RESTful API architectures for Next.js App Router serverless environments.

Updated Dec 15, 2025
One-click install
npx skills add https://github.com/jhlee0409/sidedish --skill api-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-architecture
Source: https://github.com/jhlee0409/sidedish/tree/main/.claude/skills/api-architecture
Command: npx skills add https://github.com/jhlee0409/sidedish --skill api-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

API 설계 원칙과 계층화를 통해 안정적이고 확장 가능한 RESTful API 구조를 제시합니다.

Core Features & Use Cases

  • Request Pipeline: Rate Limiting → Auth → Validate → Authorize → Execute
  • Pagination & Responses: 커서 기반 페이지네이션과 일관된 응답 구조
  • Anti-Patterns & Best Practices: 명확한 경로 설계와 패턴 예시

Quick Start

새로운 라우트를 템플릿에 맞춰 구현합니다.

Frequently Asked Questions about api-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a RESTful API with a consistent request pipeline?

RESTful API design uses a standardized request pipeline: Rate Limit → Auth → Validate → Authorize → Execute. This enforces security and consistency across all endpoints, ensuring requests are throttled, authenticated, validated for structure, checked for permissions, and finally executed in order.

What's the best way to implement pagination in a REST API?

Cursor-based pagination is more efficient than offset-based for large datasets. It uses a cursor token to mark the position in results, reducing database load and ensuring consistent ordering even as data changes, making it ideal for scalable REST APIs.

Can I build a RESTful API in Next.js App Router with serverless functions?

Yes. Next.js App Router supports serverless route handlers that implement RESTful patterns with resource-centric routes, typed error handling, and standardized response structures, enabling scalable API architectures without managing infrastructure.

What API security patterns should I follow in production?

Enforce a security pipeline: rate limiting prevents abuse, authentication verifies identity, validation checks request format, authorization confirms permissions, and then execute the operation. Standardized error payloads and typed handling ensure consistent security across endpoints.

What are common REST API anti-patterns I should avoid?

Anti-patterns include mixing HTTP methods (using GET for mutations), inconsistent response structures, missing pagination for large datasets, and bypassing security validation. Following resource-centric routes and the enforced pipeline prevents these issues.

How do I structure error responses in a REST API?

Use standardized error payloads with consistent structure across all endpoints, paired with typed error handling. This lets clients parse errors reliably and improves debugging, as all failures follow the same format and categories.