How brepublic/comp3334-project works
This is a CLI-based 1:1 E2EE messaging system: a client manages identity and conversations, encrypts and decrypts messages locally, and exchanges ciphertext through a server that handles accounts, contacts, and online or offline delivery. The server stores ciphertext rather than plaintext. The README documents key verification, replay protection, TTL cleanup, and encrypted delivery receipts; these are represented where the available source supports them. Some client and server workflows are only partially sampled, so the graph omits uncertain internal links.
Main entry points: main.py Client workflow · Dependency.py Token validation · MainServer.py Server app · ChatWS.py WebSocket relay
Components 19
Trusted client
- Client workflow
Client/main.py - HTTP API client
Client/api.py - Identity and E2EE
Client/identity.py - WebSocket client
Client/ws_client.py - Session state
Client/state.py
Messaging service
- Server app
Server/MainServer.py - Registration
Server/routers/Register.py - Login and sessions
Server/routers/Login.py - Contacts and keys
Server/routers/Contacts.py - Mailbox API
Server/routers/Message.py - WebSocket relay
Server/routers/ChatWS.py - Connection manager
Server/ws_manager.py - Token validation
Server/Dependency.py
Local and server storage
- Client data models
Client/CLient_db.py - Client DB manager
Client/CdbManager.py - Server DB manager
Server/SdbManager.py - Server data models
Server/Server_db.py
Other components
- CLI user
- Messaging server
Connections 27
- CLI user → Client workflow: uses
README.md - Client workflow → HTTP API client: calls
Client/main.py - Client workflow → Identity and E2EE: uses
Client/main.py - Client workflow → Client DB manager: uses
Client/main.py - Client workflow → Session state: uses
Client/main.py - Client workflow → WebSocket client: receives via
Client/main.py - Identity and E2EE → Client DB manager: uses
Client/identity.py - Client DB manager → Client data models: initializes
Client/CdbManager.py - HTTP API client → Messaging server: sends requests
README.md - WebSocket client → WebSocket relay: connects to
README.md - Server app → Registration: mounts
Server/MainServer.py - Server app → Login and sessions: mounts
Server/MainServer.py - Server app → Contacts and keys: mounts
Server/MainServer.py - Server app → Mailbox API: mounts
Server/MainServer.py - Server app → WebSocket relay: mounts
Server/MainServer.py - Registration → Token validation: uses
Server/routers/Register.py - Login and sessions → Token validation: uses
Server/routers/Login.py - Contacts and keys → Token validation: uses
Server/routers/Contacts.py - Contacts and keys → Server data models: queries
Server/routers/Contacts.py - Mailbox API → Token validation: uses
Server/routers/Message.py - Mailbox API → Server data models: queries
Server/routers/Message.py - WebSocket relay → Token validation: validates tokens
Server/routers/ChatWS.py - WebSocket relay → Server data models: checks and stores
Server/routers/ChatWS.py - WebSocket relay → Connection manager: dispatches to
Server/routers/ChatWS.py - Token validation → Server DB manager: gets sessions
Server/Dependency.py - Server DB manager → Server data models: initializes
Server/SdbManager.py - Messaging server → HTTP API client: returns responses
README.md