|
1 | 1 | ---
|
2 | 2 | title: "C4 Models"
|
3 |
| -draft: true |
4 | 3 | ---
|
5 | 4 |
|
6 | 5 | This section contains the [C4 Models](https://c4model.com/) for Sprout.
|
7 | 6 | The C4 Model is an established visualization approach to describe the
|
8 | 7 | 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. |
14 | 13 |
|
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. |
17 | 18 |
|
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 |
20 | 20 |
|
21 |
| - |
| 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 | +::: |
23 | 46 |
|
24 | 47 | ## Container
|
25 | 48 |
|
26 | 49 | 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 |
| - |
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 |
| - |
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 |
| - |
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 |
| - |
| 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 | +``` |
61 | 80 | :::
|
0 commit comments