Skip to content

Commit 5752e03

Browse files
committed
Docs: add initial diagram
1 parent bfee2b3 commit 5752e03

2 files changed

Lines changed: 105 additions & 0 deletions

File tree

docs/ca-fe-reactive-framework-NextJs-FE-BE.svg

Lines changed: 3 additions & 0 deletions
Loading

docs/mermaid.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Frontend and Backend Clean Reactive Architecture
2+
3+
The frontend uses Clean Reactive Architecture and reaches the backend through
4+
its gateway. The backend follows the conventional Clean Architecture
5+
controller/use-case/presenter arrangement.
6+
7+
![Frontend and Backend Clean Reactive Architecture](ca-fe-reactive-framework-NextJs-FE-BE.svg)
8+
9+
<details>
10+
<summary>mermaid</summary>
11+
12+
```mermaid
13+
graph TD
14+
15+
subgraph FE["Frontend"]
16+
subgraph FB1["Boundary"]
17+
FUI["User Interface"]
18+
end
19+
20+
subgraph FB2["Boundary"]
21+
FPI["Presenter &lt; I &gt;"]
22+
FCI["Controller &lt; I &gt;"]
23+
end
24+
25+
FP["Presenter"]
26+
FC["Controller"]
27+
FUC["Use Case Interactor"]
28+
29+
subgraph FB3["Boundary"]
30+
FE1["Entities"]
31+
end
32+
33+
FGI["Gateway &lt; I &gt;"]
34+
end
35+
36+
subgraph FBI["Frontend–Backend Integration"]
37+
subgraph FB4["Boundary"]
38+
FG["Gateway"]
39+
end
40+
end
41+
42+
subgraph BE["Backend"]
43+
subgraph BB1["Boundary"]
44+
BC["Controller"]
45+
BP["Presenter"]
46+
BVM["View Model &lt; DS &gt;"]
47+
end
48+
49+
BID["Input Data &lt; DS &gt;"]
50+
BIB["Input Boundary &lt; I &gt;"]
51+
BOD["Output Data &lt; DS &gt;"]
52+
BOB["Output Boundary &lt; I &gt;"]
53+
BUC["Use Case Interactor"]
54+
55+
subgraph BB2["Boundary"]
56+
BDAI["Data Access Interface &lt; I &gt;"]
57+
BDA["Data Access"]
58+
BDB["Database"]
59+
end
60+
61+
subgraph BB3["Boundary"]
62+
BE1["Entities"]
63+
end
64+
end
65+
66+
%% implementation relations
67+
FP -. implements .-> FPI
68+
FC -. implements .-> FCI
69+
FG -. implements .-> FGI
70+
BP -. implements .-> BOB
71+
BUC -. implements .-> BIB
72+
BDA -. implements .-> BDAI
73+
74+
%% frontend dependency relations
75+
FUI -- depends --> FPI
76+
FUI -- depends --> FCI
77+
FC -- depends --> FUC
78+
FP -- depends --> FE1
79+
FUC -- depends --> FE1
80+
FUC -- depends --> FGI
81+
82+
%% frontend-to-backend dependency relation
83+
FG -- depends --> BC
84+
85+
%% backend dependency relations
86+
BC -- depends --> BIB
87+
BC -- depends --> BID
88+
BP -- depends --> BVM
89+
BP -- depends --> BOD
90+
BUC -- depends --> BID
91+
BUC -- depends --> BOB
92+
BUC -- depends --> BOD
93+
BUC -- depends --> BDAI
94+
BUC -- depends --> BE1
95+
BDAI -- depends --> BE1
96+
BDA -- depends --> BDB
97+
98+
classDef boundary fill:none,stroke:#666,stroke-width:2px,stroke-dasharray: 5 5;
99+
class FB1,FB2,FB3,FB4,BB1,BB2,BB3 boundary;
100+
```
101+
102+
</details>

0 commit comments

Comments
 (0)