Skip to content

sejaludmale/Ecommerce_system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

E-Commerce System

A Java + MySQL based E-Commerce Application that simulates real-world online shopping operations. This system supports user and seller modules, product management, cart functionality, and order processing with real-time inventory updates.


Features

User Module

  • User Registration & Login
  • Last Login Tracking
  • View Available Products
  • Add Products to Cart
  • View Cart with Item-wise Billing
  • Place Orders

Seller Module

  • Seller Registration
  • Add Products
  • View Own Products

Product Management

  • Product Listing with Category, Price, and Stock
  • Real-time Inventory Updates after Order

Cart & Order System

  • Add Multiple Items to Cart
  • Item-wise Total Calculation
  • Final Order Processing
  • Stock Validation Before Purchase
  • Automatic Cart Clearance After Order

Demo Output


╔══════════════════════════════════════╗
║        🛒 E-COMMERCE SYSTEM         ║
╠══════════════════════════════════════╣
║ 1. 👤 User Login                    ║
║ 2. 🏪 Seller Login                  ║
║ 3. 📝 Register User                 ║
║ 4. 🏬 Register Seller               ║
║ 5. ❌ Exit                          ║
╚══════════════════════════════════════╝
👉 Enter choice: 3
Name: Ankit More
Email: ankit@gmail.com
Password: 0000
✔ User Registered!

╔══════════════════════════════════════╗
║        🛒 E-COMMERCE SYSTEM         ║
╠══════════════════════════════════════╣
║ 1. 👤 User Login                    ║
║ 2. 🏪 Seller Login                  ║
║ 3. 📝 Register User                 ║
║ 4. 🏬 Register Seller               ║
║ 5. ❌ Exit                          ║
╚══════════════════════════════════════╝
👉 Enter choice: 4
Enter your email: Ankit More
User not found!

╔══════════════════════════════════════╗
║        🛒 E-COMMERCE SYSTEM         ║
╠══════════════════════════════════════╣
║ 1. 👤 User Login                     ║
║ 2. 🏪 Seller Login                  ║
║ 3. 📝 Register User                 ║
║ 4. 🏬 Register Seller               ║
║ 5. ❌ Exit                          ║
╚══════════════════════════════════════╝
👉 Enter choice: 4
Enter your email: ankit@gmail.com
Shop name: Reading Zone
✔ Seller Registered!

╔══════════════════════════════════════╗
║        🛒 E-COMMERCE SYSTEM         ║
╠══════════════════════════════════════╣
║ 1. 👤 User Login                    ║
║ 2. 🏪 Seller Login                  ║
║ 3. 📝 Register User                 ║
║ 4. 🏬 Register Seller               ║
║ 5. ❌ Exit                          ║
╚══════════════════════════════════════╝
👉 Enter choice: 2
Email: ankit@gmail.com

1 Add Product
2 View My Products
3 Logout
1
Name: Yayati(V.S Khandekar)
Category: Marathi Novel
Price: 250
Stock: 50
✔ Product Added!

1 Add Product
2 View My Products
3 Logout
1
Name: The Secret of Nagas(Amish)
Category: English Novel
Price: 30
Stock: 10
✔ Product Added!

1 Add Product
2 View My Products
3 Logout
2
Yayati(V.S Khandekar)
The Secret of Nagas(Amish)

1 Add Product
2 View My Products
3 Logout
3

╔══════════════════════════════════════╗
║        🛒 E-COMMERCE SYSTEM         ║
╠══════════════════════════════════════╣
║ 1. 👤 User Login                    ║
║ 2. 🏪 Seller Login                  ║
║ 3. 📝 Register User                 ║
║ 4. 🏬 Register Seller               ║
║ 5. ❌ Exit                          ║
╚══════════════════════════════════════╝
👉 Enter choice: 1
Email: ankit@gmail.com
Password: 0000
✔ Welcome Ankit More
🕒 First Login!

1 View Products
2 Add to Cart
3 View Cart
4 Place Order
5 Logout
1

📦 AVAILABLE PRODUCTS
────────────────────────────────────────────────────────
ID    Name                 Category        Price      Stock     
────────────────────────────────────────────────────────
1     Laptop               Electronics     ₹55000.00  9         
2     Mouse                Electronics     ₹500.00    50        
3     Lakme LIpstick       beauty product  ₹500.00    23        
4     Flicka Foundation    beauty product  ₹300.00    20        
5     Yayati(V.S Khandekar) Marathi Novel   ₹250.00    50        
6     The Secret of Nagas(Amish) English Novel   ₹30.00     10        
────────────────────────────────────────────────────────

