A simple client–server messenger written in Python.
Features:
- Multiple clients can connect to a central server.
- Clients are identified by user-provided names.
- Clients can send messages directly to other clients (no broadcast).
- All messages, client info, and connection states exist only during runtime.
- No login, database, or persistent storage yet.
- Built with Python libraries:
socket,threading,dotenv,os.
- Python 3.10+
py -m pip install -r requirements.txt
The project includes Dockerfiles for both server and client, and a docker-compose.yml to simplify running multiple clients and the server.
- Clone the repository:
git clone https://github.com/YehorSolonukha/socket_messenger
cd socket_messenger
- Run the server:
python ./server_side/src/server_main.py
- Run clients in separate terminals:
python ./client_side/src/client_main.py
- Enter a username for each client to connect and start messaging
- Clone the repository:
git clone https://github.com/YehorSolonukha/socket_messenger
cd socket_messenger
- Run Docker Desktop
- (after Docker Desktop is loaded) Run the script for auto-setup:
.\windows_docker_setup.ps1
- Enter a username for each client to connect and start messaging