Other scenarios
AI website builders
The minimalistic design of Vovk.ts allows to easily create complex back-end logic using AI generators, involving minimal input context and making AI agents think less, minimizing hallucinations and improving reliability of the generated RESTful APIs.
Comparing to Vovk.ts with NestJS, the first one requires to use less imports, less decorators, doesn’t require to connect controller and service into a “module”, doesn’t use dependency injection (services are just namespaced functions with no decorators), supports in-line input/output models (so AI doesn’t need to create a “dto” classes in a separate file), supporting basically any modern validation library, etc.
With modern tooling such as Prisma ORM , even small LLM models would be capable to understand the task and generate working and complex code.
Here are the features of Vovk.ts that make it suitable for AI-generated backends:
- Almost zero boilerplate, just a config file.
- The most minimalistic syntax for defining API routes for a backend framework with OAS support.
- Requires a single Next.js project, so AI wouldn’t struggle with a monorepo.
- Clear syntax for RPC modules that can be used on the front-end side.
- Clear type inference for input/output models without extra imports.
Bonus points available out of the box:
- Multitenancy support with Next.js Middleware.
- OpenAPI documentation with code samples.
- Function calling framework that turns the controllers (for server-side tools) and RPC modules (for client-side tools) into powerful agents and MCP servers.
- OpenAPI mixins that allow to integrate third-party APIs into the AI-generated project.
- Bundling and codegen features that allow to create and publish RPC libraries with minimal effort.
Using Next.js + Vovk.ts as a standalone RESTful API server
Next.js is known as a React framework, offering UI/UX related features such as server-side rendering, static site generation, partial pre-rendering, etc. Due to specifics and limitations of route.ts
files it can’t be called a full-featured backend framework, providing extended but limited alternative to simple back-end libraries such as Express , Fastify , or Koa .
However, as NestJS is built in top of Express, Vovk.ts is built on top of Next.js API routes, turning it into a full-featured backend framework with Controller-Service-Repository architecture, OpenAPI documentation, but also code generation, RPC support, and more.
This allows to use Next.js + Vovk.ts as a standalone RESTful API server, without utilizing React-related features. Just set rootEntry
to ''
in the config file (by default it’s set to 'api'
) and create your API routes in the root of ./src/app
folder.
Let’s say you have an Angular, Vue.js or other front-end project that requires a RESTful API server. You can use a monorepo with two projects, one for the front-end powered by Vite and another for the back-end powered by Next.js and Vovk.ts, that can emit RPC modules directly to the front-end project (setting outDir
config option to ../front-end/node_modules/.vovk-client
for composed client or ../front-end/src/client
for segmented client).
If you want to use Next.js + Vovk.ts as a standalone RESTful API server, but don’t want to set up monorepo, you can split front-end and back-end into two separate repositories, where back-end repository bundles the client library and publishes it as a private NPM package that can be installed into the front-end part.