Skip to content

Commit aa93b62

Browse files
docs: 🏗️ convert .puml C4 diagrams into Mermaid (#1023)
## Description Finally updated these files and removed the old `puml` files for the C4 models. <!-- Select quick/in-depth as necessary --> This PR needs an in-depth review. ## Checklist - [x] Updated documentation - [x] Ran `just run-all` --------- Co-authored-by: martonvago <57952344+martonvago@users.noreply.github.com>
1 parent 2895ebc commit aa93b62

13 files changed

+66
-275
lines changed

_quarto.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ website:
5555
- docs/design/architecture/requirements.qmd
5656
- docs/design/architecture/user-personas.qmd
5757
- docs/design/architecture/input-data.qmd
58+
- docs/design/architecture/c4-models.qmd
5859
- docs/design/architecture/naming.qmd
5960
- section: "Interface"
6061
href: docs/design/interface/index.qmd
Lines changed: 65 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,80 @@
11
---
22
title: "C4 Models"
3-
draft: true
43
---
54

65
This section contains the [C4 Models](https://c4model.com/) for Sprout.
76
The C4 Model is an established visualization approach to describe the
87
architecture of a software system. It breaks the system down into four
9-
levels of architectural abstraction: Context, Containers, Components, and Code. The
10-
last level is rarely used nor recommended for most software architecture
11-
since it is used to visualize a high degree of detail that most projects
12-
don't need. Below are the diagrams for the **Context**, **Containers**, and
13-
**Components** (the last of which includes three diagrams).
8+
levels of architectural abstraction: Context, Containers, Components,
9+
and Code. The last level is rarely used nor recommended for most
10+
software architecture since it is used to visualize a high degree of
11+
detail that most projects don't need. For our needs, we only needed to
12+
create the **Context** and **Containers** diagrams.
1413

15-
::: panel-tabset
16-
## Context
14+
These diagrams and their content draw from our overall Seedcase [design
15+
documentation](https://design.seedcase-project.org/) and [design
16+
decisions](https://decisions.seedcase-project.org/). See those websites
17+
for more information.
1718

18-
The Context diagram shows the users and any external
19-
systems that interact with Sprout. This includes the three user roles *data contributor*, *project admin* and *project owner* described in the [users](user-roles.qmd) post.
19+
## Context
2020

21-
![C4 Context diagram showing a very basic overview of Sprout and its
22-
intended users.](images/c4/context.svg)
21+
The Context diagram shows the users and any external systems that
22+
interact with Sprout. This includes the user roles described in the
23+
[User Personas](user-personas.qmd) page.
24+
25+
::: column-page
26+
```{mermaid}
27+
%%| fig-cap: "C4 Context diagram showing a very basic overview of Sprout and its anticipated users."
28+
flowchart LR
29+
user_owner(["Owner/creator<br>[person]<br><br>Creates and owns a project that generates data. Uses Sprout Core for more control."])
30+
user_admin(["Administrator<br>[person]<br><br>Manages data and metadata from a project for an owner. Uses Sprout Core for more control."])
31+
user_swe(["Software engineer<br>[person]<br><br>Creates and develops data infrastructure. Uses Sprout Core to build extensions and customizations."])
32+
user_de(["Data engineer<br>[person]<br><br>Develops data pipelines and infrastructures. Uses Sprout Core to build and customize the pipelines."])
33+
sprout["Seedcase Sprout<br>[system]<br><br>Allows users fine-grained control over building, managing, and structuring data in a way that makes it easier to share with collaborators and to analyze. Structures data following the Frictionless Data Package Standard."]
34+
output[("Filesystem (local or server)<br>[system]<br><br>Structured data from Sprout that is stored in a filesystem for later use. This can be on a server or on a local, personal computer, depending on the privacy of the data.")]
35+
36+
user_swe --> sprout:::system
37+
user_de --> sprout
38+
user_admin --> sprout
39+
user_owner --> sprout
40+
sprout --> output:::external
41+
42+
classDef system stroke-width:4pt
43+
classDef external fill:lightgrey
44+
```
45+
:::
2346

2447
## Container
2548

2649
The Container diagram shows the larger parts of the system, what they
27-
are responsible for, and how they interact with each other. It also shows
28-
the technology choices for each container.
29-
30-
![C4 Container diagram showing larger functional parts of Sprout and
31-
their connections.](images/c4/container.svg)
32-
33-
## Component
34-
35-
The Component model offers a more detailed view of the system into what
36-
the smaller parts are that make up an individual container and that
37-
allow it to fulfill its responsibilities. There are three diagrams for
38-
the components: the user interface, the (internal) management,
39-
and the databases and storage.
40-
41-
### User interface
42-
43-
This diagram shows the pages users interact with in the user interface container. In addition, it shows which user roles that can access them. Outside the container is the authentication container and the management container. The authentication container is needed to authenticate users and their access.
44-
45-
![C4 Component diagram showing the parts that make up the user interface
46-
containers.](images/c4/component-ui.svg)
47-
48-
### Management
49-
50-
This diagram shows the actions and behaviours that happen internally between the user interface and the database and storage. This includes things like creating databases, updating data and metadata, and modifying user roles.
51-
52-
![C4 Component diagram showing the parts that make up the management
53-
containers.](images/c4/component-management.svg)
54-
55-
### Databases and storage
56-
57-
This diagram shows the components that make up the database and storage container, and the types of actions and behaviours they have.
58-
59-
![C4 Component diagram showing the parts that make up the database and
60-
storage containers.](images/c4/component-backend.svg)
50+
are responsible for, and how they interact with each other. It also
51+
shows the technology choices for each container.
52+
53+
::: column-page
54+
```{mermaid}
55+
%%| fig-cap: "C4 Container diagram showing larger functional parts of Sprout and their connections."
56+
flowchart TB
57+
user(["User<br>[person]"])
58+
subgraph sprout [Sprout]
59+
package["Data package functions<br>[Python]<br><br>Create, manage, and check a data package and its 'properties' (metadata)."]
60+
resource["Data resource functions<br>[Python]<br><br>Create, manage, and check data resources and their 'properties' (metadata) in a data package."]
61+
obs_unit["Observational unit functions<br>[Python]<br><br>Manage and delete observational units in a resource. An observational unit is an entity with data collected at a specific time. Necessary for GDPR-compliance."]
62+
raw[("Raw data<br>[gzipped CSV]")]
63+
data[("Data<br>[Parquet]")]
64+
metadata[["Metadata ('properties')<br>[Frictionless Standard, JSON]"]]
65+
end
66+
output[("Filesystem<br><br>Stored data and metadata on a local or server filesystem.")]
67+
68+
user --> sprout:::system
69+
package --> resource
70+
package --> metadata
71+
resource --> raw
72+
resource --> data
73+
resource --> metadata
74+
obs_unit --> data
75+
sprout --> output:::external
76+
77+
classDef system fill:none
78+
classDef external fill:lightgrey
79+
```
6180
:::

docs/design/architecture/images/c4/component-backend.puml

Lines changed: 0 additions & 34 deletions
This file was deleted.

docs/design/architecture/images/c4/component-backend.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/design/architecture/images/c4/component-management.puml

Lines changed: 0 additions & 77 deletions
This file was deleted.

docs/design/architecture/images/c4/component-management.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/design/architecture/images/c4/component-ui.puml

Lines changed: 0 additions & 47 deletions
This file was deleted.

docs/design/architecture/images/c4/component-ui.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/design/architecture/images/c4/container.puml

Lines changed: 0 additions & 40 deletions
This file was deleted.

docs/design/architecture/images/c4/container.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)