Files
pynkode/docs/enrollment_diagram.md

2.9 KiB

nKode Enrollment

sequenceDiagram
    participant User
    participant Client
    participant Server
    Note over User,Server: Enrollment
    Client->>User: Signup Form
    Note left of User: email: user@example.com
    User->>Client: Submit Email
    Client->>+Server: Signup Session: user@example.com
    Server->>Server: Create Signup Session
    Note over User,Server: Set nKode
    Server-->>-Client: signup_session_id, set_keypad, icons
    Note left of Server: signup_session_id:<br/>1334d391-3c8a-431a-8186-e91b29d42750
    Note left of Server: set_keypad:<br/>Key 0: [18  2 39 13 23 16]<br/>Key 1: [36 20 21 49  5 43]<br/>Key 2: [ 0 47 48  4 50 25]<br/>Key 3: [27 38 12 40 32 52]<br/>Key 4: [45 29  3 31 41 34]<br/>Key 5: [ 9 11 30 22 14  7]<br/>
    Note left of Server: Icons:<br/>[🍎,🍏,🍊,🍋,🍌,🍉<br/>🍇,🍓,🍒,🍑,🥭,🍍<br/>🥥,🥝,🍅,🍆,🥑,🥕<br/>🌽,🥔,🍠,🥐,🥖,🥨<br/>🥯,🥞,🧀,🍖,🍗,🥚<br/>🍔,🍟,🍕,🌭,🥪,🌮<br/>🌯,🍣,🍤,🍙,🍚,🍜<br/>🍲,🍛,🍱,🥟,🍦,🍧<br/>🍨,🍩,🍪,🎂,🍰,🧁] 
    Client->>Client: Order Icons by keypad
    Client->>User: Display Keypad
    Note left of Client: Key 0: ['🌽' '🍊' '🍙' '🥝' '🥨' '🥑']<br/>Key 1: ['🌯' '🍠' '🥐' '🍩' '🍉' '🍛']<br/>Key 2: ['🍎' '🍧' '🍨' '🍌' '🍪' '🥞']<br/>Key 3: ['🍖' '🍤' '🥥' '🍚' '🍕' '🍰']<br/>Key 4: ['🥟' '🥚' '🍋' '🍟' '🍜' '🥪']<br/>Key 5: ['🍑' '🍍' '🍔' '🥖' '🍅' '🍓']<br/>
    Note left of User: User icons: ['🍌' '🍟' '🌽' '🥝']
    User->>Client: Set Key Selection: [2, 4, 0, 0]
    Client->>+Server: Set nKode:<br/>1334d391-3c8a-431a-8186-e91b29d42750<br/>[2, 4, 0, 0]
    Server->>Server: Disperse Set Keypad
    Note over User,Server: Confirm nKode
    Server-->>-Client: signup_session_id, confirm_keypad, icons
    Note left of Server: signup_session_id:<br/>1334d391-3c8a-431a-8186-e91b29d42750
    Note left of Server: confirm_keypad:<br/>Key 0: [27 47  3 13 14 43]<br/>Key 1: [ 0 29 30 49 23 52]<br/>Key 2: [45 11 39 40  5 25]<br/>Key 3: [ 9  2 21  4 32 34]<br/>Key 4: [18 20 12 31 50  7]<br/>Key 5: [36 38 48 22 41 16]<br/>
    Client->>Client: Order Icons by keypad
    Client->>User: Display Keypad
    Note left of Client: Key 0: ['🍖' '🍧' '🍋' '🥝' '🍅' '🍛']<br/>Key 1: ['🍎' '🥚' '🍔' '🍩' '🥨' '🍰']<br/>Key 2: ['🥟' '🍍' '🍙' '🍚' '🍉' '🥞']<br/>Key 3: ['🍑' '🍊' '🥐' '🍌' '🍕' '🥪']<br/>Key 4: ['🌽' '🍠' '🥥' '🍟' '🍪' '🍓']<br/>Key 5: ['🌯' '🍤' '🍨' '🥖' '🍜' '🥑']<br/>
    Note left of User: User icons: ['🍌' '🍟' '🌽' '🥝']
    User->>Client: Key Selection: [3, 4, 4, 0]
    Client->>+Server: Confirm nKode:<br/>1334d391-3c8a-431a-8186-e91b29d42750<br/>[3, 4, 4, 0]
    Server->>Server: Create User
    Server-->>-Client: Success