Skip to content

zahinafsar/next-ts-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Next-TS-API

๐Ÿš€ A powerful TypeScript-first API client generator for Next.js applications with full type safety and automatic route type generation.

npm version License: MIT

๐Ÿ“š Documentation

View Full Documentation โ†’

  • Setup Guide
  • Core Concepts
  • API Reference
  • Examples
  • Contributing Guidelines

Why Next-TS-API?

In Next.js 13+ applications, while Server Actions provide type safety for mutations, data fetching is often better handled through API routes. Next-TS-API bridges the type safety gap by providing end-to-end type safety for your Next.js API routes, ensuring both your client-side API calls and server-side implementations are fully type-safe.

Features

  • ๐Ÿ”’ Full Type Safety: Automatically generates TypeScript types for your API routes
  • ๐ŸŽฏ Zero Configuration: Works out of the box with Next.js App Router
  • ๐Ÿ”„ Auto-completion: Get full IDE support for your API routes, methods, and payloads
  • ๐Ÿ› ๏ธ Type Inference: Automatically infers request/response types from your route handlers

Quick Start

npm install next-ts-api

License

MIT ยฉ Zahin Afsar

About

๐Ÿš€ A powerful TypeScript-first API client generator for Next.js applications with full type safety

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published