← browse the library
System block diagram preview
template

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.

idsystem-block-diagram
typetemplate
domainsystems
venueNSDI, OSDI, SOSP, SIGCOMM
requirestikz, arrows.meta, backgrounds, fit, positioning, shapes.geometric
licenseCC0-1.0
authorOpenTikZ contributors

systemarchitectureblock diagrammicroservicescomponentsdatabasecachedata flow

Download SVG
template.tex
\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

\rowsepvertical node distance between components default 1.1
\colsephorizontal node distance between components default 1.5
\boxminwminimum process/external box width default 1.9
\boxminhminimum box height default 1.0
\clientlabelexternal client label
\gatewaylabelgateway label (use \\ for two lines)
\svconelabelfirst service label
\svctwolabelsecond service label
\dblabeldatabase cylinder label
\cachelabelcache cylinder label
\grouplabelsubsystem 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 macro
  • add-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 subsystem
  • change-type — swap a node's style to change its role: process<->store<->external
  • add-connection — add \draw[link] (a) -- (b); use <-> for two-way, -|/|- for orthogonal routing
  • resize-subsystem — adjust the group inner sep (padding) or change which nodes are in its fit=(...) list
  • recolor — 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.