A Spring Boot based shopping cart application with secure APIs for managing carts, items, and orders.
Here is how Cartify looks in action:
- Cartify is a RESTful shopping cart service built using Spring Boot and JPA.
- It provides APIs to manage products, carts, and orders.
- Backend: Spring Boot, Spring Data JPA, Hibernate
- Database: MySQL (or H2 for testing)
- Build Tool: Maven
- Language: Java 21+
- Lombok → Reduces boilerplate code using annotations like
@Getter,@Setter,@AllArgsConstructor, etc. - ModelMapper → Simplifies conversion between Entities and DTOs.
- Hibernate → ORM for database interaction.
✅ Create & manage shopping carts of unique users
✅ Add / update / remove items from cart
✅ Place an order with total amount calculation
✅ Exception handling & validations with GlobalExceptionHandler
✅ Secure endpoints with authentication & authorization
- │── controller/ → REST Controllers
- │── model/ → Entities (Category , Cart, CartItem, Product, Order , OrderItems , User)
- │── repository/ → JPA Repositories
- │── service/ → Business Logic Layer
- │── request/ → Request Objects
- │── dto/ → Data Transfer Objects
- │── security/ → ShopConfig
- Clone the repository to your local machine:
git clone https://github.com/Kaif-Nazir/Cartify.git
cd Cartify- Create a database named
shoppingcartin MySQL. - Update
application.propertieswith your username and password.
mvn clean install
mvn spring-boot:run
