A multi-threaded client-server chat application written in Java, built for the Object Oriented Applications course at Chalmers University of Technology.
Developed by: @marakerl · @auniquee · @lucaschristiansson · @Eweh4 · @Metterklus1
The goal of the project was to build a scalable, well-designed chat application in Java. Throughout development we applied object-oriented design patterns wherever they made sense, which keeps the codebase modular and makes new features straightforward to add.
Users can create accounts, chat in multiple channels, and create new channels. Messages and images are delivered in real time and stored persistently.
- Browse available chat channels
- Connect to a chat channel
- View persistent chat history
- Send text messages and images
- Receive messages and images from other users in real time
- Show or hide the list of available channels
- Show or hide the list of users in a channel
- See which user sent each message or image
| Area | Technology |
|---|---|
| Client UI | JavaFX (designed in Figma) |
| Networking | Java Sockets, multi-threaded server |
| Database | PostgreSQL (3NF-normalized schema) |
| Infrastructure | Docker / Docker Compose |
- Java (JDK)
- Windows/macOS: Docker Desktop
- Linux:
dockeranddocker-compose
The PostgreSQL database runs in a Docker container. From the server package (the directory containing docker-compose.yml), run:
docker compose upThis starts the database on the preconfigured port.
- In
docker-compose.yml, edit theportssection. Ports use the formatHOST:CONTAINER— change the first number (the local port). - Update the port in the
getDBmethod of thePortalConnectionclass so the server connects to the new port.
With the database running, run the main method in the server's Main class.
Run the main method in the Launcher class. If the client and server are on the same network, the connection is established automatically.
You can launch several clients to chat between multiple users.