Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ jobs:
- name: Validate JSON Schemas
run: check-jsonschema --check-metaschema schemas/*.json

- name: Validate example catalog
run: |
check-jsonschema --schemafile schemas/example-catalog.schema.json examples/catalog.json
python scripts/validate-example-catalog.py

- name: Validate normalized IR fixtures
run: check-jsonschema --schemafile schemas/normalized-ir.schema.json conformance/valid/*/expected.ir.json conformance/formatter/*/expected.ir.json

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ Install the development requirements and validate the portable schemas and confo
```sh
python -m pip install --requirement requirements-dev.txt
check-jsonschema --check-metaschema schemas/*.json
check-jsonschema --schemafile schemas/example-catalog.schema.json examples/catalog.json
check-jsonschema --schemafile schemas/normalized-ir.schema.json conformance/valid/*/expected.ir.json conformance/formatter/*/expected.ir.json
find conformance -name expected.diagnostics.json -print0 | xargs -0 check-jsonschema --schemafile schemas/diagnostic-expectations.schema.json
python scripts/validate-example-catalog.py
python scripts/validate-compiler-diagnostics.py
python scripts/validate-formatter-fixtures.py
npm ci
Expand Down
4 changes: 2 additions & 2 deletions examples/02-node-semantics.stack
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ diagram "Application and datastore" {

node app "Application" {
kind service
icon "service"
icon "server"
detail "Business logic"
}

node db "Primary database" {
kind database
icon "postgresql"
icon "database"
detail "PostgreSQL"
}

Expand Down
2 changes: 1 addition & 1 deletion examples/03-groups-and-layout.stack
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ diagram "Public application" {

node browser "Browser" {
kind client
icon "browser"
icon "web"
}

node mobile "Mobile app" {
Expand Down
6 changes: 3 additions & 3 deletions examples/04-commerce-platform.stack
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ diagram "Commerce platform" {
group storefront "Storefront" {
node web "Web storefront" {
kind client
icon "nextjs"
icon "web"
detail "Next.js"
}

Expand Down Expand Up @@ -54,12 +54,12 @@ diagram "Commerce platform" {
group data "Data" {
node products "Product database" {
kind database
icon "postgresql"
icon "database"
}

node orders "Order database" {
kind database
icon "postgresql"
icon "database"
}

node assets "Product media" {
Expand Down
76 changes: 76 additions & 0 deletions examples/05-aws-serverless.stack
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
stack 1.0

diagram "AWS serverless checkout" {
theme light

layout {
direction right
}

node customer "Customer" {
kind actor
}

group edge "Edge" {
node cdn "CloudFront" {
kind service
icon "aws:amazon-cloudfront"
}

node gateway "API Gateway" {
kind service
icon "aws:amazon-api-gateway"
}
}

group compute "Serverless compute" {
node checkout "Checkout" {
kind function
icon "aws:lambda"
}

node events "Order events" {
kind queue
icon "aws:amazon-eventbridge"
}

node fulfillment "Fulfillment" {
kind worker
icon "aws:lambda"
}
}

group data "Data" {
node orders "Orders" {
kind database
icon "aws:dynamodb"
}

node receipts "Receipts" {
kind storage
icon "aws:s3"
}
}

edge customer -> cdn "HTTPS" {
kind request
}
edge cdn -> gateway "API request" {
kind request
}
edge gateway -> checkout "Invoke" {
kind request
}
edge checkout -> orders "Write order" {
kind data
}
edge checkout -> events "OrderPlaced" {
kind event
}
edge events -> fulfillment "Dispatch" {
kind event
}
edge fulfillment -> receipts "Archive" {
kind data
}
}
58 changes: 58 additions & 0 deletions examples/06-gcp-data-service.stack
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
stack 1.0

diagram "GCP data service" {
theme light

layout {
direction right
}

node client "Web client" {
kind client
icon "web"
}

group application "Application" {
node api "Cloud Run API" {
kind service
icon "gcp:cloud-run"
}

node database "Cloud SQL" {
kind database
icon "gcp:cloud-sql"
}

node objects "Cloud Storage" {
kind storage
icon "gcp:cloud-storage"
}
}

group analytics "Analytics" {
node warehouse "BigQuery" {
kind database
icon "gcp:bigquery"
}

node analyst "Analyst" {
kind actor
}
}

edge client -> api "HTTPS" {
kind request
}
edge api -> database "SQL" {
kind data
}
edge api -> objects "Uploads" {
kind data
}
edge api -> warehouse "Events" {
kind event
}
edge analyst -> warehouse "Queries" {
kind request
}
}
76 changes: 76 additions & 0 deletions examples/07-azure-event-platform.stack
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
stack 1.0

diagram "Azure event platform" {
theme light

layout {
direction right
}

node customer "Customer" {
kind actor
}

group delivery "Delivery" {
node frontdoor "Front Door" {
kind service
icon "azure:front-door-and-cdn-profiles"
}

node app "App Service" {
kind service
icon "azure:app-service"
}
}

group processing "Event processing" {
node ingest "Ingest function" {
kind function
icon "azure:function-apps"
}

node bus "Service Bus" {
kind queue
icon "azure:azure-service-bus"
}

node worker "Background function" {
kind worker
icon "azure:function-apps"
}
}

group data "Data" {
node database "Cosmos DB" {
kind database
icon "azure:azure-cosmos-db"
}

node archive "Storage account" {
kind storage
icon "azure:storage-accounts"
}
}

edge customer -> frontdoor "HTTPS" {
kind request
}
edge frontdoor -> app "Route" {
kind request
}
edge app -> ingest "Submit" {
kind request
}
edge ingest -> bus "Work item" {
kind event
}
edge bus -> worker "Dispatch" {
kind event
}
edge worker -> database "Persist" {
kind data
}
edge worker -> archive "Archive" {
kind data
}
}
50 changes: 50 additions & 0 deletions examples/08-github-delivery.stack
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
stack 1.0

diagram "GitHub delivery workflow" {
theme dark

layout {
direction right
}

node developer "Developer" {
kind actor
}

group source "Source" {
node github "GitHub repository" {
kind service
icon "simple-icons:github"
}

node actions "GitHub Actions" {
kind worker
icon "simple-icons:githubactions"
}
}

group delivery "Delivery" {
node web "Vercel" {
kind external
icon "simple-icons:vercel"
}

node errors "Sentry" {
kind external
icon "simple-icons:sentry"
}
}

edge developer -> github "Push" {
kind data
}
edge github -> actions "Workflow" {
kind event
}
edge actions -> web "Deploy" {
kind dependency
}
edge web -> errors "Report errors" {
kind event
}
}
Loading