This is a client-server chat application using two different wire protocols communicating on TCP socket - a custom designed wire protocol, and a JSON-based protocol for better readability and interoperability. The application provides a complete chat experience with account management, real-time messaging, and message history features.
- Create new accounts with email, username and password
- Secure password handling (not transmitted and stored as plaintext)
- Login with existing accounts
- Delete account and all associated data
- User search with substring matching
- Real-time message delivery for online users
- Message queueing for offline users
- Configurable message retrieval (specify number of messages to fetch)
- Message history with pagination
- Message deletion (single or batch)
- Unread message notifications
- Chat app style interface (similar to iMessage/WhatsApp)
- Recent chats list with unread message indicators
- Search users to start new conversations
- Message grouping by chat conversations
- Selection mode for batch message operations
Register page
Login page
Main chat page
New chat page
Receive messages
Messages received
Delete messages
Note: If you're grading the assignment, we provide a deployed version of the server for testing purposes so you don't have to create a MongoDB Atlas account. Please refer to the Canvas submission for the server IP address and port.
# Install required dependencies
pip install -r requirements.txt
Our server use MongoDB Atlas as a database. You can create a free account and get a connection string to connect to the database.
Fill in the config-server.json
file with your MongoDB connection information and run the server.
python -m server --config config-server.json
Fill in the config-client.json
file with the server connection information and run the client.
python -m client --config config-client.json
Including the following sections: