This section holds complete, realistic UML diagrams for everyday software work. Every page takes one scenario from an online shop or its delivery pipeline and draws it with one UML diagram type, then explains how to read it, shows a variant, weighs pros and cons, and gives the same diagram as Mermaid or PlantUML text.
UML (Unified Modeling Language, version 2.5) has two families of diagrams. Structure diagrams describe what a system is made of: classes, components and the machines they run on. Behaviour diagrams describe what it does: the goals users reach, the steps of a process, the lifecycle of one object and the messages exchanged in one request. Software teams use both, because a design is only clear once the parts and the way they interact are both on paper.
You rarely need all seven diagrams for one project. Pick the one that answers the question in front of you; the table below is a quick guide.
| Question | Diagram | Sample page |
|---|---|---|
| Who uses the system, and for what? | Use case | Online Shop Use Case Diagram |
| What are the core types and how do they relate? | Class | E-Commerce Class Diagram |
| Which parts exist and what do they depend on? | Component | Microservices Component Diagram |
| Where does it run and how is it connected? | Deployment | Web App Deployment Diagram |
| Who calls whom, in what order? | Sequence | Login Sequence Diagram |
| What states can one object be in? | State machine | Order State Machine |
| What are the steps, branches and hand-offs? | Activity | CI/CD Activity Diagram |
All samples describe the same imaginary shop, so you can read them as one design. The use case diagram sets the scope. The class diagram names the core types. The component and deployment diagrams show how the code is split into services and where those services run. The sequence, state machine and activity diagrams then zoom into behaviour: a login request, the life of one order, and the pipeline that ships every change.
Each diagram is hand-drawn SVG that follows standard UML notation. Colours are only emphasis: blue for normal elements, yellow for the highlighted element, green for success paths and red for error paths. UML itself is colour-free, so you can copy any of these into a whiteboard or a tool without losing meaning.
For the notation rules behind each diagram, see the UML diagram reference; each sample page links to its own reference page.