A desktop client-server application for controlled exploration of the Los Angeles arrest dataset. The project combines a custom TCP protocol, authenticated PostgreSQL persistence, moderator tooling, analytical queries, and PySide6 interfaces.
Built as an individual advanced programming and mathematics project at Howest.
- Starts and stops the socket server from a desktop interface.
- Registers and authenticates users against PostgreSQL.
- Tracks connected clients, queries, and query popularity.
- Shows server logs and client history in real time.
- Broadcasts messages to all connected clients.
- Registers and signs users in.
- Runs parameterized dataset queries without exposing the source dataset.
- Displays analytical results and query history.
- Sends messages and receives moderator broadcasts.
PySide6 client
│ framed JSON messages over TCP
▼
threaded Python socket server
├── protocol validation and authentication
├── pandas-based dataset queries
└── PostgreSQL users, sessions, and query history
Messages use a shared protocol module and an explicit length prefix, avoiding assumptions that one socket read equals one complete message. Each client connection is handled independently while the moderator interface receives thread-safe status updates.
Requirements: Python 3.10 or newer, Docker with Compose, and a desktop session for PySide6.
git clone https://github.com/SnaetWarre/Server-Client-Python.git
cd Server-Client-Python
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
docker compose up -d
python run_server.pyOpen a second terminal in the same virtual environment:
python run_client.pyThe launcher scripts use the actual application modules under app/server and app/client. The server and client default to 127.0.0.1:8888; the interfaces allow those values to be changed.
app/
├── client/ # socket client, PySide6 interface, and widgets
├── server/ # server, connection handlers, queries, and persistence
└── shared/ # protocol constants and message framing
Data/ # analysis scripts and generated plots
init.sql # PostgreSQL schema
docker-compose.yml
run_server.py
run_client.py
python -m compileall app run_server.py run_client.py
# Requires the PostgreSQL container and configured test database
pytest test_postgres.pyContinuous integration runs the dependency-independent source compilation check. The PostgreSQL integration test remains a local check because it expects the project database configuration.
The application uses the public Los Angeles arrest dataset on Kaggle. It is an academic desktop application rather than an internet-facing production service. A production version would require transport encryption, centrally managed secrets, stricter authorization, migration tooling, observability, and explicit data-retention controls.
- Portfolio case study
- Generated exploratory plots are available under Data/plots.