Skip to content

A REST API for e-commerce applications, built with Spring Boot 3.2.2. This API provides essential features for managing products, customer wish lists, and sales analytics.

License

Notifications You must be signed in to change notification settings

syedabdullahrahman/e-commerce

Repository files navigation

Simple E-commerce REST API

Build and Test

Table of Contents

Technologies Used

  • Java 17
  • Spring Boot 3.2.2
  • Spring Data JPA
  • Hibernate
  • MySQL
  • Maven
  • Liquibase
  • OpenAPI
  • Docker
  • Spring Data REST
  • Test Containers
  • Prometheus
  • Grafana
  • Tempo

Features

  • Retrieve a customer's wish list.
  • Get the total sales amount for the current day.
  • Determine the maximum sales day within a specified time range.
  • Fetch the top N selling items of all time based on total sales amount.
  • Get the top N selling items of the last month based on the number of sales.
  • Integration Testing: Utilizes Test Containers for robust integration testing.
  • Observability: Integrated with Prometheus, Grafana, and Tempo for monitoring and observability of the application.

Getting Started

Prerequisites

Ensure you have the following installed:

  • Java 17+
  • Docker

Installation

Follow these steps to install and configure the project:

  1. Clone the repository.

    git clone https://github.com/syedabdullahrahman/e-commerce.git
  2. Navigate to the project directory.

  3. Build the project using Maven.

mvn clean install
  1. Run the application
java -jar target/demo-0.0.1-SNAPSHOT.jar

OR

Run the application using Docker Compose:

docker-compose up

Screenshots

  • OpenAPI or Swagger UI for testing API

Screenshot 1

  • Application HTTP requests metrics

Screenshot 2

  • Application overall metrics

Screenshot 3

Database Schema

The database schema is from MySQL Sample Database

Here is the schema diagram:

schema