Skip to content

Commit 8906abb

Browse files
committed
* added diagram
1 parent c8c7a9a commit 8906abb

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

vite-web-sdk/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,47 @@ the session instead of creating a new one.
1616
The `uuid` links both desktop and mobile that are running in parallel to give the best possible experience to
1717
the user.
1818

19+
This diagram explains it in detail:
20+
21+
```mermaid
22+
sequenceDiagram
23+
participant f as Frontend
24+
participant b as Backend
25+
participant a as API
26+
27+
alt uuid exists in query params
28+
f -->> b: /start
29+
b -->> a: /omni/start
30+
a -->> b: {token, interviewId}
31+
note over b: Generate uuid
32+
note over b: Save Session<br>{token, interviewId, uuid}
33+
b-->> f: {token, interviewId, uuid}
34+
else completely new session
35+
f -->> b: /start?uuid=<uuid>
36+
note over b: Retrieve stored Session<br>{token, interviewId, uuid}
37+
b-->> f: {token, interviewId, uuid}
38+
end
39+
40+
alt Desktop
41+
note over f: renderRedirectToMobile()
42+
43+
loop while onboarding_status!=='ONBOARDING_FINISHED'
44+
note over f, a: This loop happens automatically<br> inside the method
45+
f -->> a: /omni/onboarding-status {token}
46+
a-->> f: {onboarding_status}
47+
end
48+
else Mobile
49+
note over f: userConsent
50+
note over f: frontId
51+
note over f: backId
52+
note over f: processId
53+
note over f: selfie
54+
note over f: facematch
55+
note over f: getFinishStatus
56+
end
57+
note over f: Finish screen
58+
```
59+
1960
# Requirements
2061
Vite requires Node.js version 14.18+, 16+. some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.
2162

0 commit comments

Comments
 (0)