1 View Products
2 Add to Cart
3 View Cart
4 Place Order
5 Logout
2
Product ID: 6
Quantity: 1
✔ Added to cart!

1 View Products
2 Add to Cart
3 View Cart
4 Place Order
5 Logout
3

🛒 YOUR CART
────────────────────────────────────────────
Product         Price      Qty        Total     
────────────────────────────────────────────
The Secret of Nagas(Amish) ₹30.00     1          ₹30.00     
────────────────────────────────────────────
Total Amount: ₹30.0

1 View Products
2 Add to Cart
3 View Cart
4 Place Order
5 Logout
4
🎉 Order placed! Total ₹30.0

1 View Products
2 Add to Cart
3 View Cart
4 Place Order
5 Logout
1

📦 AVAILABLE PRODUCTS
────────────────────────────────────────────────────────
ID    Name                 Category        Price      Stock     
────────────────────────────────────────────────────────
1     Laptop               Electronics     ₹55000.00  9         
2     Mouse                Electronics     ₹500.00    50        
3     Lakme LIpstick       beauty product  ₹500.00    23        
4     Flicka Foundation    beauty product  ₹300.00    20        
5     Yayati(V.S Khandekar) Marathi Novel   ₹250.00    50        
6     The Secret of Nagas(Amish) English Novel   ₹30.00     9         
────────────────────────────────────────────────────────

1 View Products
2 Add to Cart
3 View Cart
4 Place Order
5 Logout
5

╔══════════════════════════════════════╗
║        🛒 E-COMMERCE SYSTEM         ║
╠══════════════════════════════════════╣
║ 1. 👤 User Login                    ║
║ 2. 🏪 Seller Login                  ║
║ 3. 📝 Register User                 ║
║ 4. 🏬 Register Seller               ║
║ 5. ❌ Exit                          ║
╚══════════════════════════════════════╝
👉 Enter choice: 5
👋 Exiting...


##  Tech Stack

* **Language:** Java
* **Database:** MySQL
* **Connectivity:** JDBC
* **Interface:** Console-based

---

##  Setup Instructions

### 1️⃣ Clone the Repository

```bash id="clone01"
git clone https://github.com/your-username/ecommerce-management-system.git

2️⃣ Create Database

CREATE DATABASE ecommerce1;
USE ecommerce1;

3️⃣ Create Tables

CREATE TABLE users (
    user_id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100),
    email VARCHAR(100),
    password VARCHAR(100),
    last_login TIMESTAMP
);

CREATE TABLE sellers (
    seller_id INT AUTO_INCREMENT PRIMARY KEY,
    user_id INT,
    shop_name VARCHAR(100),
    FOREIGN KEY (user_id) REFERENCES users(user_id)
);

CREATE TABLE products (
    product_id INT AUTO_INCREMENT PRIMARY KEY,
    seller_id INT,
    product_name VARCHAR(100),
    product_category VARCHAR(100),
    price DOUBLE,
    stock_quantity INT,
    FOREIGN KEY (seller_id) REFERENCES sellers(seller_id)
);

CREATE TABLE cart (
    cart_id INT AUTO_INCREMENT PRIMARY KEY,
    user_id INT,
    product_id INT,
    quantity INT,
    FOREIGN KEY (user_id) REFERENCES users(user_id),
    FOREIGN KEY (product_id) REFERENCES products(product_id)
);

4️⃣ Configure Database in Code

static final String URL = "jdbc:mysql://localhost:3306/ecommerce1";
static final String USER = "root";
static final String PASS = "your_password";

5️⃣ Run the Application

  • Compile EcommerceApp.java
  • Run the program
  • Interact via console

Key Concepts Used

  • Object-Oriented Programming (OOP)
  • JDBC (Java Database Connectivity)
  • SQL (CRUD Operations)
  • Exception Handling
  • Modular Programming

Future Enhancements

  • Order History Tracking
  • Payment Gateway Integration
  • Admin Panel
  • Password Encryption
  • GUI / Web Version

Author

Developed as a dbms based project.


About

A Java and MySQL based e-commerce management system featuring user and seller modules, product handling, cart functionality, and order processing with real-time inventory updates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages