How krish-legend13/sentra-app works
SENTRA is an end-to-end encrypted messaging product with desktop and Flask web interfaces. Its main workflow is account registration or login, multi-factor authentication, local identity-key protection, secure conversation setup, encrypted messaging, server-side routing, and recipient delivery. Separate branches provide backups, presence, audit/forensic views, and account settings. The graph reflects README-documented capabilities and sampled call/import evidence; unsampled modules are included where the README or source index establishes their role, but their internal wiring is not assumed.
Main entry points: app.py Web application · service.py Messaging service · session_manager.py Web sessions · registration.py Registration
Components 29
User interfaces
- Desktop app
main.py - Registration
ui/registration.py - Desktop login
ui/login.py - Messaging dashboard
ui/dashboard.py - Security views
ui/forensic_view.py
Accounts and identity
- Phone verification
account/phone_verification.py - Account management
account/manager.py - TOTP authentication
auth/totp.py - Identity keys
identity/keys.py - Encrypted identity vault
identity/vault.py
Secure messaging
- Cryptographic primitives
crypto/encryption.py - Conversation certificates
messaging/certificates.py - Messaging service
messaging/service.py - TCP message router
network/server.py - Offline message queue
network/server.py
Storage and security
- Local data store
database/database.py - Message and conversation data
database/queries.py - Audit and forensic logging
security/logging.py
Web experience
- Web application
web/app.py - Web authentication
web/routes/auth.py - Web sessions
web/session_manager.py - Web conversations
web/routes/conversations.py - Web backups
web/routes/backup.py - Web forensics
web/routes/forensics.py - Web settings
web/routes/settings.py - Web dashboard
web/routes/dashboard.py
Other components
- User
- Recipient
- Web user
Connections 39
- User → Desktop app: uses
- Desktop app → Registration: opens
main.py - Registration → Phone verification: verifies phone
- Registration → Account management: registers account
- Desktop app → Desktop login: opens
main.py - Desktop login → TOTP authentication: checks code
- Desktop login → Encrypted identity vault: unlocks identity
- Registration → Identity keys: creates identity
- Identity keys → Encrypted identity vault: stores protected key
- User → Messaging dashboard: uses
- Messaging dashboard → Messaging service: sends messages
ui/dashboard.py - Messaging service → Conversation certificates: establishes conversations
- Messaging service → Cryptographic primitives: encrypts messages
messaging/service.py - Messaging service → TCP message router: routes packets
messaging/service.py - TCP message router → Offline message queue: queues offline
network/server.py - TCP message router → Recipient: delivers envelopes
- Messaging service → Message and conversation data: reads and writes
messaging/service.py - Message and conversation data → Local data store: uses database
database/queries.py - Messaging dashboard → Security views: opens security views
ui/dashboard.py - Messaging dashboard → Audit and forensic logging: shows security events
ui/dashboard.py - User → Web user: uses
- Web user → Web application: accesses
- Web application → Web authentication: registers routes
web/app.py - Web application → Web dashboard: registers routes
web/app.py - Web application → Web conversations: registers routes
web/app.py - Web application → Web forensics: registers routes
web/app.py - Web application → Web backups: registers routes
web/app.py - Web application → Web settings: registers routes
web/app.py - Web authentication → TOTP authentication: verifies code
web/routes/auth.py - Web authentication → Encrypted identity vault: unlocks identity
web/routes/auth.py - Web authentication → Web sessions: creates session
web/routes/auth.py - Web conversations → Web sessions: uses session
web/routes/conversations.py - Web conversations → Messaging service: uses messaging
web/routes/conversations.py - Web backups → Web sessions: uses session
web/routes/backup.py - Web forensics → Web sessions: uses session
web/routes/forensics.py - Web settings → Web sessions: uses session
web/routes/settings.py - Web conversations → Message and conversation data: reads and writes
web/routes/conversations.py - Web backups → Audit and forensic logging: records events
web/routes/backup.py - Web forensics → Audit and forensic logging: reads audit data
web/routes/forensics.py