architecture-diagrams
Overview
Visual architecture engineering skill inspired by tt-a1i/archify. Replaces static ASCII art and rigid default diagrams with crisp, self-contained SVG and responsive HTML diagrams featuring modern dark-mode palettes, pulse animations for event flows, and strict C4-model component boundaries.
When to Use
Activate whenever:
- Designing or explaining distributed systems, microservices, or full-stack architectures.
- Visualizing complex auth flows (OAuth2, PKCE), multi-step payment sagas, or CDC outbox data pipelines.
- User requests an architecture diagram, flow chart, sequence diagram, or visual system design.
Rules & Patterns
1. Diagram Types Supported
- System Landscape / C4 Container Diagram:
- Clients (Web, Mobile, Third-party) → API Gateway / CDN → Microservices / Serverless → Storage / Event Brokers.
- Sequence Flow Diagram:
- Step-by-step lifecycles with synchronous requests, asynchronous pub/sub events, and compensating transactions.
- Data Pipeline & Event-Driven Topology:
- Primary DB → Transactional Outbox → CDC (Debezium) → Kafka Topic → Consumers → Materialized Views.
2. Aesthetic & Visual Invariants
- Dark Theme by Default: Surface
#0B0F19, containers #1E293B, borders #334155, text #F8FAFC.
- Semantic Component Accents:
- Client / Frontend: Sky Blue (
#38BDF8)
- API Gateway / Router: Indigo (
#818CF8)
- Business Services: Emerald Green (
#34D399)
- Databases / Storage: Amber / Orange (
#F59E0B)
- Message Brokers / Event Buses: Purple (
#A855F7)
- Active Data-Flow Motion: Use subtle CSS
@keyframes on SVG stroke dashes (stroke-dasharray, stroke-dashoffset) to show active direction of messages and data streams.
Code Examples
Standalone Animated SVG Data-Flow Pattern
<svg viewBox="0 0 800 200" xmlns="http://www.w3.org/2000/svg" class="bg-slate-950 rounded-xl p-4 w-full">
<defs>
<style>
.flow-line { stroke: #38BDF8; stroke-width: 2; stroke-dasharray: 6,6; animation: flow 1.5s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -12; } }
.box { fill: #1E293B; stroke: #334155; stroke-width: 1.5; rx: 8; }
.text-title { fill: #F8FAFC; font-family: sans-serif; font-size: 14px; font-weight: 600; }
.text-sub { fill: #94A3B8; font-family: monospace; font-size: 11px; }
</style>
</defs>
<!-- Client Node -->
<rect x="30" y="70" width="160" height="60" class="box" />
<text x="110" y="96" text-anchor="middle" class="text-title">Next.js Client</text>
<text x="110" y="114" text-anchor="middle" class="text-sub">React 19 / RSC</text>
<!-- Data Flow -->
<line x1="190" y1="100" x2="330" y2="100" class="flow-line" />
<!-- API Gateway -->
<rect x="330" y="70" width="160" height="60" class="box" />
<text x="410" y="96" text-anchor="middle" class="text-title">API Gateway</text>
<text x="410" y="114" text-anchor="middle" class="text-sub">Auth & Rate Limiting</text>
<!-- Flow to Database -->
<line x1="490" y1="100" x2="630" y2="100" class="flow-line" />
<!-- Database -->
<rect x="630" y="70" width="140" height="60" class="box" />
<text x="700" y="96" text-anchor="middle" class="text-title">PostgreSQL</text>
<text x="700" y="114" text-anchor="middle" class="text-sub">Prisma / Outbox</text>
</svg>
Validation Checklist
Common Mistakes
- Messy cross-overs: Laying out 20 boxes with overlapping lines instead of grouping into clean C4 layers.
- Unlabeled connections: Lines without protocol (HTTPS, gRPC, WSS) or event payload descriptions.
- Overwhelming detail: Drawing internal class diagrams when the user asked for a system-level overview.
Integration Notes
- Triggers during
system-design and microservices planning phases.
- Used to generate visual architecture artifacts in Markdown walkthroughs and specs.
- Pairs with
ui-ux-pro for consistent aesthetic styling.
1---2name: architecture-diagrams3description: Interactive, visual architecture and sequence diagrams as code. Generates beautiful, self-contained SVG/HTML diagrams with motion, clear component boundaries, and verifiable data flows.4---5# architecture-diagrams67## Overview89Visual architecture engineering skill inspired by [tt-a1i/archify](https://github.com/tt-a1i/archify). Replaces static ASCII art and rigid default diagrams with crisp, self-contained SVG and responsive HTML diagrams featuring modern dark-mode palettes, pulse animations for event flows, and strict C4-model component boundaries.1011## When to Use1213Activate whenever:1415- Designing or explaining distributed systems, microservices, or full-stack architectures.16- Visualizing complex auth flows (OAuth2, PKCE), multi-step payment sagas, or CDC outbox data pipelines.17- User requests an architecture diagram, flow chart, sequence diagram, or visual system design.1819## Rules & Patterns2021### 1. Diagram Types Supported22231. **System Landscape / C4 Container Diagram**:24 - Clients (Web, Mobile, Third-party) → API Gateway / CDN → Microservices / Serverless → Storage / Event Brokers.252. **Sequence Flow Diagram**:26 - Step-by-step lifecycles with synchronous requests, asynchronous pub/sub events, and compensating transactions.273. **Data Pipeline & Event-Driven Topology**:28 - Primary DB → Transactional Outbox → CDC (Debezium) → Kafka Topic → Consumers → Materialized Views.2930### 2. Aesthetic & Visual Invariants3132- **Dark Theme by Default**: Surface `#0B0F19`, containers `#1E293B`, borders `#334155`, text `#F8FAFC`.33- **Semantic Component Accents**:34 - Client / Frontend: Sky Blue (`#38BDF8`)35 - API Gateway / Router: Indigo (`#818CF8`)36 - Business Services: Emerald Green (`#34D399`)37 - Databases / Storage: Amber / Orange (`#F59E0B`)38 - Message Brokers / Event Buses: Purple (`#A855F7`)39- **Active Data-Flow Motion**: Use subtle CSS `@keyframes` on SVG stroke dashes (`stroke-dasharray`, `stroke-dashoffset`) to show active direction of messages and data streams.4041---4243## Code Examples4445### Standalone Animated SVG Data-Flow Pattern4647```html48<svg viewBox="0 0 800 200" xmlns="http://www.w3.org/2000/svg" class="bg-slate-950 rounded-xl p-4 w-full">49 <defs>50 <style>51 .flow-line { stroke: #38BDF8; stroke-width: 2; stroke-dasharray: 6,6; animation: flow 1.5s linear infinite; }52 @keyframes flow { to { stroke-dashoffset: -12; } }53 .box { fill: #1E293B; stroke: #334155; stroke-width: 1.5; rx: 8; }54 .text-title { fill: #F8FAFC; font-family: sans-serif; font-size: 14px; font-weight: 600; }55 .text-sub { fill: #94A3B8; font-family: monospace; font-size: 11px; }56 </style>57 </defs>5859 <!-- Client Node -->60 <rect x="30" y="70" width="160" height="60" class="box" />61 <text x="110" y="96" text-anchor="middle" class="text-title">Next.js Client</text>62 <text x="110" y="114" text-anchor="middle" class="text-sub">React 19 / RSC</text>6364 <!-- Data Flow -->65 <line x1="190" y1="100" x2="330" y2="100" class="flow-line" />6667 <!-- API Gateway -->68 <rect x="330" y="70" width="160" height="60" class="box" />69 <text x="410" y="96" text-anchor="middle" class="text-title">API Gateway</text>70 <text x="410" y="114" text-anchor="middle" class="text-sub">Auth & Rate Limiting</text>7172 <!-- Flow to Database -->73 <line x1="490" y1="100" x2="630" y2="100" class="flow-line" />7475 <!-- Database -->76 <rect x="630" y="70" width="140" height="60" class="box" />77 <text x="700" y="96" text-anchor="middle" class="text-title">PostgreSQL</text>78 <text x="700" y="114" text-anchor="middle" class="text-sub">Prisma / Outbox</text>79</svg>80```8182---8384## Validation Checklist8586- [ ] Diagram clearly identifies all component boundaries, ports, and protocols.87- [ ] Visual hierarchy is unambiguous (clients on left/top, storage on right/bottom).88- [ ] Motion/animation is purposeful and lightweight (no heavy canvas frameworks).89- [ ] Accessible: nodes include semantic labels and readable color contrast.9091---9293## Common Mistakes9495- **Messy cross-overs**: Laying out 20 boxes with overlapping lines instead of grouping into clean C4 layers.96- **Unlabeled connections**: Lines without protocol (HTTPS, gRPC, WSS) or event payload descriptions.97- **Overwhelming detail**: Drawing internal class diagrams when the user asked for a system-level overview.9899---100101## Integration Notes102103- Triggers during `system-design` and `microservices` planning phases.104- Used to generate visual architecture artifacts in Markdown walkthroughs and specs.105- Pairs with `ui-ux-pro` for consistent aesthetic styling.106