39 lines
1.9 KiB
Markdown
39 lines
1.9 KiB
Markdown
# UniChat - Network File-Sharing chat System (Java)
|
|
|
|
A modern, real-time chat application built using **JavaFX** and **Java Socket Programming**. UniChat allows users to connect to a central server, see who is online, and engage in both public and private conversations through a clean, dark-themed interface.
|
|
|
|
## 🚀 Key Features
|
|
|
|
* **Authentication System:** A dedicated login screen where users can authenticate with a username.
|
|
* **Real-time Public Chat:** A global communication channel to broadcast messages to all connected users.
|
|
* **Private Messaging:** Targeted, one-on-one communication capabilities between users.
|
|
* **Live User List:** A sidebar that displays all currently connected users in real-time.
|
|
* **Modern UI:** Built with JavaFX, featuring a responsive, dark-themed interface for a comfortable user experience.
|
|
|
|
## 📸 Project Interface
|
|
|
|
| Login Screen | Authentication Success | Main Chat Interface |
|
|
| :---: | :---: | :---: |
|
|
|  |  |  |
|
|
|
|
|
|
## 🛠 Tech Stack
|
|
|
|
* **Language:** Java 17+
|
|
* **GUI Framework:** JavaFX
|
|
* **Networking:** Java Sockets (TCP)
|
|
* **Concurrency:** Multi-threaded Client-Server architecture
|
|
|
|
## 💻 How to Run
|
|
|
|
1. **Start the Server:** Ensure the `Server` application is running to listen for incoming connections.
|
|
2. **Launch the Client:** Run the `Launcher` class to open the UI.
|
|
3. **Connect:** Enter your desired username on the login screen and click "Connect".
|
|
|
|
---
|
|
|
|
|
|
3. Reuse your existing socket/streams logic — just move the "send" actions to button handlers and update the UI from `ServerListener` using `Platform.runLater(...)` (**since UI updates must happen on the JavaFX Application Thread**).
|
|
|
|
This part is **completely optional** and won't affect your core grade — just a fun way to practice connecting a GUI to networking code and multithreading.
|