Problem/Motivation
First, go and read the issue summary of #3454669: Record Architecture Decisions — to scale to many people + many timezones.
Excerpt from there:
We need, at least:
- product requirements broken down into concrete issues (a graph of issues, with concrete
Taskissues that can be implemented in a single MR) to work towards that first concrete goal (#3454094), ⚠️ knowing full well that these will be incomplete: we're first working towards that first concrete goal, then expanding scope- a record of decisions (and these decisions may need to be revisited too)
- a diagram tying the product requirements + decisions together
This issue is realize that third point.
3 days ago, I wrote in Drupal Slack:
- My thinking: that diagram should be as useful as https://www.drupal.org/docs/8/api/render-api/the-drupal-8-render-pipeline (also by yours truly 🤓)
- … but obviously not as definitive: it’ll have to evolve.
Steps to reproduce
N/A
Proposed resolution
Following that, @ctrlADel messaged me:
c4 diagrams https://c4model.com/ would be great. I don't find the render one particularly easy to digest but then again it's a complicated area. Happy to help make a pretty/cleaned up version of the diagram as well
… which led me down the path of first starting to build a C4 diagram in OmniGraffle — the same tool I used to create that render pipeline diagram years ago. But this made me realize that ideally the diagram could be edited by anyone, and ideally would be versioned.
So I searched and found … https://structurizr.com/ — which:
- is a DSL to define C4 diagrams, and can transform this to a wide variety of formats
- has a CLI tool to validate its DSL: https://docs.structurizr.com/cli
- has an open source version to view/edit diagrams: https://docs.structurizr.com/lite
- connects to ADRs! 🚀 https://docs.structurizr.com/dsl/adrs#architecture-decision-records-adrs
- appears to be easy to integrate with GitLab: https://docs.structurizr.com/cli/installation#gitlab
While maybe imperfect, this is clearly far better than multiple paying for an OmniGraffle license just to be able to edit a diagram, and neither versioned, nor diffable, nor exportable, etc.
So: let's try it.
Remaining tasks
- Get it working on GitLab CI at all: https://git.drupalcode.org/project/experience_builder/-/merge_requests/60
- Create a first draft of the diagram, after step 1 from the issue summary is done.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | Screenshot 2024-06-17 at 6.41.10 PM.png | 526.1 KB | wim leers |
Issue fork experience_builder-3454677
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
wim leers*.mdfiles being out of sync are caught: https://git.drupalcode.org/project/experience_builder/-/jobs/1864229⇒ https://git.drupalcode.org/project/experience_builder/-/merge_requests/60 is ready.
Going ahead and merging this so that I can hit the ground running on Monday 🚢
Comment #6
larowlanI wonder if we need the overhead of the DSL?
Gitlab supports mermaid and we can edit them direct on mermaid.live
Comment #8
wim leersFYI: initial diagram of the data model as currently partially implemented and the direction we’ve been going in: https://git.drupalcode.org/issue/experience_builder-3454677/-/blob/34546...
P.S.: that's a "direct" Mermaid diagram, which I think will please @larowlan 🤓
Comment #9
ctrladel@larowlan one of the benefits of using structurizr's DSL from is that it's really easy to generate and keep in sync smaller diagrams that are easier to digest and if you put the code in the previewer at https://structurizr.com/dsl it's really easy to zoom in/out on specific areas. I'm not particularly attached to structurizr but am a fan of the concepts behind c4 that encourage diagramming systems at multiple levels of detail so people can more easily onboard.
@wimleers I know these diagrams are early drafts but it looks like XB.dsl is missing Senior Developers as a person and Code Defined components that live alongside Config Defined components.
Comment #10
wim leers#9: Done.
Comment #11
wim leersThe current MR is a decent starting point for capturing both what already exists and what's being discussed in all other "early phase" issues, except for:
In general, the docs in MR61 are focused on the server-side part of XB. The client-side part of XB will follow later and depends on strong design direction existing there first. Finally: the server side is also where most of the Drupal community's interests & concerns lie, so getting that off the ground first should happen first.
Going ahead and merging to allow referencing the diagrams in the various issues.
Comment #13
wim leersFirst issue that builds on top of the two MRs merged here so far: #3455629-12: [PP-1] [META] 7. Content Templates — aka "default layouts" — affects the tree+props data model.
Comment #16
wim leersMerging @jessebaker's diagram of the current state of the React front end/client — it's subject to change just like everything else, but it'll help onboard new contributors — and keep existing contributors on the same page.
Now I just need to win the fight with GitLab to actually merge this MR — it's refusing to merge for mysterious reasons …
Comment #18
wim leersThe C4 diagram is still accurate.
Since then,
docs/diagrams/data-model.md)I think that's sufficient for us to be able to consider this :)
P.S.: #3455629: [PP-1] [META] 7. Content Templates — aka "default layouts" — affects the tree+props data model will start moving forward after DrupalCon!
Comment #20
wim leersSadly: #3556393: Accept the reality nobody looks at the C4 model diagrams: remove them.