Files
pynkode/docs/enrollment_diagram.md
2025-03-24 10:04:11 -05:00

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/>51b187b9-c930-4f5d-81da-c11c082f2c64
    Note left of Server: set_keypad:<br/>Key 0: [ 9 29  3 49 50 25]<br/>Key 1: [27  2 12 22 14 16]<br/>Key 2: [36 47 21 13 23  7]<br/>Key 3: [45 11 30  4 32 43]<br/>Key 4: [18 20 39 40 41 52]<br/>Key 5: [ 0 38 48 31  5 34]<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, 1, 4, 2]
    Client->>+Server: Set nKode:<br/>51b187b9-c930-4f5d-81da-c11c082f2c64<br/>[2, 1, 4, 2]
    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/>51b187b9-c930-4f5d-81da-c11c082f2c64
    Note left of Server: confirm_keypad:<br/>Key 0: [27 47 39  4  5 25]<br/>Key 1: [45 20 48 49 14  7]<br/>Key 2: [ 9 38 12 13 32 52]<br/>Key 3: [36  2 30 40 50 34]<br/>Key 4: [18 11  3 31 23 16]<br/>Key 5: [ 0 29 21 22 41 43]<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, 0, 2, 1]
    Client->>+Server: Confirm nKode:<br/>51b187b9-c930-4f5d-81da-c11c082f2c64<br/>[3, 0, 2, 1]
    Server->>Server: Create User
    Server-->>-Client: Success