Skip to content

Nadim-Mahmud/online-store

Repository files navigation

Online Store (Multivendor E-commerce Website)

Live Serverd

The application is deployed and running at: https://online-store-49w9.onrender.com/

Overview

This is an Online Store web application built using Java and the Spring Framework. The application provides functionality for customers, shopkeepers, and delivery personnel to interact with the system. It follows a layered architecture with controllers, services, DAOs, and entities. The frontend is implemented using JSP, while the backend leverages Spring MVC and Hibernate. The database is hosted on Aiven PostgreSQL for reliable cloud-based storage.

Setup Instructions

Installation

  1. Clone the repository:

    git clone git@github.com:Nadim-Mahmud/online-store.git
    cd online-store
  2. Build the project using Gradle:

    gradle clean build
  3. Start the application using Docker (Tomcat container):

    docker compose up tomcat
  4. Access the application at:

    http://localhost:8080
    

Workflow

Admin

  • Can create and manage all user accounts (Admin, Shopkeeper, Deliveryman, User).
  • Can add categories, tags, and items to the store.
  • Has full control over store configuration.

Shopkeeper

  • Can view orders placed by users.
  • Approves orders if they are valid and items are available.
  • Cancels orders if they cannot be processed.

Deliveryman

  • Views orders approved by Shopkeepers.
  • Updates delivery status by delivering items or canceling delivery if necessary.

User

  • Can browse available items by category, tag, or search.
  • Places orders for desired items.
  • Tracks the status of their orders (Pending, Approved, Delivered, Canceled).

Default Credentials

The application comes with pre-configured users for testing:

  • Admin: ndm@gmail.com / ndm123
  • User: us@gmail.com / ndm123
  • Shopkeeper (example): sk@gmail.com / ndm123
  • Deliveryman (example): dm@gmail.com / ndm123

Note: Multiple Shopkeepers and Deliverymen can be created by the Admin.

Features

User Authentication and Role Management

  • Secure login and registration system.
  • Role-based authentication for customers, shopkeepers, and delivery personnel.
  • Profile management with password updates and personal details.

Product and Category Management

  • Shopkeepers can add, update, and remove products.
  • Products can be categorized for easy navigation.
  • Customers can browse and filter products by category and tags.

Order Management

  • Customers can place orders and provide delivery details.
  • Shopkeepers can process and manage incoming orders.
  • Delivery personnel can track and update order statuses.

Shopping Cart and Checkout

  • Customers can add items to the cart before proceeding to checkout.
  • Order summary is displayed before final confirmation.
  • Secure payment processing integration (future scope).

Validation and Exception Handling

  • Input validation for user registration, order details, and form submissions.
  • Custom exception handling for better error management.

Security and Encryption

  • Secure password storage using encryption.
  • Protection against common web vulnerabilities (e.g., SQL injection, CSRF, XSS).
  • Role-based access control to prevent unauthorized actions.

Technologies Used

  • Backend: Java, Spring MVC, Hibernate
  • Frontend: JSP, JavaScript, CSS
  • Database: PostgreSQL hosted on Aiven
  • Build Tool: Gradle
  • Containerization: Docker, Tomcat
  • Security: Encryption utilities, authentication filters

Project Structure

Project Structure

.
├── README.md
├── build.gradle
├── settings.gradle
├── db-migration (Database migration scripts)
│   ├── dml.sql
│   └── pre-ddl.sql
├── src
│   ├── main
│   │   ├── java
│   │   │   └── net.therap.onlinestore
│   │   │       ├── controller (Handles HTTP requests)
│   │   │       ├── entity (Database entities)
│   │   │       ├── service (Business logic implementation)
│   │   │       ├── exception (Custom exception handling)
│   │   │       ├── filter (Authentication and request filters)
│   │   │       ├── helper (Utility classes for various functions)
│   │   │       ├── validator (Input validation rules)
│   │   ├── resources
│   │   │   ├── application.properties (Configuration settings)
│   │   │   ├── log4j.properties (Logging configuration)
│   │   │   ├── messages.properties (Internationalization support)
│   │   │   ├── META-INF/persistence.xml (Database configuration)
│   │   ├── webapp
│   │       ├── WEB-INF (Spring MVC and JSP configuration)
│   │       ├── assets (CSS, JavaScript, and images)

About

Web page for a shop using Java Spring

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages