Skip to main content

Course Overview

A step-by-step course that teaches you Duck Gen from the ground up. No prior knowledge required.

Course overview

Each chapter builds on the previous one. Follow them in order.

By the end you can:

  • Understand why type-safe API contracts matter.
  • Set up a NestJS project with Duck Gen from scratch.
  • Generate typed route maps and message registries automatically.
  • Consume generated types with Duck Query on the client.
  • Add i18n support using typed message keys.
  • Run Duck Gen in CI/CD pipelines for continuous type safety.

Who this is for

Developers who:

  • Are new to Duck Gen and want a structured path.
  • Know basic TypeScript but haven't worked with code generation.
  • Want the "why" before the "how".

Course chapters

ChapterTitleWhat you will learn
1The ProblemWhy manual type syncing breaks and how Duck Gen fixes it.
2Project SetupCreate a NestJS project and install Duck Gen.
3Your First ControllerBuild a simple controller and understand decorators.
4Generating TypesRun Duck Gen for the first time and explore the output.
5Using Generated TypesImport and use RouteReq, RouteRes, and ApiRoutes on the client.
6Message KeysAdd typed i18n message registries with @duckgen tags.
7Duck Query ClientSet up Duck Query for type-safe HTTP requests.
8Real World PatternsError handling, interceptors, CI/CD, and production tips.

How long does it take?

Each chapter takes 10-15 minutes. Read it in one sitting or spread across sessions.