Project

General

Profile

Sequence Diagram » History » Version 2

pasin sadsara, 03/02/2026 05:55 AM

1 1 karnake ruengchaicharnkij
# Sequence Diagram
2 2 pasin sadsara
3
There are the following API:
4
5
Client onboarding
6
Admin approve
7
8
Diagram
9
10
![](Onboarding.png)
11
12
```
13
title onboarding
14
15
participant "customer" as cs
16
participant "admin" as a
17
participant "frontend" as fe
18
participant "backend" as be
19
database "database" as db
20
participant "s3" as s3
21
participant  "appman" as am
22
participant  "DAP" as dp
23
24
group client onbaording
25
 group PAGE:{URL}/authentication/signup/type
26
cs -> fe: click select invester type
27
fe-->cs:
28
end
29
group PAGE:{URL}:/authentication/signup/addindividualaccount
30
 cs->fe: filled customer infomation
31
cs->fe:Cilck next form
32
fe->be: [POST]/api/v1/individual/ico/precreate
33
be->be: check dulipcate email mobile citizenID
34
be->be: create registerID
35
be<->db:save
36
be-->fe: registerID
37
fe->be: init appman
38
be<->am: init appman
39
be-->fe: appman url
40
fe-->cs: redirect to appman
41
end
42
43
group APPMAN Service
44
cs->am: ID Card liveness ocr
45
am-->fe: 
46
fe-->cs: redirect 
47
end
48
49
group PAGE {URL}:/authentication/signup/backCardwebcaminstructions
50
fe->be: [POST]/api/v1/appman/result
51
be<->am: Get IDCard liveness ocr result
52
be<->db: save
53
be<->appman: check pep
54
be<->dp: check dopa
55
be<->dp: check amlo
56
be<->dp: check led
57
be<->db : save
58
be-->fe : registerID
59
60
cs->fe : upload backID Card
61
fe->be:[POST]/upload/onboarding
62
be<->db:save
63
be<->s3:upload
64
be-->fe:
65
fe-->cs:redirect
66
end
67
68
69
group PAGE{URL}:/authentication/signup/basicinfo
70
cs->fe: filled address occupation banks
71
cs->fe:Cilck next form
72
fe->be:[POST]/api/v1/individual/ico/postcreate
73
be->be:create risk score
74
be<->db:save
75
be-->fe:
76
fe-->cs:redirect
77
end
78
group PAGE{URL}:/authentication/signup/suittestfatca
79
cs->fe:filled suitetest fatca
80
cs->fe:Cilck next form
81
fe->be: [POST]/api/v1/suitetest/ico/result/individual/save
82
be<->db:save
83
be -->fe:
84
fe-->cs: redirect
85
end
86
group PAGE{URL}:/authentication/signup/otpemailconfirm
87
cs->fe: verify otp
88
fe->be:[POST]/api/v1/user/verify/mobile
89
be<->db:save
90
be<->resend: send OTP
91
be-->fe:
92
fe-->cs:
93
resend-->cs: OTP
94
cs->fe: filed OTP
95
cs -> fe: confirm
96
fe->be:[POST]/api/v1/user/verify/mobile/check
97
be<->db: get
98
be->be: check otp
99
be-->fe:
100
fe-->cs:
101
cs-> fe: verify email 
102
fe->be: [POST]/api/v1/user/verify/email
103
be<->db: save
104
be<->email:
105
email-->cs: send email
106
be-->fe:
107
fe-->cs:[URL]/authentication/signup/emailconfirmsucess
108
end
109
110
group Confrim email
111
cs->email: confirm email
112
email-->fe: 
113
fe->be: [POST]/api/v1/user/verify/email/check
114
be-->fe:
115
fe-->cs:[URL]/authentication/signup/identityverification
116
end
117
group ThaiD :{URL}/authentication/signup/identityverification
118
cs->fe: Cilck Select THAID
119
fe-->cs:
120
cs->fe:click do thaiD
121
fe->be:[POST]/api/v1/thaid/initial
122
be<->db:save
123
be->fe: dap url
124
fe-->cs: redirect to dap\n
125
cs->thaiD : verify
126
dp<->thaiD:
127
dp ->be: user data
128
be<->db:save
129
be->dp:
130
dp-->fe: \n
131
fe-->cs:[URL]/authentication/thaid/success
132
133
dp-->thaiD:
134
135
136
end 
137
end
138
139
group Admin
140
141
  group maker
142
a->fe: [URL]/create-job/change-individual-account/view
143
fe->be:[POST]/api/v1/individual/list
144
be<->db: get data
145
be-->fe:
146
fe-->a:
147
a->fe: bank verify
148
fe->be: upload [POST]/api/v1/admin/upload/onboarding
149
be<->db:save
150
be<->s3: upload
151
be-->fe:
152
a->fe: Select approve/reject/blacklist
153
fe->be:[POST]/api/v1/individual/approveocr
154
be<->db:update status
155
be-->fe:
156
fe-->a:
157
  end
158
alt maker Approved
159
  group checker
160
    a->fe:[URL]/todo-list/individual-account-opening
161
fe->be:[POST]/api/v1/individual/list/pending
162
be<->db: get
163
be-->fe:
164
fe-->a:
165
a->fe: approve/reject
166
fe->be:[POST]/api/v1/user/individual/approve
167
be<->db: update status
168
alt approve And risk score is medium
169
170
be->be: create account
171
be<->db:create
172
be<->email:send email
173
email-->cs: account/password
174
175
end
176
be-->fe:
177
fe-->a:
178
end
179
group Approver
180
181
 a->fe:[URL]/todo-list/individual-account-opening
182
fe->be:[POST]/api/v1/individual/list/pending
183
be<->db: get
184
be-->fe:
185
fe-->a:
186
a->fe: approve/reject
187
fe->be:[POST]/api/v1/user/individual/approve
188
be<->db: update status
189
alt approve
190
  be->be: create account
191
be<->db:create
192
be<->email:send email
193
email-->cs: account/password
194
end
195
be-->fe:
196
fe-->a:
197
end
198
end
199
end
200
201
```