Skip to content

Commit 4e92c4f

Browse files
Hjafpomfrida
andauthored
docs: add C4 architecture diagrams to enhance documentation (#4867)
Co-authored-by: Hjalmar Otto Fjøsne <50009020+Hjaf@users.noreply.github.com> Co-authored-by: Frida Erdal <31915755+pomfrida@users.noreply.github.com>
1 parent 65adeba commit 4e92c4f

1 file changed

Lines changed: 45 additions & 2 deletions

File tree

README.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,57 @@ packages/ # Published npm packages
3232
eds-tailwind/ # Tailwind CSS plugin
3333
```
3434

35+
## Architecture
36+
37+
### System Context
38+
39+
EDS serves three personas and delivers through four channels: Figma assets for designers, npm packages for developers, a documentation hub for both, and a CDN that provides fonts and CSS to all Equinor web applications utilizing EDS. The system is built as a monorepo with CI/CD pipelines that automate testing, building and publishing to npm and the CDN.
40+
41+
```mermaid
42+
C4Context
43+
title System Context diagram for Equinor Design System
44+
45+
Person(designer, "Designer", "Creates and maintains UI designs following the Equinor design language")
46+
Person(developer, "Developer", "Builds web applications using EDS components and tokens")
47+
Person(enduser, "End User", "Uses Equinor web applications built with EDS")
48+
49+
System_Ext(figma, "Figma", "Source of truth for design tokens, components and assets")
50+
System(eds, "Equinor Design System", "Documentation hub, GitHub monorepo and CI/CD pipelines delivering reusable UI components, design tokens, icons and typography")
51+
System_Ext(app, "Equinor Web Applications", "Internal web apps built with EDS")
52+
53+
System_Ext(npm, "npm Registry", "Distributes EDS packages: eds-core-react, eds-tokens, eds-icons, etc.")
54+
System_Ext(cdn, "CDN", "Serves font files, icons and logo for Equinor web applications")
55+
56+
Rel(designer, eds, "Uses design assets and documentation")
57+
Rel(developer, eds, "Uses documentation and developer tools")
58+
Rel(designer, figma, "Uses EDS components in", "Figma")
59+
60+
BiRel(eds, figma, "Syncs assets and tokens with")
61+
Rel(eds, npm, "Publishes packages to")
62+
Rel(eds, cdn, "Publishes fonts and static assets to")
63+
64+
Rel(developer, npm, "Installs EDS packages from")
65+
Rel(developer, app, "Builds")
66+
Rel(enduser, app, "Uses")
67+
Rel(app, cdn, "Loads fonts from", "HTTPS")
68+
69+
UpdateRelStyle(app, cdn, $offsetX="250", $offsetY="0")
70+
UpdateRelStyle(eds, figma, $offsetX="0", $offsetY="30")
71+
UpdateRelStyle(developer, npm, $offsetX="0", $offsetY="-60")
72+
UpdateRelStyle(designer, eds, $offsetX="-150", $offsetY="0")
73+
UpdateRelStyle(developer, eds, $offsetX="-80", $offsetY="-30")
74+
UpdateRelStyle(eds, cdn, $offsetX="-100", $offsetY="0")
75+
76+
UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="2")
77+
```
78+
3579
## Table of contents
3680

3781
- [Equinor Design System](#equinor-design-system)
3882
- [Quick links](#quick-links)
3983
- [Table of contents](#table-of-contents)
4084
- [Repository structure](#repository-structure)
85+
- [Architecture](#architecture)
4186
- [Status](#status)
4287
- [Applications](#applications)
4388
- [Prerequisites](#prerequisites)
@@ -80,8 +125,6 @@ packages/ # Published npm packages
80125

81126
## Status
82127

83-
84-
85128
| Package | Status | Version |
86129
|--|--|--|
87130
| [Core React](https://github.com/equinor/design-system/tree/main/packages/eds-core-react) | [![Checks](https://github.com/equinor/design-system/actions/workflows/checks.yaml/badge.svg)](https://github.com/equinor/design-system/actions/workflows/checks.yaml) | [![Version](https://img.shields.io/npm/v/@equinor/eds-core-react)](https://www.npmjs.com/package/@equinor/eds-core-react) |

0 commit comments

Comments
 (0)