close
Skip to Content
Nestia
Stop writing DTOs three times. One TypeScript type drives a NestJS endpoint,
a typed client SDK, an OpenAPI document, and e2e tests — for free.

No `class-validator`. No `@ApiProperty`. No codegen round-trip.

@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
Last updated on