-
Notifications
You must be signed in to change notification settings - Fork 2
/
draw-arch-diagram
35 lines (26 loc) · 1015 Bytes
/
draw-arch-diagram
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /usr/bin/env python3
from diagrams import Diagram, Cluster, Edge
from diagrams.generic.device import Tablet
from diagrams.aws.mobile import Amplify
from diagrams.aws.security import Cognito
from diagrams.aws.compute import Lambda
from diagrams.aws.database import Dynamodb
from diagrams.programming.framework import React
from diagrams.programming.language import Python
FILENAME="docs/assets/architecture"
with Diagram("Crisis Coach Assignment Tool", filename=FILENAME, show=False):
user = Tablet("Crisis staff")
with Cluster("GitHub"):
js = React("JS/React code")
python = Python("Server code")
with Cluster("Amazon Web Services"):
frontend = Amplify("Frontend app")
auth = Cognito("User auth")
backend = Lambda("Backend app")
db = Dynamodb("Coach DB")
user >> frontend
js >> frontend
python >> backend
frontend >> [auth, backend]
backend >> [auth, db]
print("Diagram written to ./{}.png".format(FILENAME))