Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Mermaid and Structurizr DSL: Diagrams Inside Markdown, Model-Based C4 and Which One to Choose
Mermaid is the right tool for quick diagrams that render directly in GitHub and Azure DevOps Markdown, the Structurizr DSL for deriving consistent C4 views from a single model. This post converts the series' diagrams to Mermaid and shows its syntax traps with real output, draws the same container diagram with Structurizr and compares PlantUML, Mermaid and Structurizr.
ER Diagrams: Chen and Crow's Foot Notation, Cardinality, Optionality and from Class Diagram to Tables
An ER diagram shows which tables hold the data and the minimum and maximum number of records at both ends of every relationship: Chen suits concept conversations, Crow's Foot suits table and FK conversations. In this post we draw the leave module in both notations, show how composition, association classes and inheritance become tables with real EF Core output, and generate a Mermaid erDiagram straight from the EF Core model.
Sequence Diagrams 1: Lifelines, Message Types, Activation and the Journey of an API Request
A sequence diagram shows the messages between participants in one scenario in time order: lifelines side by side, time flowing down, synchronous calls with filled arrowheads and replies with dashed lines. The post draws the HR Portal's POST /leave-requests request from Angular to SQL Server from the real code and EF Core log, and gives it as Mermaid code too.
Class Diagrams 1: Classes, Attributes, Operations, Visibility, Multiplicity and Stereotypes
Every marker in a class diagram is a decision in code: [0..1] is a nullable type, [0..*] a collection, a slash a computed property, an underlined line a static member, and {readOnly} a field that never changes. The three compartments of a class box, attribute and operation syntax, the corners where visibility does not match C#, interfaces, enumerations, data types and stereotypes, and the same diagram in Mermaid.
Use Case Diagrams and Specifications: Actors, include, extend and the Cockburn Template
A use case diagram shows the system from outside: actors are roles, use cases are goals; the include arrow goes from the base to a mandatory step, the extend arrow from a conditional addition to the base. The HR Portal leave module's use case diagram, the Request Leave specification in Cockburn's fully dressed template, mapping use cases to user stories and API endpoints, and the same diagram in Mermaid.