User

  1. The user opens the application (downloaded from app store).
  2. The user tries to log in with a pre-existing account for verification. GoTo Frontend 1 (with HTTP).
  3. The user logs in successfully upon their account information verified. GoTo Frontend 5.
  4. The user creates a room (room name, room member list are the only mutable things). GoTo Frontend 6.
  5. The user clicks the room tab to enter the chat room. GoTo Frontend 8.
  6. The user enters and tries to send a message to the chat room. GoTo Frontend 10.
  7. The user successfully sent the message to the chat room. <END HERE>

Frontend

  1. Fetch the user inputted credential (email and password) with HTTP.
  2. Send the user input to Backend. GoTo Backend 1.
  3. Receive server result.
    1. GoTo Frontend 4.
    2. Display error message to the user (input combination does not exist). <END HERE>
  4. Connect the user to server via WebSocket with the JWT authentication token. GoTo Backend 2.
  5. Display the base UI to the user.
  6. Receive the user create room request. GoTo Backed 3.
  7. Update the room lists UI of the user.
  8. Fetch the user’s member public keys or sender keys. Runs X3DH or sender key setup. Caches encryption state. GoTo Frontend 9.
  9. Display the chat room selected by the user.
  10. Receive the message inputted by the user. GoTo Frontend 11.