A desktop-based e-commerce management system built with Java Swing, featuring separate interfaces for administrators and customers.
This application provides a complete e-commerce solution with inventory management, user authentication, shopping cart functionality, and purchase history tracking. The system supports two user roles: administrators who manage products and view analytics, and customers who can browse, purchase, and review products.
- User registration and authentication
- Product browsing by category
- Search functionality
- Shopping cart management
- Purchase history tracking
- Product review and comments
- Profile management
- Password recovery
- Product inventory management (add, update, delete)
- Customer account overview
- Purchase history monitoring
- Product review moderation
- Category-based product organization
- Language: Java
- GUI Framework: Java Swing with FlatLaf Look and Feel
- Database: MySQL 8.x
- JDBC Driver: MySQL Connector/J 8.1.0
- PDF Generation: iText
- Build Tool: Apache Ant (NetBeans)
- Java Development Kit (JDK) 11 or higher
- MySQL Server 8.0 or higher
- MySQL Connector/J 8.1.0
- NetBeans IDE (recommended) or any Java IDE
-
Start your MySQL server
-
Run the database schema script:
mysql -u root -p < database_schema.sql-
The script will create two databases:
credentials- User authentication and purchase recordsshop- Product inventory and catalog
-
Default credentials:
- Admin: username
admin, passwordadmin123 - Test Customer: username
testuser, passwordtest123
- Admin: username
-
Clone or download this repository
-
Configure database connection:
- Update credentials in
DatabaseConnection.javaif needed - Default:
localhost:3306, user:root, password:your_password
- Update credentials in
-
Add MySQL Connector JAR to project libraries:
- Path:
F:\Important Softwares\mysql-connector-j-8.1.0\mysql-connector-j-8.1.0.jar - Or update the path in
nbproject/project.properties
- Path:
-
Open the project in NetBeans
-
Build and run the project
- Register a new account or login with existing credentials
- Browse products by category or search by name
- Add items to cart with desired quantity
- Complete purchase and generate receipt
- View purchase history and manage profile
- Login with admin credentials
- Manage product inventory
- Monitor customer purchases
- View and moderate product reviews
adminlogin- Administrator credentialscustomerlogin- Customer profiles and authenticationcomments- Product reviewspurchasehistory- Transaction records
shopitems- Product catalog with pricing and inventory