Introduction

Introduction

Define your types once. Generate code and diagrams everywhere.

typeDiagram is a tiny, language-neutral DSL for describing algebraic data types — records, tagged unions, generics, aliases. From one .td file, you get:

typeDiagram is a shared schema for your data model with a first-class visual canvas. The editor and source are two views of the same typed document, so every visual change stays ready for code generation in as many languages as you need.

Why this matters

When your backend is Python, your mobile app is Dart/Kotlin, your web client is TypeScript, your data pipeline is Rust, and your gRPC services speak Protobuf, keeping DTOs aligned across nine languages is a full-time job. typeDiagram inverts the problem: one definition, N outputs. Change a field, regenerate, done. Every consumer of the schema stays honest because they all build from the same source.