forked from Won-Games/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflow.drawio
229 lines (229 loc) · 19.4 KB
/
flow.drawio
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<mxfile host="65bd71144e" modified="2021-02-23T16:20:54.132Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.53.2 Chrome/87.0.4280.141 Electron/11.2.1 Safari/537.36" etag="vq2WkmM13tZCQPFxR6BW" version="14.2.4" type="embed" pages="2">
<diagram id="C3-uCIAyBGLOOk2Yy4p0" name="NextJS fluxos">
<mxGraphModel dx="994" dy="1804" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="117" value="" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="30" y="-150" width="430" height="280" as="geometry"/>
</mxCell>
<mxCell id="101" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="470" y="-650" width="400" height="330" as="geometry"/>
</mxCell>
<mxCell id="49" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="4" target="6" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="4" value="GetStaticPaths" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="35" y="-970" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="6" value="GetStaticProps" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="275" y="-970" width="120" height="60" as="geometry"/>
</mxCell>
<UserObject label="Gera as urls<br><br>/game/diablo<br>/game/warcraft" placeholders="1" name="Variable" id="8">
<mxCell style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;" parent="1" vertex="1">
<mxGeometry x="10" y="-920" width="170" height="100" as="geometry"/>
</mxCell>
</UserObject>
<UserObject label="Gera as páginas estáticas<br><br>/game/diablo/index.html<br>/game/warcraft/index.html<br>" placeholders="1" name="Variable" id="9">
<mxCell style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;" parent="1" vertex="1">
<mxGeometry x="250" y="-920" width="170" height="100" as="geometry"/>
</mxCell>
</UserObject>
<mxCell id="11" value="" style="endArrow=none;html=1;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="30" y="-790" as="sourcePoint"/>
<mxPoint x="840" y="-790" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="47" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="12" target="15" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="12" value="Usuário entra na página /game/diablo" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="30" y="-680" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="15" value="Recebe conteúdo estático (happy path)" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="270" y="-680" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="46" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="16" target="18" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="16" value="Usuário entra na página /game/foo" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="30" y="-570" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="43" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="18" target="27" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="44" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="18" target="24" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="18" value="Estático não existe" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="270" y="-570" width="120" height="60" as="geometry"/>
</mxCell>
<UserObject label="Não tem fallback" placeholders="1" name="Variable" id="23">
<mxCell style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;" parent="1" vertex="1">
<mxGeometry x="210" y="-490" width="100" height="50" as="geometry"/>
</mxCell>
</UserObject>
<mxCell id="24" value="Retorna 404" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="270" y="-420" width="120" height="60" as="geometry"/>
</mxCell>
<UserObject label="Tem fallback" placeholders="1" name="Variable" id="26">
<mxCell style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;" parent="1" vertex="1">
<mxGeometry x="390" y="-560" width="90" height="20" as="geometry"/>
</mxCell>
</UserObject>
<mxCell id="39" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="27" target="29" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="41" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="27" target="32" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="27" value="Busca o dado no banco e mostra a página em espera" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="490" y="-570" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="40" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="29" target="24" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<UserObject label="Não existe dado" placeholders="1" name="Variable" id="29">
<mxCell style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;" parent="1" vertex="1">
<mxGeometry x="490" y="-450" width="100" height="50" as="geometry"/>
</mxCell>
</UserObject>
<mxCell id="45" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="32" target="35" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="32" value="Gera estático" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="720" y="-570" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="35" value="Retorna a página" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="720" y="-420" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="42" value="Existe dado" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="630" y="-570" width="80" height="20" as="geometry"/>
</mxCell>
<mxCell id="50" value="<h1>Funcionamento SSG = Estático</h1>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="40" y="-1070" width="370" height="50" as="geometry"/>
</mxCell>
<mxCell id="102" value="Revalidate serve para <br>repetir esse processo em N segundos<br>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="580" y="-690" width="220" height="30" as="geometry"/>
</mxCell>
<mxCell id="103" value="yarn build" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="470" y="-950" width="70" height="20" as="geometry"/>
</mxCell>
<mxCell id="104" value="ISR" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="670" y="-710" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="107" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="105" target="106" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="105" value="Usuário 1 entra na página estática" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="80" y="-110" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="106" value="Entrega o estático" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="325" y="-70" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="110" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="108" target="109" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="108" value="Usuário 2 entra na página estática" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="80" y="-30" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="109" value="Entrega estático" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="325" y="-70" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="113" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="111" target="112" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="111" value="Usuário 3 entra na página estática" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="80" y="40" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="112" value="Entrega estático" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="325" y="-70" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="116" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="114" target="115" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="114" value="Usuário 4 entra na página estática depois do tempo de revalidate" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="70" y="160" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="115" value="Entrega estático <br>novo" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="510" y="-70" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="118" value="Acessos durante o intervalo do revalidate" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="1" vertex="1">
<mxGeometry x="140" y="-140" width="240" height="20" as="geometry"/>
</mxCell>
<mxCell id="119" value="" style="endArrow=none;html=1;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="35.00000000000023" y="-230" as="sourcePoint"/>
<mxPoint x="845" y="-230" as="targetPoint"/>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="9OS7cQgwm-1xwcLl8kmQ" name="Context API">
<mxGraphModel dx="1203" dy="604" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="BYL4sLhnVg4eHE-C0bMJ-0"/>
<mxCell id="BYL4sLhnVg4eHE-C0bMJ-1" parent="BYL4sLhnVg4eHE-C0bMJ-0"/>
<mxCell id="hITGKUC4qj057jyG5TWU-2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" source="hITGKUC4qj057jyG5TWU-0" target="hITGKUC4qj057jyG5TWU-1" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-0" value="Menu" style="whiteSpace=wrap;html=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" vertex="1">
<mxGeometry x="150" y="120" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" source="hITGKUC4qj057jyG5TWU-1" target="hITGKUC4qj057jyG5TWU-3" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="I4PXR6HuB9NFb0w4CS32-1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="BYL4sLhnVg4eHE-C0bMJ-1" source="hITGKUC4qj057jyG5TWU-1" target="I4PXR6HuB9NFb0w4CS32-0">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-1" value="CartDropdown" style="whiteSpace=wrap;html=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" vertex="1">
<mxGeometry x="150" y="230" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-3" value="CartIcon" style="whiteSpace=wrap;html=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" vertex="1">
<mxGeometry x="20" y="340" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-8" value="<h2>Props drilling</h2>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" vertex="1">
<mxGeometry x="150" y="50" width="130" height="50" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-9" value="props" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" vertex="1">
<mxGeometry x="215" y="190" width="50" height="20" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-10" value="props" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" vertex="1">
<mxGeometry x="20" y="280" width="50" height="20" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-16" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" source="hITGKUC4qj057jyG5TWU-12" target="hITGKUC4qj057jyG5TWU-15" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-18" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" source="hITGKUC4qj057jyG5TWU-12" target="hITGKUC4qj057jyG5TWU-17" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-21" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" source="hITGKUC4qj057jyG5TWU-12" target="hITGKUC4qj057jyG5TWU-19" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-12" value="Context" style="whiteSpace=wrap;html=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" vertex="1">
<mxGeometry x="580" y="120" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-15" value="CartIcon" style="whiteSpace=wrap;html=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" vertex="1">
<mxGeometry x="460" y="250" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-17" value="CartList" style="whiteSpace=wrap;html=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" vertex="1">
<mxGeometry x="580" y="340" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-19" value="CartDropdown" style="whiteSpace=wrap;html=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" vertex="1">
<mxGeometry x="700" y="250" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="hITGKUC4qj057jyG5TWU-24" value="<h2>State Management</h2>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" parent="BYL4sLhnVg4eHE-C0bMJ-1" vertex="1">
<mxGeometry x="555" y="50" width="170" height="50" as="geometry"/>
</mxCell>
<mxCell id="I4PXR6HuB9NFb0w4CS32-0" value="CartList" style="whiteSpace=wrap;html=1;" vertex="1" parent="BYL4sLhnVg4eHE-C0bMJ-1">
<mxGeometry x="290" y="340" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="I4PXR6HuB9NFb0w4CS32-2" value="props" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" vertex="1" parent="BYL4sLhnVg4eHE-C0bMJ-1">
<mxGeometry x="290" y="280" width="50" height="20" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>