User
- The user opens the application (downloaded from app store).
- The user tries to log in with a pre-existing account for verification. GoTo Frontend 1 (with HTTP).
- The user logs in successfully upon their account information verified. GoTo Frontend 5.
- The user creates a room (room name, room member list are the only mutable things). GoTo Frontend 6.
- The user clicks the room tab to enter the chat room. GoTo Frontend 8.
- The user enters and tries to send a message to the chat room. GoTo Frontend 10.
- The user successfully sent the message to the chat room. <END HERE>
Frontend
- Fetch the user inputted credential (email and password) with HTTP.
- Send the user input to Backend. GoTo Backend 1.
- Receive server result.
- GoTo Frontend 4.
- Display error message to the user (input combination does not exist). <END HERE>
- Connect the user to server via WebSocket with the JWT authentication token. GoTo Backend 2.
- Display the base UI to the user.
- Receive the user create room request. GoTo Backed 3.
- Update the room lists UI of the user.
- Fetch the user’s member public keys or sender keys. Runs X3DH or sender key setup. Caches encryption state. GoTo Frontend 9.
- Display the chat room selected by the user.
- Receive the message inputted by the user. GoTo Frontend 11.