Note: This repository contains the public, open-source component and architectural overview of a secure messaging system. The full implementation details and proprietary source code related to the project developed for the client are confidential and protected under NDA.
A feature-rich, cross-platform desktop chat application built with C++ and Qt, supporting real-time messaging, file sharing, and voice communication with end-to-end encryption.
- Real-time Communication: WebSocket-based instant messaging
- Multi-user Support: Simultaneous connections with multiple clients
- Message History: Persistent storage using SQLite
- Message Management: Edit and delete sent messages
- Dual Messaging Modes: Broadcast to all users or private one-to-one chat
- AES-256-GCM Encryption: Military-grade encryption for all messages
- Encrypted File Transfers: Secure file sharing with chunk-based encryption
- OpenSSL Integration: Industry-standard cryptographic library
- Voice Messages: Record and playback voice messages
- Audio Waveform Visualization: Visual representation of audio messages
- File Sharing: Resumable file uploads/downloads using TUS protocol
- Multi-format Support: Handle various file types with progress tracking
- Modern UI Design: Clean, intuitive interface with custom themes
- Dark/Light Themes: Customizable appearance
- User List Management: Real-time user presence indicators
- Toast Notifications: Non-intrusive message alerts
- Responsive Layout: Adapts to different window sizes
The application follows a clean MVC (Model-View-Controller) architecture with modular design:
ChatApp/
├── Client/ # Desktop client application
│ ├── Controller/ # Client-side business logic
│ ├── Model/ # WebSocket client, database, user model
│ └── View/ # UI components and windows
├── Server/ # Multi-user server application
│ ├── Controller/ # Server-side message routing
│ ├── Model/ # WebSocket server, TUS server, database
│ └── View/ # Server UI and user management
├── CommonCore/ # Shared cryptography and file transfer
│ ├── CryptoManager
│ ├── TusUploader/Downloader
│ └── NotificationManager
├── CommonUI/ # Reusable UI components
│ ├── Message components (Text, Audio, File)
│ ├── Theme system
│ └── Widgets (ChatHeader, InputWidget, etc.)
└── assets/ # Application resources (icons, images)
- Language: C++17
- UI Framework: Qt 5.12+ / Qt 6.2+
- Build System: CMake 3.16+
- Networking: Qt WebSockets
- Security: OpenSSL 1.1.1+
- Database: SQLite (Qt SQL Module)
- File Transfer: TUS Protocol (resumable uploads)
- Multimedia: Qt Multimedia
- CMake 3.16 or higher
- C++17 compatible compiler
- Qt 5.12+ or Qt 6.2+
- Qt Core
- Qt Widgets
- Qt WebSockets
- Qt Sql
- Qt Multimedia
- Qt Network
sudo apt-get install build-essential cmake qt6-base-dev qt6-websockets-dev \
qt6-multimedia-dev libssl-dev libsqlite3-dev- Qt (MinGW or MSVC)
- OpenSSL for Windows (Download here)
- Update OpenSSL paths in
CMakeLists.txt(lines 45-51) based on your installation
brew install cmake qt@6 opensslgit clone https://github.com/Amin4424/ChatApp.git
cd ChatAppmkdir build
cd build
cmake ..
cmake --build .- Install OpenSSL from slproweb.com
- Update
CMakeLists.txtwith your OpenSSL installation path:IMPORTED_LOCATION "YOUR_PATH/OpenSSL-Win64/lib/VC/x64/MD/libssl.lib" INTERFACE_INCLUDE_DIRECTORIES "YOUR_PATH/OpenSSL-Win64/include"
- Build using Qt Creator or CMake with MinGW/MSVC
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc)cmake -DCMAKE_PREFIX_PATH=/usr/local/opt/qt@6 ..
make -j$(sysctl -n hw.ncpu)./ServerAppThe server will start on:
- WebSocket: Port 8080 (configurable)
- TUS File Server: Port 1080
./ClientApp- Enter server IP address and port
- Connect to begin chatting
- Type your message in the input field
- Press Enter or click Send
- Messages are encrypted before transmission
- Click the attachment icon
- Select file(s) to upload
- Files are encrypted and uploaded using TUS protocol
- Recipients can download with progress tracking
- Click and hold the microphone icon
- Record your message
- Release to send
- Waveform visualization shows audio content
- Edit: Click the edit icon on your messages
- Delete: Click the delete icon to remove messages
The application uses SQLite for persistent storage:
- Client:
client_chat.db- Stores local message history - Server:
server_chat.db- Centralized message archive
- Port: 8080 (default, configurable)
- Protocol: WSS (WebSocket Secure)
- Encryption: AES-256-GCM at application layer
- Port: 1080 (default)
- Protocol: TUS (Tunable Upload Server)
- Chunk Size: 5MB
- Features: Resumable uploads, encryption support
- End-to-End Encryption: All messages encrypted with AES-256-GCM
- Chunk-Based File Encryption: Large files encrypted in 5MB chunks
- Secure Key Generation: OpenSSL-based key management
- Encrypted Storage: Message database can be encrypted (optional)
Key configuration options in the code:
Server (ServerController.cpp):
int webSocketPort = 8080; // WebSocket server port
int tusServerPort = 1080; // File upload server portClient (ClientController.cpp):
QString serverAddress = "ws://localhost:8080"; // Server addressThis is a fully functional chat application with core features implemented. For detailed status information, see the project analysis in recent commits.
Completion Level: ~85-90%
- ✅ Real-time messaging
- ✅ File and voice sharing
- ✅ Message encryption
- ✅ Cross-platform support
⚠️ User authentication (not implemented)⚠️ Advanced features (video calls, screen sharing)
- File Encryption API: Complete full file encryption methods (
CommonCore/CryptoManager.cpp:83, :89) - Windows Build: Consider VCPKG integration for automated OpenSSL dependency management
- User Authentication: Login system not yet implemented
- CI/CD: Automated builds and testing pipeline pending
This is a demonstration/educational project. The full commercial implementation is proprietary.
This public version is provided for educational and demonstration purposes. The complete implementation is proprietary and confidential.
For questions about the public components of this project, please open an issue on GitHub.
Built with ❤️ using C++ and Qt