Skip to content

prashantjain2718/ProjectManagementSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Custom Project Manager

Java Version GUI Database Architecture

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).


πŸ“₯ Download Installer

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).


🌟 Key Highlights & Design Constraints

To satisfy strict desktop application design and pedagogical guidelines, the application implements:

  • Pure JFrame Architecture: Built exclusively using JFrame windows (no JPanel containers used as top-level windows) to satisfy custom frame requirements.
  • Native Scrolling: Integrates JScrollPane components 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.Desktop with ProcessBuilder fallback).

πŸ› οΈ Technical Features & Syllabus Coverage

1. Object-Oriented Programming (OOP)

  • 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 ProjectDAO interface. You can swap storage engines (File Serialization vs. JDBC Database) dynamically at runtime.

2. Networking & Socket Programming

  • TCP Client-Server Architecture: The server hosts a ServerSocket that accepts incoming socket connections.
  • Protocol Communication: The client connects via a standard TCP socket and transmits serializable message packets (NetworkMessage) containing command tokens like ADD_PROJECT, UPDATE_PROJECT, DELETE_PROJECT, GET_ALL_PROJECTS, and SEARCH_PROJECTS.

3. Multithreading & Thread Safety

  • Server-Side Concurrency: The server runs a dedicated acceptor thread and spawns a new ClientHandler thread 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.

4. File I/O & Object Serialization

  • Out-of-the-box Storage: Uses Java Object Serialization to persist an ArrayList<Project> to a local file (data/projects.dat) via ObjectOutputStream and ObjectInputStream with no database setup required.

5. Database Programming (MySQL & JDBC)

  • 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 via ResultSet.
  • Auto-Schema Initialization: Automatically initializes and creates the SQL table structure if it is not present in the MySQL database.

πŸ“‚ Project Structure

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

πŸš€ How to Compile and Run

1. Compile the Code

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/*.java

2. Run the Server Console

The server must be running before clients can connect. Start the Server Control Console first:

  • In NetBeans / IDE: Right-click ServerConsoleFrame.java and choose Run File.
  • Command Line:
    java -cp bin com.projectmanager.ui.ServerConsoleFrame

Using the Server Console:

  1. Choose Storage Engine: Select File Serialization (works out-of-the-box) or MySQL Database (requires an active MySQL server).
  2. Configure Port: Set the port to listen on (default: 9999).
  3. Database Settings (Optional): If using MySQL, input your database connection credentials.
  4. 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.

3. Run the Client Dashboard

Once the server is online, start the Client Dashboard:

  • In NetBeans / IDE: Right-click MainDashboardFrame.java and choose Run File.
  • Command Line:
    java -cp bin com.projectmanager.ui.MainDashboardFrame

Using the Client Dashboard:

  • 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.

πŸ—„οΈ Database Setup (Optional for JDBC Mode)

If you wish to run in MySQL Database (JDBC) mode:

  1. Ensure you have a MySQL Server installed and running.
  2. Ensure you have the MySQL Connector jar (mysql-connector-java.jar) added to your project's classpath in your IDE (under Project Properties -> Libraries).
  3. The application will automatically connect to your MySQL host and execute the necessary CREATE TABLE query if the schema table does not exist.

About

A multithreaded TCP client-server Project Management System in Core Java. Features a custom Slate-Indigo Swing GUI, real-time client synchronization, and dual-storage persistence (Java Serialization & MySQL JDBC). Satisfies core OOP, concurrent threads, socket networking, and relational database programming benchmarks.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors