seq - bounswe/bounswe2024group6 GitHub Wiki
sequenceDiagram participant User as User participant Browser as Web Browser participant AP1 as Access Point 1 participant AP2 as Access Point 2 participant PU as Privileged User
%% Registration Process
User->>Browser: Connect to "enet" WiFi
Browser->>AP1: Request page (192.168.4.1:3000)
AP1->>Browser: Return registration page
User->>Browser: Enter username
Browser->>AP1: Send registration request
Note over AP1: Generate key pair
AP1->>Browser: Return token and recovery words
Browser->>User: Display recovery words
Note over Browser: Store token in local storage
%% Messaging
User->>Browser: Create message/photo
Browser->>Browser: Compress image if needed
Browser->>AP1: Send signed message
AP1->>AP1: Verify signature
AP1->>AP1: Store message
AP1->>Browser: Confirm message received
%% Movement and Sync
Note over User,AP1: User moves to new location
User->>Browser: Connect to "enet" WiFi at new location
Browser->>AP2: Auto-connect with stored token
AP2->>Browser: Authentication successful
%% Sync Process
Browser->>AP2: Send local message store
Note over AP2: Verify messages
AP2->>AP2: Save valid messages
AP2->>Browser: Send new messages
Browser->>Browser: Update local storage
Browser->>User: Display updated messages
%% Channel Management
PU->>AP2: Request to create channel
Note over AP2: Verify PU certificate
AP2->>AP2: Create channel
AP2->>PU: Confirm channel created
%% Recovery Process
Note over User: User loses device/clears browser data
User->>Browser: Open recovery page
User->>Browser: Enter username, AP ID, recovery words
Browser->>AP1: Send recovery request
AP1->>AP1: Verify recovery phrase
AP1->>Browser: Return new token
Browser->>User: Access restored