Skip to content

Commit df6cb7a

Browse files
authored
docs: C4 architecture using mermaid (#31)
Using mermaid is more flexible as the previous diagram was a static image that couldn't be updated. --------- Signed-off-by: jrhender <[email protected]> Co-authored-by: jrhender <[email protected]>
1 parent 410f7b1 commit df6cb7a

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

apps/vc-api/README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,26 @@ See [tutorials](./docs/tutorials/).
1111

1212
## Architecture
1313

14-
The following is a [C4 Component diagram](https://c4model.com/#ComponentDiagram) of the VC-API app.
15-
The diagram was generated from the [EnergyWeb IcePanel](https://s.icepanel.io/gODPIqAQio/-/-/ogr9zwswt9s/CtO2okz0wV/204/200/1).
16-
17-
![vc-api c4 component diagram](./vc-api.c4component.png)
14+
The following is a [C4 Component diagram](https://c4model.com/#ComponentDiagram) of key functional modules of the VC-API implementation.
15+
16+
```mermaid
17+
C4Component
18+
Component(vc-api, "VC-API Module", "Nest.js Module", "VC API spec Holder, Issue and Verifier endpoints")
19+
Component(did, "DID Module", "Nest.js Module", "DID Generation, Storage/Retrieval")
20+
Component(key, "Key Module", "Nest.js Module", "Key Generation, Storage and Retrieval")
21+
22+
Rel(vc-api, did, "Get Verification Method for signing")
23+
Rel(vc-api, key, "Get Private Key for signing")
24+
Rel(did, db, "Read & Write DID Documents")
25+
Rel(key, db, "Read & Write keys")
26+
27+
ContainerDb(db, "DIDs, Keys", "Relational Database", "")
28+
UpdateLayoutConfig($c4ShapeInRow="2")
29+
UpdateRelStyle(vc-api, did, $offsetY="-20", $offsetX="-80")
30+
UpdateRelStyle(vc-api, key, $offsetX="-150")
31+
UpdateRelStyle(did, db, $offsetX="-165")
32+
UpdateRelStyle(key, db, $offsetY="10", $offsetX="-50")
33+
```
1834

1935
## Credential Exchanges
2036

apps/vc-api/vc-api.c4component.png

-214 KB
Binary file not shown.

0 commit comments

Comments
 (0)