Back-end Framework for Next.js App Router
Documentation
 Â
Quick Start
 Â
Performance
Vovk.ts lets you build a structured back end on top of Next.js App Router Route Handlersâand generate a type-safe client, OpenAPI, and AI tools from the same code. Under the hood: you write Controllers (real handlers), and Vovk emits schema artifacts for codegenâwithout maintaining a separate contract layer.
Requirements: Node.js 22+ and Next.js 15+
npx vovk-cli@latest initSee: https://vovk.dev/quick-install
- Stay native to Next.js (routing, streaming, middleware/auth patterns, deployment targets)
- Structured API layer (Controller â Service â Repository) on top of Route Handlers
- Schema emission as a build artifact (
.vovk-schema/) to power codegen/docs/AI tools - Typed request handling via
procedure(...)with{ params, query, body } - Back-end segmentation via segments: split your API into independently configured units that each compile into their own serverless function
- Mix in third-party OpenAPI schemas as modules that share the same client/tooling pipeline (OpenAPI mixins)
- Derive AI tools from your API surface (controllers and emitted RPC modules can be exposed as AI tools with parameters +
execute)
Controller + decorator:
export default class UserController {
@get('{id}')
static async getUser(req: NextRequest, { id }: { id: string }) {
// ...
}
}With procedure you validate and type inputs in-place:
export default class UserController {
@get('{id}')
static getUser = procedure({
params: z.object({
id: z.string().uuid(),
}),
handle: async (req, { id }) => {
// ...
},
});
}Codegen emits fetch-powered client:
import { UserRPC, PetstoreAPI } from 'vovk-client';
const user = await UserRPC.getUser({ params: { id: '123' } });
const pet = await PetstoreAPI.getPetById({ params: { petId: 1 } });Controllers (current context execution), RPC/API modules (HTTP calls) can be used to derive AI tools:
const { tools } = deriveTools({ modules: { UserRPC, TaskController, PetstoreAPI } });
console.log(tools); // [{ name, description, parameters, execute }, ...]Procedures can be executed locally for SSR/PPR:
await UserController.getUser.fn({ params: { id: '123' } });vovk(runtime): decorators,procedure, routing helpers,deriveToolsvovk-cli(toolchain): codegen, docs generation, bundling/publishingvovk-client(optional): re-exported composed client for easy imports
Packages overview: https://vovk.dev/packages
- Docs: https://vovk.dev
- Quick Start: https://vovk.dev/quick-install
- Manual install: https://vovk.dev/manual-install
- OpenAPI Mixins: https://vovk.dev/mixins
- Performance: https://vovk.dev/performance
- âHello Worldâ example app: https://github.com/finom/vovk-hello-world
License: MIT (see LICENSE).