A high-performance desktop project management application built in Core Java (Java 8 compliant) featuring a multithreaded TCP client-server architecture, a premium Slate-Indigo Dark Theme Swing GUI, and dual-storage capability (File Serialization and MySQL JDBC).
For a quick setup on Windows, you can download the pre-compiled installer package directly from the GitHub Releases section.
Running the installer will install the shortcuts for both the Project Server (backend console) and the Project Hub (client dashboard) on your system.
This application was designed to satisfy all major core Java curriculum benchmarks, demonstrating advanced concepts in Object-Oriented Programming (OOP), Multithreading, Socket Programming, Exception Handling, File I/O & Serialization, Collections, and Relational Database Programming (JDBC).
To satisfy strict desktop application design and pedagogical guidelines, the application implements:
- Pure JFrame Architecture: Built exclusively using
JFramewindows (noJPanelcontainers used as top-level windows) to satisfy custom frame requirements. - Native Scrolling: Integrates
JScrollPanecomponents to enable smooth, native scrolling for tabular data and real-time server logs. - Premium Visuals: Features a custom Slate-Indigo Dark Theme with smooth hover micro-animations, custom input borders, and responsive grid layouts.
- Operating System Integration: Select any project in the table and click Open Local Path to open the project's folder in the OS File Explorer, or click Open GitHub to open the repository in the default web browser (using
java.awt.Desktopwith ProcessBuilder fallback).
- Strong Encapsulation: Clean separation of concerns between data models (
Project), business logic, and user interface frames. - Strategy Design Pattern: Implements polymorphic data repositories using the
ProjectDAOinterface. You can swap storage engines (File Serialization vs. JDBC Database) dynamically at runtime.
- TCP Client-Server Architecture: The server hosts a
ServerSocketthat accepts incoming socket connections. - Protocol Communication: The client connects via a standard TCP socket and transmits serializable message packets (
NetworkMessage) containing command tokens likeADD_PROJECT,UPDATE_PROJECT,DELETE_PROJECT,GET_ALL_PROJECTS, andSEARCH_PROJECTS.
- Server-Side Concurrency: The server runs a dedicated acceptor thread and spawns a new
ClientHandlerthread for every connected client socket, allowing multiple users to connect and collaborate concurrently. - Client-Side Responsiveness: Long-running socket actions (connection establishment, request transmissions, and listening for server updates) run on background threads, ensuring the Swing UI Event Dispatch Thread (EDT) never freezes.
- Data Synchronization: Thread-safe operations on the server protect the project list using synchronized blocks and thread-safe collections (
CopyOnWriteArrayList), and broadcast updates to all active clients in real-time.
- Out-of-the-box Storage: Uses Java Object Serialization to persist an
ArrayList<Project>to a local file (data/projects.dat) viaObjectOutputStreamandObjectInputStreamwith no database setup required.
- Relational Database Integration: Provides a full relational database repository (
JdbcProjectDAO) that connects to MySQL via standard JDBC. - SQL Safety & Execution: Uses parameterized **
PreparedStatement**s to run robust, injection-safe SQL statements and processes tables viaResultSet. - Auto-Schema Initialization: Automatically initializes and creates the SQL table structure if it is not present in the MySQL database.
ProjectManager/
βββ data/
β βββ projects.dat # Default file-based database (auto-created)
βββ src/
β βββ com/
β βββ projectmanager/
β βββ exception/
β β βββ ProjectException.java # Centralized custom exception
β βββ model/
β β βββ Project.java # Serializable Project entity
β βββ network/
β β βββ MessageType.java # Protocol command tokens
β β βββ NetworkMessage.java # Socket communication packet
β βββ repository/
β β βββ ProjectDAO.java # Persistence interface
β β βββ FileProjectDAO.java # Object serialization DAO
β β βββ JdbcProjectDAO.java # MySQL JDBC database DAO
β βββ server/
β β βββ ProjectServer.java # Multithreaded TCP Server socket
β β βββ ClientHandler.java # Dedicated socket worker thread
β βββ ui/
β βββ Theme.java # Central style, palette, and animations
β βββ ServerConsoleFrame.java # Server controller GUI
β βββ MainDashboardFrame.java # Client dashboard GUI
β βββ AddProjectFrame.java # Add/Edit project dialog form
βββ README.md
You can open this project directory directly in NetBeans IDE, IntelliJ IDEA, or Eclipse, and it will automatically detect the source structure.
Alternatively, compile from the command line using javac from your project root:
# Create bin directory for compiled class files
mkdir bin
# Compile all source files
javac -d bin src/com/projectmanager/model/*.java src/com/projectmanager/exception/*.java src/com/projectmanager/network/*.java src/com/projectmanager/repository/*.java src/com/projectmanager/server/*.java src/com/projectmanager/ui/*.javaThe server must be running before clients can connect. Start the Server Control Console first:
- In NetBeans / IDE: Right-click
ServerConsoleFrame.javaand choose Run File. - Command Line:
java -cp bin com.projectmanager.ui.ServerConsoleFrame
- Choose Storage Engine: Select File Serialization (works out-of-the-box) or MySQL Database (requires an active MySQL server).
- Configure Port: Set the port to listen on (default:
9999). - Database Settings (Optional): If using MySQL, input your database connection credentials.
- Start Server: Click Start Server. The console status will transition to ONLINE (green badge), and real-time logs will display in the console text area.
Once the server is online, start the Client Dashboard:
- In NetBeans / IDE: Right-click
MainDashboardFrame.javaand choose Run File. - Command Line:
java -cp bin com.projectmanager.ui.MainDashboardFrame
- Connection Indicator: Upon launch, the client will connect to
localhost:9999. A green CONNECTED badge will appear in the top right. - Add Project: Click Add Project to open the registration form. Use the Browse button to select a local folder directory. Input a GitHub link, description, and tags (e.g.,
Java, Swing, Sockets). Click Add Project to submit. - Real-time Synchronization: Open a second client instance simultaneously. Add or edit a project on one, and watch it synchronize instantly on the other window via the TCP socket connection!
- Search: Start typing in the search bar. The client will query the server on every keystroke, filtering the project list instantly.
- Open Folder / GitHub: Select any project in the table. Click Open Local Path to open the folder in Windows Explorer, or click Open GitHub to open the repository in your default browser.
- Delete Project: Select a project and click Remove Project to delete it.
If you wish to run in MySQL Database (JDBC) mode:
- Ensure you have a MySQL Server installed and running.
- Ensure you have the MySQL Connector jar (
mysql-connector-java.jar) added to your project's classpath in your IDE (under Project Properties -> Libraries). - The application will automatically connect to your MySQL host and execute the necessary
CREATE TABLEquery if the schema table does not exist.