A simple chat app written in Python. Users sign up, add friends and send each other messages.
- Python 3.12 or newer
- OpenSSL, to make the certificate (Git for Windows includes it)
Make a certificate (only once):
python make_cert.py
Start the server:
python server.py
Start the app (once for each user):
python main.py
- File > Sign up to create an account.
- Friends > Find User to send a friend request.
- Your friend accepts it in Friends > Pending Requests.
- Click your friend's name on the left and start chatting.
- To start over with an empty database, run
python initialize_db.py. - After 5 failed logins, each retry waits longer, up to a minute.
- If the connection drops, the app reconnects and logs you back in.
- The connection is encrypted with TLS. The app only talks to a server whose certificate matches
cert.pem. - To chat across machines, run
python make_cert.py --host <server address>, start the server with--host 0.0.0.0, and give each user a copy ofcert.pem(neverkey.pem). They start the app with--host <server address>.
Install uv, then run the checks:
uv sync
uv run ruff check .
uv run pytest
Amin Niaziardekani, Swapnaneel Sarkhel, Ajdin Buljko