Skip to content

Darshxx13/AmazLite-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🛒 AmazLite – Java E-Commerce Platform

AmazLite is a multi-threaded, client–server e-commerce platform built entirely in Java. It simulates a mini version of Amazon, supporting product listings, cart management, order validation, seller/customer roles, and persistent data storage through CSV files.

This project demonstrates full-stack Java development, combining networking, concurrency, GUI design, and file I/O, all structured in clean, object-oriented architecture.

login Market Product Cart Checkout review Seller Screenshot 2025-10-16 at 4 39 52 PM Screenshot 2025-10-16 at 4 39 28 PM

Highlights

  1. Thread-Safe Backend: Multi-threaded server (MarketServer + MarketThread) handles concurrent client connections safely.
  2. Dual Roles: Sellers can manage stores and inventory; customers can browse, shop, and checkout.
  3. GUI + CLI Clients: Modern Java Swing GUI (GuiClient) and a lightweight command-line interface.
  4. Persistent Storage: FileIO stores all users, stores, and products in CSV format for easy recovery.
  5. Custom Exceptions: Includes MaximumQuantityReached and NameExists for enforcing business rules.
  6. Modular Architecture: Separation of concerns across layers for scalability and maintainability.

How to Run the Project

1 – Compile all source files
javac *.java

2 – Start the Server
java MarketServer
The server runs on port 5555 by default.

3 – Launch a Client
java GuiClient

4 – Connect
Host 127.0.0.1
Port 5555
Then register or log in as a Customer or Seller to begin using the marketplace!

File Overview

File Description
Main.java: Entry point for the project, initializes core components.
Market.java: Thread-safe in-memory data store managing users, stores, and products.
MarketServer.java: Server entry point; listens for incoming socket connections.
MarketThread.java: Manages communication with each client in its own thread.
MarketApi.java: Defines the request/response protocol between client and server.
GuiClient.java: Swing-based GUI for customers and sellers.
BrowseMarket.java: Command-line client for quick testing and browsing.
FileIO.java: Handles CSV-based reading and writing of user, store, and product data.
Product.java: Represents products (name, price, stock, quantity in carts, etc.).
Store.java: Represents stores managed by sellers.
User.java: Base class for both sellers and customers.
Seller.java: Extends User; adds store and product management functions.
Customer.java: Extends User; adds cart and purchase functionality.
MaximumQuantityReached.java: Exception for enforcing order quantity limits.
NameExists.java: Exception for handling duplicate user or store names.

Thread-Safety Highlights
Shared resources (e.g., carts, stores, products) are protected using ConcurrentHashMap and synchronized methods.
Each client is assigned to its own thread (MarketThread) for isolated communication.
Stock and cart operations are validated atomically to prevent race conditions.

Author
Raja Darshini Rajamani
📧 darshinirajamani@gmail.com
🌐 darshinirajamani.com
💻 GitHub Darshxx13

Acknowledgements
This project was developed to explore networked software design, concurrency, and data persistence in Java.
It demonstrates end-to-end system design, from backend multithreading to GUI interface and serves as a foundation for future scalable marketplace applications.

About

A full-stack, multi-threaded e-commerce platform built entirely in Java. Includes a socket-based server, thread-safe backend, and Swing GUI client for customers and sellers with CSV data persistence.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages