# Boxes and arrows

> Three components and the calls between them: the everyday architecture sketch. A Software diagrams example with its LaTeX source.

A Software diagrams example in the TeXeR TikZ library: https://texer.org/library/software-diagrams/architecture-boxes

Package: [Software diagrams](https://texer.org/library/software-diagrams.md), on CTAN at https://ctan.org/pkg/pgf.

Tags: architecture, components, boxes and arrows

## Source

```latex
\usetikzlibrary{arrows.meta, positioning}

\begin{tikzpicture}[
  node distance=8mm and 16mm,
  box/.style={draw, rounded corners, minimum width=24mm, minimum height=10mm},
  every edge/.style={draw, -{Stealth}},
]
  \node[box] (client) {Client};
  \node[box, right=of client] (api) {API};
  \node[box, right=of api] (db) {Database};

  \path (client) edge node[above] {HTTP} (api)
  (api) edge node[above] {SQL} (db);
\end{tikzpicture}
```

## As a complete document

The same example in a document that compiles on its own with pdfLaTeX:

```latex
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{amssymb}
\usetikzlibrary{arrows.meta, positioning}

\begin{document}

\begin{tikzpicture}[
  node distance=8mm and 16mm,
  box/.style={draw, rounded corners, minimum width=24mm, minimum height=10mm},
  every edge/.style={draw, -{Stealth}},
]
  \node[box] (client) {Client};
  \node[box, right=of client] (api) {API};
  \node[box, right=of api] (db) {Database};

  \path (client) edge node[above] {HTTP} (api)
  (api) edge node[above] {SQL} (db);
\end{tikzpicture}
\end{document}
```
