Project for UNIFI(University of Florence) Software Engineering exam
A multithreaded Java client-server application that allows users to navigate server directories, authenticate, and download/upload files. It supports concurrent clients, role-based permissions (User/Admin), and uses software design patterns such as Singleton, Factory & Command, and Observer.
- 🔐 User authentication using a local
credentials.txtfile - 📁 Directory navigation on the server side
- ⬇️ Download files from the server
- ⬆️ Upload files (Admins only)
- 🗑️ Delete files (Admins only)
- 👁️ Observer Pattern for Users actions logging
- 🧠 Design Patterns Used:
- Singleton – for server instance
- Factory & Command – to manage command creation
- Observer – to log downloads
- Java 11 or above
- Maven required
- Open the project in IntelliJ
- Run the
Server.javaclass:- This starts listening on port
12345
- This starts listening on port
- The server creates:
- A
server_filesfolder (if not present) - A
credentials.txtfile for user management
- A
- Run the
Client.javaclass - When prompted:
- Choose a download folder
- Login or register
- Use the command-line interface to:
- Navigate folders (
cd) - List files (
list) - Download (
download <filename>) - Upload / delete (if Admin)
- Navigate folders (