nectic

nectic is an open source TypeScript library that simplifies building API routes and server actions in Next.js — supporting both App Router and Pages Router.
What sets nectify-js apart is its ability to make a single service work on both sides at once — as an HTTP API consumable by other applications or services, and as server actions usable directly within the Next.js app itself. Both share the same pattern: Zod-based validation, middleware chains, and a chainable reply builder — without writing two separate implementations.
All responses follow a unified JSON envelope structure, making client-side handling more predictable. I use this library in this portfolio itself to handle server actions — and it runs without a single error.
- Language: TypeScript
- Validation: Zod
- Runtime: Next.js