{"id":38876420,"url":"https://github.com/anddd7/diagrams-patterns","last_synced_at":"2026-01-17T14:36:35.168Z","repository":{"id":212793623,"uuid":"732312800","full_name":"Anddd7/diagrams-patterns","owner":"Anddd7","description":":art: Cloud architecture patterns with Diagrams","archived":false,"fork":false,"pushed_at":"2024-01-12T08:26:28.000Z","size":62,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-11T20:54:57.764Z","etag":null,"topics":["architecture","aws","cloud","diagrams-as-code","patterns","tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anddd7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-16T08:59:21.000Z","updated_at":"2024-08-31T01:57:39.000Z","dependencies_parsed_at":"2023-12-25T08:30:35.457Z","dependency_job_id":"8e140949-3161-4bf7-975c-22eb5ee96208","html_url":"https://github.com/Anddd7/diagrams-patterns","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":"0.16666666666666663","last_synced_commit":"1a7617c06dbafb24e4d6c805dba3f5629edbb7a4"},"previous_names":["anddd7/diagrams-patterns"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Anddd7/diagrams-patterns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anddd7%2Fdiagrams-patterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anddd7%2Fdiagrams-patterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anddd7%2Fdiagrams-patterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anddd7%2Fdiagrams-patterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anddd7","download_url":"https://codeload.github.com/Anddd7/diagrams-patterns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anddd7%2Fdiagrams-patterns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28510067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture","aws","cloud","diagrams-as-code","patterns","tool"],"created_at":"2026-01-17T14:36:34.595Z","updated_at":"2026-01-17T14:36:35.163Z","avatar_url":"https://github.com/Anddd7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# diagrams-patterns\n\n- diagrams should only used for managing the basic shapes of the cloud components\n- but there are standard patterns usually used in cloud architecture, we don't need to draw them from scratch\n- e.g. VPC with public/private subnets, NAT gateway, etc.\n\n**diagrams-patterns** is a collection of patterns for diagrams that can be reused in different projects.\n\n## Features\n\n- [x] aws vpc, subnets with styles\n  - ![](https://private-user-images.githubusercontent.com/24785373/292077524-68bde01c-b101-4ab7-a9db-8b5ac6c3cb61.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDMxMjkzNjEsIm5iZiI6MTcwMzEyOTA2MSwicGF0aCI6Ii8yNDc4NTM3My8yOTIwNzc1MjQtNjhiZGUwMWMtYjEwMS00YWI3LWE5ZGItOGI1YWM2YzNjYjYxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFJV05KWUFYNENTVkVINTNBJTJGMjAyMzEyMjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjMxMjIxVDAzMjQyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI2YjlkYjM0MzRkNzY3MjU1MzIwOTliMmU4Y2QzMmIxOTFhMmMxMjAxZDYwNmQ0YzYyOWI0NzQxMGM1OGRiNmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.k3YkUp2gxXvEhL6dMaS5sz4RFtZ9tuI3vh0gFrlgpxw)\n- [x] aws overlapping az on subnets\n  - calculate the position based on the number of az and subnets\n  - store and reuse the calculated position\n  - ![](https://private-user-images.githubusercontent.com/24785373/292077616-04455e5d-a444-4ed8-b837-2a0c711c5d74.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDMxMjk0MDMsIm5iZiI6MTcwMzEyOTEwMywicGF0aCI6Ii8yNDc4NTM3My8yOTIwNzc2MTYtMDQ0NTVlNWQtYTQ0NC00ZWQ4LWI4MzctMmEwYzcxMWM1ZDc0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFJV05KWUFYNENTVkVINTNBJTJGMjAyMzEyMjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjMxMjIxVDAzMjUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAyNmYzZjJjYmQ0NDYwYTFkOTg4ZmRlMTY3MWFlMDllODY3MWM5YjQ2ODllOWZiOWYxZTlkZmM2YzY2NzBkN2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.QoiVrT-Y9UngX9OPBfM5SD0u-IuVsAJfs6g0yD_EDFw)\n- [x] aws grid subnets with az\n  - ~~use 'anchor', a hidden node, to align the subnets~~\n  - not really work\n  - ![](https://private-user-images.githubusercontent.com/24785373/292077595-a2d0564e-f7db-4816-9003-b8b3c627e9ff.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDMxMjkzODksIm5iZiI6MTcwMzEyOTA4OSwicGF0aCI6Ii8yNDc4NTM3My8yOTIwNzc1OTUtYTJkMDU2NGUtZjdkYi00ODE2LTkwMDMtYjhiM2M2MjdlOWZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFJV05KWUFYNENTVkVINTNBJTJGMjAyMzEyMjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjMxMjIxVDAzMjQ0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIzN2U3ZDc5OTI3NDdiOWUwNzY5YzFhZWU5YmNhODI2YmE3NDgwZTk2MzE2Y2FkZDFhMzMyNGE4ZjdkYWZmYjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.BcL7kEkFjaMCPzuQndODjc2QuEOjjPKKenFxJZqWsj0)\n- [ ] dsl investigate\n  - dsl 2 py 2 diagrams (refer to d2)\n\n## Roadmap\n\nCurrently, the **diagrams-patterns** and diagrams-exporters are built as 'diagrams'-extensions. But since the diagrams is inactive, introducing new tools is a necessary step, e.g. d2.\n\nAt that time, the **diagrams-patterns** should be a standalone tool, which provide a standard DSL to describe the common patterns in cloud architecture (or other kinds of diagrams). Then, you can translate the DSL to different tools, e.g. diagrams, d2, etc.\n\nThe **diagrams-exporters** plays another role to facilitate with productive tools, e.g. terraform, aws cli, etc. It read the metadata, convert to DSL, then generate the diagrams.\n\nA possible structure is:\n\n```mermaid\nflowchart BT\n  subgraph diagram-exporters\n    terraform-exporter\n    awscli-exporter\n    kubectl-exporter\n  end\n\n  subgraph diagrams-patterns\n    subgraph common-patterns\n      c4-pattern\n      layer-arch-pattern    \n    end\n\n    subgraph cloud-patterns\n      aws-pattern\n      azure-pattern\n    end\n\n    subgraph dsl\n      dsl-parser\n\n      dsl-to-diagrams\n      dsl-to-d2\n      dsl-to-mermaid\n    end\n  end\n\n  diagrams-patterns --\u003e diagram-exporters\n  diagrams --\u003e diagrams-patterns\n  d2 --\u003e diagrams-patterns\n  plantuml --\u003e diagrams-patterns\n  \n  graphviz --\u003e diagrams\n  graphviz --\u003e d2\n\n  plantuml\n```\n\n## Reference\n\n- graphviz \u0026 dot\n  - \u003chttps://github.com/pydot/pydot\u003e\n\n- d2\n  - \u003chttps://github.com/terrastruct/d2\u003e\n  - \u003chttps://github.com/MrBlenny/py-d2\u003e\n\n- read tfstate and generate graph\n  - \u003chttps://github.com/cycloidio/inframap\u003e\n  - \u003chttps://github.com/28mm/blast-radius\u003e\n\n- read aws cli and generate graph\n  - \u003chttps://github.com/Cloud-Architects/cloudiscovery\u003e\n\n- other terraform interesting tools\n  - \u003chttps://github.com/cycloidio/terracost\u003e\n  - \u003chttps://pypi.org/project/python-hcl2/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanddd7%2Fdiagrams-patterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanddd7%2Fdiagrams-patterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanddd7%2Fdiagrams-patterns/lists"}