How talatberke/schat works
SecretChat is a desktop app for room-code-based, end-to-end encrypted chat. Users create or join a room, compare a short authentication code, then exchange text and media; messages stay in RAM unless history saving is enabled. The graph follows the documented UI, room, cryptography, signaling and storage responsibilities, and includes optional networking and customization capabilities. Only main.py and the theme tools were excerpted, so several subsystem links are documented at product level or shown as unverified rather than asserted as inspected calls.
Main entry points: room.py Room sessions · ui.py Chat interface · main.py Application entry · signaling.py MQTT signaling
Components 19
Desktop interface
- Application entry
main.py - Chat interface
secretchat/ui.py - Chat components
secretchat/components.py - Emoji picker
secretchat/emoji_picker.py
Room and protocol
- Room sessions
secretchat/room.py - Envelope protocol
secretchat/messages.py
Cryptography
- Key exchange and encryption
secretchat/crypto.py - Security validation
secretchat/security.py
Network transport
- MQTT signaling
secretchat/signaling.py - MQTT broker
- STUN discovery
secretchat/stun.py - UDP P2P transport
secretchat/p2p.py
Local features
- History storage
secretchat/storage.py - Image handling
secretchat/media.py - Theme settings
secretchat/theme.py - Font management
secretchat/fonts.py - Automatic nicknames
secretchat/nicknames.py - App configuration
secretchat/config.py
Other components
- Chat user
Connections 21
- Chat user → Application entry: launches
README.md - Application entry → Chat interface: runs
main.py - Chat user → Chat interface: creates or joins
README.md - Chat interface → Room sessions: starts session
- Room sessions → Envelope protocol: exchanges envelopes
README.md - Room sessions → Key exchange and encryption: performs key exchange
README.md - Room sessions → MQTT signaling: uses relay channel
README.md - MQTT signaling → MQTT broker: relays ciphertext
README.md - Room sessions → STUN discovery: discovers peer address
README.md - Room sessions → UDP P2P transport: uses UDP transport
README.md - Chat user → History storage: opts into history
README.md - Chat user → Image handling: selects image
README.md - Chat user → Emoji picker: chooses emoji
README.md - Chat user → Font management: chooses font
README.md - Chat user → Theme settings: changes appearance
README.md - Chat interface → Chat components: renders chat
- Chat interface → Automatic nicknames: uses generated nickname
- Room sessions → Security validation: validates session
- Room sessions → History storage: saves history
- Room sessions → Image handling: transfers images
- Room sessions → App configuration: uses defaults