API Contracts Generator

0•

Synchronizes API contracts between Next.js and NestJS to ensure type safety and consistent validation across the full stack.

The API Contracts Generator skill bridges the gap between frontend and backend development by enforcing a unified communication standard. It automates the creation of NestJS DTOs, synchronized TypeScript interfaces, and matching Zod validation schemas for Next.js. By standardizing request/response structures, error handling, and pagination, it eliminates common integration bugs like type mismatches or divergent validation rules, ensuring your Swagger documentation and frontend actions stay perfectly in sync with your backend implementation.

주요 기능

01Implements consistent validation logic using class-validator (Backend) and Zod (Frontend)
02Provides pre-built templates for standardized pagination and uniform error formatting
03Generates standardized NestJS Request and Response DTOs with Swagger integration
040 GitHub stars
05Automates the creation of type-safe Next.js Server Actions linked to backend handlers
06Synchronizes frontend TypeScript types with backend structures to prevent integration errors

사용 사례

01Refactoring existing API endpoints to include robust validation and auto-generated documentation
02Standardizing communication patterns and error handling in a monorepo environment
03Building new full-stack features that require synchronized data structures between Next.js and NestJS