How bhatti/plexpass works
High-Level Architecture Components
a) Client Layer:
• Web UI (Browser-based interface)
• CLI Interface
• REST API Clients
b) Application Layer:
• HTTP/TLS Server (Port 8443)
• Authentication & Authorization
• Controllers (API and UI)
• Domain Services
• Command Handlers
c) Data Layer:
• Repositories
• Database (SQLite)
• HSM Storage
• File System Storage
Key Architectural Patterns to Highlight
a) Security Components:
• End-to-End Encryption
• Multi-Factor Authentication
• PKI Infrastructure
• Envelope Encryption
• Zero-Knowledge Architecture
b) Service Layer:
• Core services with their relationships:
• AuthenticationService
• UserService
• VaultService
• AccountService
• EncryptionService
• PasswordService
• ShareVaultAccountService
• AuditLogService
Data Flow Representation
• User authentication flow
• Vault and account creation/management flow
• Password analysis and sharing workflows
• Encryption/decryption processes
• Import/export operations
Specific Implementation Details
• Rust as the implementation language
• Diesel ORM for database operations
• Askama for templating
• WebAuthn/FIDO support
• HIBP integration
Key Interactions
Important interactions:
• Master password and pepper key combination
• Envelope encryption process
• Multi-factor authentication flow
• Vault sharing mechanism
• Password analysis workflow
External Dependencies
Connections to:
• Have I Been Pwned API
• Hardware Security Modules
• Local file system
• Browser security features
Deployment Context
How the system operates in:
• Local environment
• Docker container
• Multi-device setup
Cross-Cutting Concerns
• Logging and Audit
• Metrics (Prometheus)
• Internationalization
• Error handling
Remember to include notes about the encryption schemes (AES-256-GCM, ECC) and how they're applied at different levels of the system. This will help viewers understand the security measures in place throughout the application.