Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alii/nextkit
Zero dependency API Toolkit for Next.js. Generate type-safe, error handled Next.js API routes.
https://github.com/alii/nextkit
api nextjs serverless typescript
Last synced: 7 days ago
JSON representation
Zero dependency API Toolkit for Next.js. Generate type-safe, error handled Next.js API routes.
- Host: GitHub
- URL: https://github.com/alii/nextkit
- Owner: alii
- License: apache-2.0
- Created: 2021-06-10T11:49:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-17T12:56:54.000Z (about 2 years ago)
- Last Synced: 2024-05-02T02:32:45.704Z (6 months ago)
- Topics: api, nextjs, serverless, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/nextkit
- Size: 1.26 MB
- Stars: 55
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# nextkit - [demo app](https://github.com/alii/nextkit-demo)
nextkit is a toolkit for Next.js apps that lets you generate type-safe, error handled Next.js API routes that conform to a standard response type.
### example
My recommended pattern can be found in the `example` folder. This file exports a _type_ that can be ambiently imported in the frontend to have a guaranteed type for the API (plus, you can wrap it with the type `APIResponse` to have the actual json typed from the HTTP response).
- **demo app**: [`github.com/alii/nextkit-demo`](https://github.com/alii/nextkit-demo)
- **demo with [vercel/swr](https://github.com/vercel/swr)**: [`github.com/prequist/next-boilerplate`](https://github.com/prequist/next-boilerplate)### docs
honestly the examples folder is good enough and it demonstrates all the features. i have no motivation to write docs yet 🚀🚀