- Specify as much detail as possible for your architecture, for example:
Design a simple solution architecture for a contact entry page which:
Requires no authentication to access
Collects and stores the name, phone number, address and email address of the contact
Uses ReactJS for the front end
API Gateway and Lambda in C# dotnet 6 for the backend
Stores collected data in Dynamo DB
Serves the SPA from S3 through CloudFront with DNS by Route53
A VPC if necessary
The web front end
DNS
HTTPS/SSL/TLS where necessary
Public and Private networking elements
- Open ChatGPT
- Enter the architecture specification above
- Tell ChatGPT to generate the python script:
Create a high level simple diagram for this architecture based on the Diagrams Python package
- Copy the script it generates
Reference: https://phoenixnap.com/kb/how-to-install-python-3-windows
- Open PowerShell
- (Optional) Check your python version:
python --version
- Download the latest version of python: https://www.python.org/downloads/windows/
- Run the installer
- During installation ensure python is added to the PATH variable
- Close PowerShell
- Open a new PowerShell window
- Check your pip version:
pip -V
Reference: https://graphviz.org/download/#windows
- Download GraphiViz: https://graphviz.org/download/#windows
- Install
- Open a new PowerShell window
- Check the GraphViz version by entering:
dot -V
- Open a new PowerShell window
- Create and navigate into a new folder
- Enter
pip install diagrams
- Enter
pip install notebook
- In a text editor, create a file named
architecture.py
and save it to your solution folder - Paste in the script from ChatGPT
- For each line containing
from … import …
visit the Diagrams docs - Search for the name following the
import
and check the path documented for it - You may need to visit multiple sections from the Nodes section in the left nav
- When you find the name listed, copy the path, trim the name and update the
import
path - Eg:
ChatGPT may generate this line
from diagrams.aws.integration import APIGateway
Replace it withfrom diagrams.aws.network import APIGateway
- Eg:
ChatGPT may generate this line
from diagrams.onprem.client import User, Custom
Replace it with: from diagrams.onprem.client import User from diagrams.custom import Custom - Save the .py script
- Ensure the line containing
with Diagram("
containsshow=True
- Save the .py script
- Open a PowerShell window
- Navigate to the solution folder
- Enter
python .\architecture.py
- You diagram should open in Windows image viewer
- Open a new PowerShell window
- Navigate to the solution folder
- Enter
jupyter notebook
- In the Jupyter browser which opens, select New > Python 3
- In the first cell enter
!pip install --upgrade --user pip
- Press the play button OR Type SHIFT + RETURN
- In the second cell enter
!pip install --upgrade --user diagrams
- Press the play button OR Type SHIFT + RETURN
- In the third cell enter the script copied from ChatGPT earlier
- Press the play button OR type SHIFT + RETURN
- You should see the diagram open up in the Windows image viewer
- The diagram will also be visible in the first Jupyter Notebook browser tab containing the file list
- It will also be visible in the Windows Explorer view of the solution folder
- https://youtu.be/b-1OeDJUCTU?si=VABPq0sc2U4kUShH
- https://phoenixnap.com/kb/how-to-install-python-3-windows
- https://www.python.org/downloads/windows/
- https://docs.python.org/3.6/using/windows.html#installing-without-ui
- https://www.geeksforgeeks.org/how-to-update-python-on-windows/
- https://graphviz.org/download/#windows
- https://diagrams.mingrammer.com/docs/getting-started/installation
- https://diagrams.mingrammer.com/docs/nodes/aws