Nestia
Supercharge your NestJS backend with
20,000x faster validation, type-safe SDK, and AI integration

No extra schema required. Just fine with pure TypeScript type.

@TypedBody() input: IArticleCreate

Guide DocumentsPlaygroundGitHub

SDK Generation Magic

Write NestJS controllers as you normally would. Nestia analyzes your TypeScript types and generates a fully type-safe SDK β€” like tRPC, but fully automated.

Backend

Your NestJS Controller

import { TypedBody, TypedParam, TypedRoute } from "@nestia/core";
import { Controller } from "@nestjs/common";

import { IBbsArticle } from "@api/lib/structures/IBbsArticle";

@Controller("bbs/:section/articles")
export class BbsArticlesController {
  @TypedRoute.Post()
  async create(
    @TypedParam("section") section: string,
    @TypedBody() input: IBbsArticle.ICreate,
  ): Promise<IBbsArticle> {
    // no extra schema, no decorator tricks
    // just pure TypeScript type
    return this.service.create(section, input);
  }
}
β†’
↓
Frontend

Auto-generated SDK

import api from "@my/api";
import { IBbsArticle } from "@my/api/lib/structures/IBbsArticle";

// auto-generated SDK β€” fully type-safe
const connection: api.IConnection = {
  host: "http://localhost:3000",
};
const article: IBbsArticle =
  await api.functional.bbs.articles.create(
    connection,
    "general",
    {
      title: "Hello World",
      body: "My first article",
      thumbnail: "https://example.com/img.png",
    } satisfies IBbsArticle.ICreate,
  );

Key Features

One library. Pure TypeScript types. Everything you need for NestJS.

Super-fast Validation
Super-fast Validation

@TypedBody() input: T

20,000x faster (than class-validator)

AOT-compiled runtime validators powered by typia. Supports complex union types, recursive structures, and the most detailed error reporting.

Why Nestia?

Traditional NestJS development requires separate schemas, manual SDK writing, and verbose decorators. Nestia eliminates all of that with pure TypeScript types.

Traditional NestJS

βœ•

Define class-validator decorators on every DTO property β€” verbose and error-prone

βœ•

Write Swagger decorators manually (@ApiProperty, @ApiResponse) for documentation

βœ•

Generate SDK with Swagger codegen β€” untyped, unreliable, and hard to maintain

βœ•

No mockup simulator β€” frontend team must wait for backend implementation

βœ•

Manual integration needed for AI/LLM function calling with your API

Nestia β€” Pure TypeScript

βœ“

Write pure TypeScript interfaces β€” no decorators, no duplication, 20,000x faster validation

βœ“

Swagger document auto-generated from TypeScript types β€” always in sync with code

βœ“

Type-safe SDK auto-generated β€” like tRPC but requires zero code modification

βœ“

Built-in mockup simulator in SDK β€” frontend can start development immediately

βœ“

One-command AI chatbot β€” convert Swagger to LLM function calling schemas instantly

Mockup Simulator

SDK-embedded simulator that mimics your backend API.
Just set simulate: true β€” no server required.

Simulate

Frontend without Backend

import api from "@my/api";
import { IBbsArticle } from "@my/api/lib/structures/IBbsArticle";

// just set simulate: true β€” no backend needed
const connection: api.IConnection = {
  host: "http://localhost:3000",
  simulate: true,
};

// same SDK function, but runs locally
// validates input with typia.assert<T>()
// returns random data with typia.random<T>()
const article: IBbsArticle =
  await api.functional.bbs.articles.create(
    connection,
    "general",
    {
      title: "Hello World",
      body: "My first article",
      thumbnail: "https://example.com/img.png",
    } satisfies IBbsArticle.ICreate,
  );

βœ…

Input Validation

Every request parameter is validated with typia.assert<T>(). Type errors are caught instantly, even without a running server.

🎲

Random Response

Generates realistic mock responses with typia.random<T>(). Respects type constraints, formats, and custom tags.

⚑

Frontend First

Start frontend development immediately. No need to wait for backend implementation β€” the simulator covers the full API surface.

πŸ”„

Seamless Switch

Just remove simulate: true to connect to the real backend. Same code, same types, zero migration effort.

Sponsors

Thanks for your support. Your donation encourages nestia development.

Sponsors