Skip to content

sapazutku/ShoppingCart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shopping Cart

Contents

Installation

Prerequisites

  • Java 17
  • Maven 3.9.4

Clone

Clone or download this repository to your local machine.

git clone 'https://github.com/DevelopmentHiring/UtkuSapaz.git'

Open the project in your IDE.

Docker

You can run the project with Docker.

docker build -t shoppingcart .
docker run -p 8080:8080 shoppingcart

Usage

Endpoints

Action 1 - Add Product to Cart

POST http://localhost:8080/cart/add/item

Body

{ "itemId":123, "categoryId":3003, "sellerId":33, "price":2500, "quantity":2 }

Action 2 - Add VasItem to Item

POST http://localhost:8080/cart/add/vasitem

Body

{"itemId": 123, "vasItemId":2, "categoryId": 3242, "sellerId":5003, "price":5, "quantity":2}

Action 3 - Remove Item from Cart

DELETE http://localhost:8080/cart/remove/item

Body

{ "itemId":123 }

Action 4 - Reset Cart

DELETE http://localhost:8080/cart/reset

Action 5 - Display Cart

GET http://localhost:8080/cart

Architecture

Used DDD Clean Architecture. img.png The file architecture was created using this article and video: Medium Article || Steve Pember @ Spring I/O 2023 Conference

Technologies

  • Java 17
  • Spring Boot 3.5.1
  • Spring Data JPA
  • H2 Database
  • Docker

About

Example Shopping Cart Spring Boot Application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published