Skip to content

An e commerce web application for purchase health and wellness products online. Backend follows microservice architecture using spring boot along with mongo db. Front end is built using react js.

Notifications You must be signed in to change notification settings

DharshiBalasubramaniyam/Fullstack-E-commerce-web-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌟 PURELY - E commerce web application 🌟

Static Badge Static Badge Static Badge Static Badge Static Badge

Table of content

  1. Architecture Diagram
  2. Project Description
  3. How to Run?
  4. Screenshots

Microservice architecture diagram

purely_archi

Project Description

Features

  • This is an e-commerce web application, a platform dedicated to health and wellness products using Microservice architecture pattern.

  • Secure authentication and authorization functionalities using Spring Security and JWT. Integrated email verification during sign-up.

  • Comprehensive product and category data management, including adding, editing, viewing, and searching.

  • Intuitive interface allowing users to easily search and browse products, manage shopping carts, update quantities, and proceed through checkout.

  • Enabled users to view order history and status, coupled with automated order confirmation emails.

  • Offered users to pay upon delivery.

Service Registry

The Service Registry serves as a centralized repository for storing information about all the available services in the microservices architecture.

This includes details such as IP addresses, port numbers, and other metadata required for communication.

As services start, stop, or scale up/down dynamically in response to changing demand, they update their registration information in the Service Registry accordingly.

API Gateway

The API gateway acts as a centralized entry point for clients, providing a unified interface to access the microservices.

API gateway acts as the traffic cop of our microservices architecture. It routes incoming requests to the appropriate microservice, or instance based on predefined rules or configurations.

Auth Service

The Auth Service is responsible for securely verifying user identities and facilitating token-based authentication.

HTTP Method Route Path Parameters Description
Static Badge /auth/signin - User login
Static Badge /auth/signup - User registration
Static Badge /auth/signup/verify code Validate registration one time password code
Static Badge /auth/isValidToken token Validate json web token

Category Service

The Category Service provides centralized data management and operations for product categories.

HTTP Method Route Path Parameters Description Authentication Role
Static Badge /admin/category/create - Create new category Yes Admin
Static Badge /admin/category/edit categoryId Edit existing category Yes Admin
Static Badge /admin/category/delete categoryId Delete existing category Yes Admin
Static Badge /category/get/all - Get all categories No Admin/User/Non user
Static Badge /category/get/byId categoryId Get category by id No Admin/User/Non user

Product Service

The Product Service provides centralized data management and operations for available products.

HTTP Method Route Path Parameters Description Authentication Role (Admin/User)
Static Badge /admin/product/add - Create new product Yes Admin
Static Badge /admin/product/edit productId Edit existing product Yes Admin
Static Badge /product/get/all - Get all products No Admin/User/Non user
Static Badge /product/get/byId productId Get product by id No Admin/User/Non user
Static Badge /product/get/byCategory categoryId Get product by category No Admin/User/Non user
Static Badge /product/search searchKey Search products by key No Admin/User/Non user

Cart Service

The Cart Service provides centralized data management and operations for user carts.

HTTP Method Route Path Parameter Description Authentication Role (Admin/User)
Static Badge /cart/add - Add item to cart, update quantity Yes User
Static Badge /cart/get/byUser - Get cart details by user Yes User
Static Badge /cart/get/byId cartId Get cart details by cart id Yes User
Static Badge /cart/remove productId Remove an item from the cart Yes User
Static Badge /cart/clear/byId cartId Remove all the items from the cart Yes User

Order Service

The Order Service provides centralized data management and operations for orders.

HTTP Method Route Path Parameter Description Authentication Role (Admin/User)
Static Badge /order/create - Place an order Yes User
Static Badge /order/get/byUser - Get orders by user Yes User
Static Badge /order/get/all - Get all orders Yes Admin
Static Badge /order/cancel orderId Cancel the order Yes User

Notification Service

The Notification Service provides centralized operations for send emails to user.

HTTP Method Route Path Description
Static Badge /notification/send Send email

Communication between services

OpenFeign, a declarative HTTP client library for Java is used to simplify the process of making HTTP requests to other microservices.

How to run?

📍Step 1: Fork and Clone the Repository

  1. Fork the repository to your GitHub account.

  2. Clone the forked repository to your local machine.

git clone https://github.com/<your-username>/Fullstack-E-commerce-web-application

📍Step 2: Setting up databases.

Create the following databases in MongoDB:

  • purely_auth_service
  • purely_category_service
  • purely_product_service
  • purely_cart_service
  • purely_order_service

You can find sample data for products and categories to get started here.

📍Step 3: Setting up e-mail configurations

In the notification-service, configure the following credentials in the application.properties file to enable email sending functionality:

spring.mail.username=YOUR_USERNAME
spring.mail.password=YOUR_PASSWORD

Replace YOUR_USERNAME and YOUR_PASSWORD with your actual email service credentials.

📍Step 4: Run the microservices.

  1. First run service-registry. Access the Eureka dashboard at http://localhost:8761.

  2. Run the other services. Make sure all the services are up and running in the Eureka Dashboard.

Screenshot 2025-01-01 182328

📍Step 5: Run the frontend

  1. Navigate to frontend direcory.
cd ./frontend
  1. Install dependencies.
npm install
  1. Run the app.
npm run dev

Access the application at http://localhost:5173/

Screenshots

Screenshot 2024-05-07 194247

Screenshot 2024-05-07 194417

Screenshot 2024-05-07 195308

Screenshot 2024-05-07 195844

Screenshot 2024-05-07 200130

Screenshot 2024-05-07 200627

Screenshot 2024-05-07 200748

Screenshot 2024-05-08 154953

About

An e commerce web application for purchase health and wellness products online. Backend follows microservice architecture using spring boot along with mongo db. Front end is built using react js.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published