This project is a simple shopping cart example built with Spring Boot and Redis. The project allows users to add products to the cart, perform stock checks, and view the contents of their cart.
- Add products for users
- Stock check
- View user's cart
- Spring Boot
- Redis
- Docker
To run the project on your local machine, follow these steps.
- Java 11 or higher
- Maven
- Docker
- Clone the project:
git clone https://github.com/ardasdasdas/redis-shopping-cart.git
- Navigate to the project directory:
cd redis-shopping-cart
- Start Redis and Redis Insight containers with Docker Compose:
docker-compose up
- Run the Spring Boot application:
mvn spring-boot:run
POST http://localhost:8080/v1/cart-api/product/add Content-Type: application/json
POST http://localhost:8080/v1/cart-api/product/add-all Content-Type: application/json
POST http://localhost:8080/v1/cart-api/cart/add/{{userId}}/{{productId}} Content-Type: application/x-www-form-urlencoded