Demo: draft a D2 service map
D2 is readable for architecture diagrams that need labels, containers, and typed relationships. Even before final styling, a preview helps verify that the text describes the intended system.
- Use nested blocks for domains or deployment zones.
- Write relationship labels as verbs or protocols.
- Keep identifiers stable so future edits do not reshuffle the whole diagram.
client -> gateway: HTTPS
gateway -> orders: REST
orders -> queue: publish event
queue -> worker: consume
orders -> db: SQL