System block diagram
General system architecture diagram: external client, process boxes (gateway/services), datastore cylinders (database/cache), branching connections, and a dashed subsystem group box. Multiple component types, parametric spacing.
This template ships an edit contract (in its meta.json) that the repo-wide using-opentikz skill reads to edit it reliably — the parameters and safe operations are listed below.
| id | system-block-diagram |
|---|---|
| type | template |
| domain | systems |
| venue | NSDI, OSDI, SOSP, SIGCOMM |
| requires | tikz, arrows.meta, backgrounds, fit, positioning, shapes.geometric |
| license | CC0-1.0 |
| author | OpenTikZ contributors |
\documentclass[border=8pt]{standalone}
% --- packages (mirror these in template.meta.json "requires") ---
\usepackage{tikz}
\usetikzlibrary{positioning, arrows.meta, shapes.geometric, fit, backgrounds}
% --- palette (canonical source: reference/color-palettes/color-palettes.md; light variant) ---
\definecolor{otblue}{HTML}{0072B2}
\definecolor{otorange}{HTML}{E69F00}
\definecolor{otteal}{HTML}{009E73}
\definecolor{otpurple}{HTML}{CC79A7}
\definecolor{otgray}{HTML}{5A5A5A}
\begin{document}
% ==== parameters (edit these) ============================================
\def\rowsep{1.1} % vertical gap between rows (cm)
\def\colsep{1.5} % horizontal gap between columns (cm)
\def\boxminw{1.9} % minimum process/external box width (cm)
\def\boxminh{1.0} % minimum box height (cm)
% labels
\def\clientlabel{Client}
\def\gatewaylabel{API\\Gateway}
\def\svconelabel{Service A}
\def\svctwolabel{Service B}
\def\dblabel{Database}
\def\cachelabel{Cache}
\def\grouplabel{Backend}
% =========================================================================
\begin{tikzpicture}[
node distance=\rowsep cm and \colsep cm,
>={Stealth[length=2.4mm]},
comp/.style={
rounded corners=3pt, line width=0.7pt, align=center,
minimum width=\boxminw cm, minimum height=\boxminh cm, font=\sffamily\small,
},
external/.style={comp, draw=otgray!60, fill=otgray!10, dashed},
process/.style={comp, draw=otblue!70!black, fill=otblue!16},
store/.style={
shape=cylinder, shape border rotate=90, aspect=0.25,
draw=otteal!70!black, fill=otteal!16, line width=0.7pt,
minimum width=1.7cm, minimum height=1.0cm, align=center,
font=\sffamily\small, inner sep=2pt,
},
cachestore/.style={store, draw=otorange!80!black, fill=otorange!22},
link/.style={draw=otgray!75, line width=0.9pt, ->},
group/.style={
draw=otgray!55, dashed, rounded corners=6pt, line width=0.8pt,
inner sep=11pt, fill=otgray!4,
},
]
% --- components (left to right; services stacked) ---
\node[external] (client) {\clientlabel};
\node[process, right=of client] (gateway) {\gatewaylabel};
\node[process, above right=of gateway] (svc1) {\svconelabel};
\node[process, below right=of gateway] (svc2) {\svctwolabel};
\node[store, right=of svc1] (db) {\dblabel};
\node[cachestore, right=of svc2] (cache) {\cachelabel};
% --- connections ---
\draw[link] (client) -- (gateway);
\draw[link] (gateway) -- (svc1);
\draw[link] (gateway) -- (svc2);
\draw[link] (svc1) -- (db);
\draw[link] (svc2) -- (cache);
% --- subsystem boundary drawn behind the components ---
\begin{scope}[on background layer]
\node[group, fit=(svc1)(svc2)(db)(cache)] (backend) {};
\node[font=\sffamily\footnotesize, text=otgray, anchor=north west]
at ([xshift=4pt, yshift=-3pt]backend.north west) {\grouplabel};
\end{scope}
\end{tikzpicture}
\end{document}
Edit contract — how the AI edits this template
using-opentikz skill →Parameters & safe edit operations
Parameters
\rowsep | vertical node distance between components default 1.1 |
\colsep | horizontal node distance between components default 1.5 |
\boxminw | minimum process/external box width default 1.9 |
\boxminh | minimum box height default 1.0 |
\clientlabel | external client label |
\gatewaylabel | gateway label (use \\ for two lines) |
\svconelabel | first service label |
\svctwolabel | second service label |
\dblabel | database cylinder label |
\cachelabel | cache cylinder label |
\grouplabel | subsystem group box label |
Node naming
fixed semantic node names: (client) (gateway) (svc1) (svc2) (db) (cache) (backend); give new components clear role-based names
Operations
rename-component— edit the matching label macroadd-component— declare a node with its role style, positioned relative to an existing node, then connect with link; add it to the group fit list if it belongs to the subsystemchange-type— swap a node's style to change its role: process<->store<->externaladd-connection— add \draw[link] (a) -- (b); use <-> for two-way, -|/|- for orthogonal routingresize-subsystem— adjust the group inner sep (padding) or change which nodes are in its fit=(...) listrecolor— change the palette name in the relevant style; keep distinct roles in distinct colors; never a hex/stock color
Use it
The file compiles on its own (\documentclass{standalone}).
Drop it into your project and \input it, or copy the
tikzpicture into your figure. Colours come from the shared
palette defined in the preamble — edit those named colours, not raw hex.
Graphic content is CC0 1.0 (public domain) — reuse freely, no attribution required.