10
Does anyone use C4 model for visualizing software architecture
(programming.dev)
A community for discussion amongst professional software developers.
Posts should be relevant to those well into their careers.
For those looking to break into the industry, are hustling for their first job, or have just started their career and are looking for advice, check out:
My main concern is this: We have a wiki, each component has some sort of a README. If we add C4 to the mix, then we will have technical documentation in 3 different places. I would love it if C4 would eliminate the need for a wiki. Then in a CI pipeline, we would fetch component READMEs from their repositories and merge all of them into a single C4. When a developer tries to understand a component, they would go to its diagram and view different aspects of it (some text, links to external API documentations, other sorts of diagrams, etc.).
I guess I need to start experimenting first to see if things work better than I expect. As you say, developers will not have huge problems once the workflow is in place.
I find keeping C4 diagrams in wikis often leads to them falling out of sync with the codebase. Ideally you'd keep the markup for the diagram in the relevant component repo and have a CI/CD process that keeps your diagrams up to date. I wrote a PlantUML Docker image for exactly that: https://github.com/robbell/plantuml-docker
Alternatively, Mermaid support is becoming more common—available in GitHub and Backstage TechDocs, and that allows you to embed diagrams in Markdown. Both PlantUML and Mermaid have support for linking to other diagrams I believe, and you could put your API definitions in your owning repos too using OpenAPI to keep everything together and in sync.