[SPECIFICATION]

DSL Reference

Archway DSL is a declarative language for defining architecture diagrams as code.

01

CLOUD_ARCHITECTURE

Define infrastructure diagrams with zones, nodes, and connections.

diagram "My Architecture" {
  zone "Frontend" color blue {
    node cdn "CloudFront CDN" icon aws/cloudfront
    node web "Web App" icon aws/s3
  }

  zone "Backend" color teal {
    node api "API Gateway" icon aws/api-gateway
    node svc "Lambda Service" icon aws/lambda
    node db "PostgreSQL" icon aws/rds
    node cache "Redis" icon aws/elasticache
  }

  connect cdn -> web "serves"
  connect web -> api "HTTPS"
  connect api -> svc "invokes"
  connect svc -> db "reads/writes"
  connect svc -> cache "cache layer"
}
02

CORE_SYNTAX

diagramdiagram "title" { ... }Root container for cloud-arch diagrams
zonezone "name" color <color> { ... }Logical grouping (VPC, subnet, region)
nodenode <id> "label" icon <provider/service>Infrastructure component
connectconnect <source> -> <target> "label"Directed connection between nodes
iconicon aws/ec2 | azure/vm | gcp/computeCloud provider icon (300+ available)
colorcolor blue | teal | red | amber | ...Zone and node color themes
03

SEQUENCE_DIAGRAM

sequence "User Auth Flow" {
  participant client "Browser"
  participant api "API Server"
  participant auth "Auth Service"
  participant db "Database"

  message client -> api "POST /login"
  message api -> auth "validate(credentials)"
  message auth -> db "SELECT user WHERE email=?"
  message db -> auth "user_record"
  message auth -> api "jwt_token"
  message api -> client "200 OK { token }"
}
04

ENTITY_RELATIONSHIP

diagram "E-Commerce Schema" {
  entity User {
    field id "UUID" pk
    field email "String" unique
    field name "String"
    field created_at "DateTime"
  }

  entity Order {
    field id "UUID" pk
    field user_id "UUID" fk
    field total "Decimal"
    field status "Enum"
  }

  entity Product {
    field id "UUID" pk
    field name "String"
    field price "Decimal"
    field stock "Integer"
  }

  relation User -> Order "1:N" label "places"
  relation Order -> Product "N:M" label "contains"
}
05

FLOWCHART

diagram "CI/CD Pipeline" {
  start begin "Push to main"
  process lint "Run linters"
  decision tests "Tests pass?"
  process build "Build Docker image"
  process deploy "Deploy to production"
  end done "Live"

  connect begin -> lint
  connect lint -> tests
  connect tests -> build label "yes"
  connect tests -> begin label "no"
  connect build -> deploy
  connect deploy -> done
}
06

ICON_PROVIDERS

AWS86 icons

EC2, S3, Lambda, RDS, DynamoDB, CloudFront, SQS, SNS, ECS, EKS...

AZURE71 icons

VM, Blob, Functions, SQL DB, Cosmos DB, CDN, Service Bus, AKS...

GCP54 icons

Compute, Storage, Cloud Run, Cloud SQL, BigQuery, Pub/Sub, GKE...

Plus 90+ generic icons for databases, servers, users, firewalls, and more.