Home
Do you have an Architecture Diagram?
  v19.0 Posted at 11/09/2020 7:32 AM by Tiago Araujo

​​​​​​​A good architecture diagram (aka a cloud architecture diagram or system architecture diagram) gives a great overview of your project. An architecture diagram lets you see at a glance what the overall structure of the solution is. This is useful for gaining an understanding of how the system fits together, how it works, and what it does. It also helps to easily show which components can be improved due to updated or better components (or improved architectural guidelines).

 


​An architecture diagram is useful when:

  • ​You are onboarding a new developer
  • You have been deep into one aspect of the system and need a refresher on another area
  • You have been off the project for a while
  • Whenever you are discussing requirements that may require structural changes

The architecture diagram is a technical document that demonstrates the technology in use. The purpose of the architecture diagram is to show how a solution has been built and what the technical dependencies are. It is not used for user journeys or business logic.

image001.jpg
Figure: Bad Example - a screenshot of the resources used helps, but doesn't show data flows or dependencies


​Depending on the complexity of your solution and your comfort/familiarity with the tools, an architecture diagram could take you anywhere from half an hour to a couple of days.

Usually, the longer an architecture diagram takes you to make, the more important it is for your project.​
 - Matt Goldman


​An architecture diagram is part of the 7 crucial documents you need for your project, see our rule: Do you make awesome documentation?​

​​Tip 1: Include your most important co​​​mponents

At a minimum, your architecture diagram should include:

  • Your data repository
  • Your business logic component
  • Your UI
Your diagram needs to include the relationships between these components, and how they share and process data.

​​Tip 2: Don't use a .NET Dependency Graph as a System Architecture Diagram

​The .NET dependency diagram is a useful tool, but it drills down into a specific component of the solution (the code) while ignoring the rest of it (the infrastructure). If it adds value to your documentation (i.e., there is a specific reason to include it) you can include the .NET dependency diagram, but don't use it here in place of the architecture diagram.

​See SSW rule: Do you generate the VS Dependency Graph?​

dependency-validation-01.png
​Figure: Bad Example - the .NET dependency diagram shows code dependencies, but not the application's architecture

​​​Tip 3: Show data dependencies and data flows

Your architecture diagram should show how the components of your solution fit together. It should also show how the components of the architecture depend on each other for functionality, as well as upstream and downstream data dependencies.
architecture-diagram-good1.png
Figure: OK Example - Shows the technologies and data flows. Gives an overview of the whole application in one diagram.

​Tip 4: Put data at the top

​​It should be easy to tell at a glance which direction data flows in your diagram: left to right, right to left, top to bottom (recommended). Pick a direction for your data flow, and keep it consistent across all your documentation. Where there are exceptions (for example data going to analytics or to/from partner sources) make these perpendiculars to the primary data flow direction.

sugarlearning-architecture-diagram (1).png
​Figure: Good example - SugarLearning (an Angular + .NET project) - data flows from top to bottom, with exceptions (e.g. App Insights / Raygun, not part of the main data flow) perpendicular to the primary direction

Tip 5: Group relevant components

​Group components logically by enclosing them in a box. Components that operate independently can stand alone, and those that work together to deliver a logical function can be grouped together. This is also a good way to show components that are out of scope, i.e. important for understanding the architecture but not necessarily part of it, e.g. legacy components, partner components, or components that have not been implemented yet.

rewards-architecture-diagram (2).png
Figure: Good example - SSW Rewards - consistent styling is used, e.g. as well as all the icons and typography being consistent, you can see that data is a solid line and auth traffic is a dotted line

​​​Tip 6: Start with paper...

Make sure you use the right tools when creating your architecture diagrams. There's nothing wrong with starting out with pen and paper, but your hand-drawn sketch should not be considered your 'done' final architecture diagram.

IMG_9906.JPG
​​Figure: OK Example - SSW Rewards - start out with a hand-drawn sketch if that's easier for you, but don't consider this your final architecture diagram

TipMicrosoft Office Lens​ is a free mobile app that uses your smartphone camera to capture scan-like images of documents, photographs, business cards, and whiteboards (including searchable handwritten text).

IMG_9908.JPG
Figure: Better Example - SSW Rewards - the ​same sketch but captured with Office Lens


Tip 7: ...and Finish up with Diagrams.net

​The best tool for creating these diagrams is diagrams.net​ (previously draw.io). All the examples on this page were created with this tool.

TimePRO Architecture Diagram v2.png
Figure: Better Example - TimePro (an Angular + .NET project) - you can create diagrams quickly and easily with diagrams.net that still look very professional. This one is in the style of a technical document.


Diagrams.net is free, can be used in the browser, or can be downloaded as a desktop app. But the best way to use diagrams.net is to integrate it directly into VS Code.

thumbnail_image003.jpg
​Figure: Great Example - Auctions (a Blazor + .NET project) - diagrams.net integrated directly into VS Code

​​There are multiple extensions available that let you do this, the best one is Draw.io Integration. This makes it easy to create and edit system architecture diagrams right alongside your code, and check them in with the relevant commits.

architecture-2.png
​Figure: Good Example - Auctions (a Blazor + .NET project) - ​​system architecture diagram created within VS Code and checked into the repo in the same commit as the relevant code changes. Blazor UI layer encapsulated in thematic color

​Tip 8: Polish up Diagrams.net

Maintain standards to keep your diagrams consistent:

  • Diagram heading: Takes the format of Architecture Diagram - [product name], and is in font size 43pts
  • Use a standard font (e.g., at SSW we use Helvetica bold)
  • ​Arrowhead sizes: 14pts
  • Bottom left - add location (e.g. DevOps | Wiki or GitHub | Repo | Docs) in font size 22pts
  • Bottom right - add branding and URL in font size 22pts
  • ​Add ​color and icons to make your diagrams engaging and easier to distinguish
SSW.People-Architecture-Diagram.png
Figure: Good Example - SSW People (a Static Site - Gatsby and React) - you can just as easily create colorful, engaging diagrams suitable for all of your project stakeholders

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address:

    Comments: