This Java project implements an Online Shopping Management System with a client-server architecture. Users can add products to their cart, view the cart, and submit orders. The system uses JavaFX for the client-side GUI and MySQL for the server-side database.
-
Clone the repository:
git clone https://github.com/aspo29/JavaProject.git cd JavaProject -
Compile the project:
javac -d bin src/*/*.java
-
Run the server:
java com.example.onlineshopingmanagementsystem.project.serverside.Main
-
Run the client:
java com.example.onlineshopingmanagementsystem.project.clientside.Main
.
├── bin # Compiled bytecode
├── lib # Jar files
└── src
├── client # Client-side implementation
├── server # Server-side implementation
├── messages # Serializable classes for client-server communication
└── utils # Common classes for client and server
The Main class on the server side serves as the entry point for starting the server.
The ServerSockets class handles incoming client connections, creates a ClientHandler for each connected client, and manages the list of connected clients.
The ClientHandler class handles communication with individual clients. It implements the Runnable interface for concurrent handling of multiple clients.
The ServerData class performs database operations on the server side, including saving products, retrieving all products, deleting all data, and submitting orders.
The Main class on the client side serves as the entry point for starting the JavaFX application.
The ClientGUI class implements the JavaFX application for the client. It allows users to add products to their cart, view the cart, and submit orders.
The ClientSocket class handles communication with the server. It establishes a connection, sends data, and receives data from the server.
-
Start the server using the
Mainclass on the server side. -
Start the client using the
Mainclass on the client side. -
Use the client GUI to interact with the Online Shopping Management System.
This project is licensed under the MIT License. © Aashutosh Poudel, 2024.