{"id":15324951,"url":"https://github.com/bruce-mig/diagram-as-code","last_synced_at":"2025-06-30T22:06:16.923Z","repository":{"id":225083072,"uuid":"765015177","full_name":"bruce-mig/diagram-as-code","owner":"bruce-mig","description":"System Design diagrams for various projects for my GitHub account, created using the diagram as code paradigm","archived":false,"fork":false,"pushed_at":"2024-10-04T10:07:55.000Z","size":2759,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T21:51:54.229Z","etag":null,"topics":["diagram-as-code"],"latest_commit_sha":null,"homepage":"https://github.com/bruce-mig","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bruce-mig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-29T05:53:30.000Z","updated_at":"2024-10-04T10:07:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"4749f24f-014a-4933-8bf8-822ae6580826","html_url":"https://github.com/bruce-mig/diagram-as-code","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"3d441b8b7b307ab9702055108ac55a306af93844"},"previous_names":["bruce-mig/diagram-as-code"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bruce-mig/diagram-as-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fdiagram-as-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fdiagram-as-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fdiagram-as-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fdiagram-as-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bruce-mig","download_url":"https://codeload.github.com/bruce-mig/diagram-as-code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fdiagram-as-code/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262857266,"owners_count":23375491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["diagram-as-code"],"created_at":"2024-10-01T09:28:52.865Z","updated_at":"2025-06-30T22:06:16.866Z","avatar_url":"https://github.com/bruce-mig.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Diagram as Code (DaC)\n\nThis repo contains system design diagrams for various projects for [my GitHub account](https://github.com/bruce-mig), created using the diagram as code paradigm. Diagram as code is a way of drawing diagrams using code, which makes them easier to maintain, version control, and collaborate on. \n\n## How it works\n\nThe diagrams in this repo are created using the [Diagrams](https://diagrams.mingrammer.com/) Python library, which supports various providers, languages, and frameworks. \n\nTo generate a diagram, you need to write a Python script that defines the nodes and edges of your system, using the Diagrams API. Then, you can run the script and it will produce a PNG image of your diagram. \n\nFor example, here is a script that draws a simple web service architecture:\n\n```python\nfrom diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import ECS\nfrom diagrams.aws.database import ElastiCache, RDS\nfrom diagrams.aws.network import ELB\nfrom diagrams.aws.network import Route53\n\nwith Diagram(\"Clustered Web Services\", show=False):\n    dns = Route53(\"dns\")\n    lb = ELB(\"lb\")\n\n    with Cluster(\"Services\"):\n        svc_group = [ECS(\"web1\"),\n                     ECS(\"web2\"),\n                     ECS(\"web3\")]\n\n    with Cluster(\"DB Cluster\"):\n        db_primary = RDS(\"userdb\")\n        db_primary - [RDS(\"userdb ro\")]\n\n    memcached = ElastiCache(\"memcached\")\n\n    dns \u003e\u003e lb \u003e\u003e svc_group\n    svc_group \u003e\u003e db_primary\n    svc_group \u003e\u003e memcached\n\n```\n\nAnd here is the output image:\n\n![Web Service](examples/clustered_web_services.png)\n\n## How to use this repo\n\nYou can browse the existing diagrams in this repo, or create your own ones. To create a new diagram, follow these steps:\n\n- Install Python 3.6 or higher and the Diagrams library. For more information, see the [Diagrams installation guide](https://diagrams.mingrammer.com/docs/getting-started/installation).\n- Create a new Python file in the `diagrams` folder, with a descriptive name. For example, `invoicing_system.py`.\n- Write your diagram code using the Diagrams API. You can use the [Diagrams documentation](https://diagrams.mingrammer.com/docs/guides/diagram) and the [examples](https://diagrams.mingrammer.com/docs/nodes/aws) for reference.\n- Run your script to generate the image file. It will be saved in the same folder as your script, with the same name but with a `.png` extension. For example, `invoicing_system.png`.\n- Add your script and image file to the repo, and commit your changes. Optionally, you can also update the `README.md` file to include a description and a preview of your diagram.\n\n\u003c!-- ## Contributing\n\nIf you want to contribute to this repo, please follow the [contribution guidelines](docs/CONTRIBUTING.md).\n\n## License\n\nThis repo is licensed under the [MIT License](LICENSE). --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruce-mig%2Fdiagram-as-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbruce-mig%2Fdiagram-as-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruce-mig%2Fdiagram-as-code/lists"}