Using D2 lang, create the most advanced and complex graph you can using all the styles…
- User
Using D2 lang, create the most advanced and complex graph you can using all the styles it offer
Assistant
Here's a complex D2 diagram showcasing various styles and features:
title: "Advanced Enterprise Architecture Ecosystem" { near: top-center shape: text style: { font-size: 24 font-color: "#2D3748" bold: true } } # Define themes and styles styles: { cloud: { fill: "#E2E8F0" stroke: "#4A5568" stroke-width: 2 shadow: true 3d: true } database: { fill: "#EBF8FF" stroke: "#3182CE" stroke-width: 2 3d: true } microservice: { fill: "#F0FFF4" stroke: "#38A169" stroke-width: 1 border-radius: 10 } gateway: { fill: "#FFFAF0" stroke: "#DD6B20" stroke-width: 2 border-radius: 4 } user: { fill: "#FFF5F5" stroke: "#E53E3E" stroke-width: 1 border-radius: 25 opacity: 0.9 } security: { fill: "#FAF5FF" stroke: "#805AD5" stroke-width: 2 border-radius: 0 opacity: 0.85 } critical: { stroke-dash: 5 stroke: "#E53E3E" stroke-width: 3 } high-traffic: { stroke-width: 4 stroke: "#3182CE" } encrypted: { stroke-dash: 3 stroke: "#805AD5" } } # Cloud Infrastructure cloud: "Cloud Infrastructure" { style: cloud shape: cloud # Regions region1: "Primary Region" { shape: rectangle style.fill: "#EDF2F7" style.stroke: "#4A5568" # Availability Zones az1: "AZ-1" { shape: rectangle style.fill: "#F7FAFC" compute: "Compute Cluster" { shape: hexagon style.fill: "#BEE3F8" pods: { shape: cylinder style.multiple: true } } storage: "Storage Cluster" { shape: cylinder style.fill: "#C6F6D5" } } az2: "AZ-2" { shape: rectangle style.fill: "#F7FAFC" compute: "Compute Cluster" { shape: hexagon style.fill: "#BEE3F8" pods: { shape: cylinder style.multiple: true } } storage: "Storage Cluster" { shape: cylinder style.fill: "#C6F6D5" } } } region2: "DR Region" { shape: rectangle style.fill: "#EDF2F7" style.stroke: "#4A5568" style.stroke-dash: 5 az1: "AZ-1" { shape: rectangle style.fill: "#F7FAFC" compute: "Compute Cluster" { shape: hexagon style.fill: "#BEE3F8" style.opacity: 0.7 } storage: "Storage Cluster" { shape: cylinder style.fill: "#C6F6D5" style.opacity: 0.7 } } } } # Data Layer data: "Data Layer" { style: database primary: "Primary Database" { shape: cylinder style.fill: "#90CDF4" master: "Master" { shape: cylinder } replicas: "Read Replicas" { shape: cylinder style.multiple: true } } cache: "Redis Cache" { shape: cylinder style.fill: "#FEB2B2" } warehouse: "Data Warehouse" { shape: cylinder style.fill: "#F6E05E" analytics: "Analytics Engine" { shape: hexagon } } streaming: "Event Stream" { shape: queue style.fill: "#B794F4" } } # Application Layer app: "Application Layer" { style: microservice api: "API Gateway" { shape: hexagon style: gateway } auth: "Auth Service" { shape: rectangle style: security } services: { user: "User Service" { shape: rectangle } payment: "Payment Service" { shape: rectangle style.stroke: "#E53E3E" } inventory: "Inventory Service" { shape: rectangle } notification: "Notification Service" { shape: rectangle } } workers: "Background Workers" { shape: parallelogram style.fill: "#FEEBC8" style.multiple: true } } # Client Layer clients: "Client Layer" { style: user web: "Web Application" { shape: browser style.fill: "#FED7D7" } mobile: "Mobile Apps" { ios: "iOS" { shape: mobile style.fill: "#FED7D7" } android: "Android" { shape: mobile style.fill: "#FED7D7" } } thirdparty: "3rd Party Integrations" { shape: rectangle style.fill: "#FED7D7" style.stroke-dash: 5 } } # Security Layer security: "Security Layer" { style: security waf: "Web Application Firewall" { shape: hexagon } idp: "Identity Provider" { shape: person } encryption: "Encryption Service" { shape: diamond } monitoring: "Security Monitoring" { shape: oval } } # Connections clients.web -> app.api: "HTTPS Requests" { style: high-traffic } clients.mobile.ios -> app.api clients.mobile.android -> app.api app.api -> app.auth: "Authenticate" { style: encrypted } app.api -> app.services.user: "User Operations" app.api -> app.services.payment: "Payment Processing" { style: critical } app.api -> app.services.inventory: "Inventory Queries" app.api -> app.services.notification: "Send Notifications" app.services.payment -> data.primary: "Transaction Records" { style: critical } app.services.user -> data.primary: "User Data" app.services.user -> data.cache: "Session Cache" app.services.inventory -> data.primary: "Inventory Records" app.services.inventory -> data.cache: "Product Cache" app.services.notification -> data.streaming: "Event Publishing" app.workers -> data.streaming: "Event Consumption" data.primary -> data.warehouse: "ETL Pipeline" data.warehouse.analytics -> clients.thirdparty: "Analytics Data" security.waf -> app.api: "Filter Requests" app.auth -> security.idp: "Verify Identity" security.encryption -> data.primary: "Encrypt Sensitive Data" security.monitoring -> cloud: "Monitor Infrastructure" cloud.region1 <-> cloud.region2: "Replication" { style: encrypted } data.primary.master -> data.primary.replicas: "Replication" # Container for legend legend: { shape: rectangle style.stroke-width: 1 style.fill: "#FFFFFF" style.opacity: 0.9 style.shadow: true title: "Legend" { shape: text style.bold: true } critical_path: "Critical Path" { shape: text style.stroke: "#E53E3E" style.stroke-dash: 5 } high_traffic: "High Traffic" { shape: text style.stroke: "#3182CE" style.stroke-width: 4 } encrypted: "Encrypted" { shape: text style.stroke: "#805AD5" style.stroke-dash: 3 } } # Annotations annotation { cloud.region1.az1.compute: "Auto-scaling enabled" { style.font-size: 12 style.italic: true } app.services.payment: "PCI Compliant" { style.font-size: 12 style.bold: true style.font-color: "#E53E3E" } data.primary: "99.999% uptime SLA" { style.font-size: 12 style.bold: true } }Would you like me to explain or break down this D2 diagram?
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.