Skip to main content
Search...

Course Overview

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

Welcome to the Duck Gen Course

This course takes you from zero to production-ready type safety. Each chapter builds on the previous one, so follow them in order.

By the end, you will be able to:

  • 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 is this for?

This course is designed for developers who:

  • Are new to Duck Gen and want a structured learning path.
  • Have basic TypeScript knowledge but no experience with code generation.
  • Want to understand 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 about 10-15 minutes to read and follow along. The full course can be completed in a single sitting or spread across multiple sessions.