You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E-commerce Backend built with Java Spring Boot, MySQL, Spring Security & JWT
I built this project to deepen my understanding of how to develop a professional backend using Java Spring Boot. In my university courses, I learned Java, but not how to create production-ready REST APIs or implement role-based authentication with Spring Security and JWT. This project also helped me refresh my skills in designing relational databases with MySQL.
Complete Tech Stack
Java 17+
Spring Boot
Spring Data JPA (Hibernate)
Spring Security
Spring Web
JWT Authentication
MySQL Database
Maven
Lombock
Postman for API Testing
Java Spring Boot Architecture (Controller -> Service -> Repository -> Model, Dto's )
Features Summary
CRUD for Products and Categories
Cart Management (each User has 1 cart and can add, remove and update items)
Order Management and Checkout
JWT-based Login and Authorization
Role-Based API Security with Spring Security & JWT
Deeply understand the Spring Boot backend architecture.
Build a fully functional REST API using best practices.
Learn Spring Security and JWT authentication hands-on.
Strengthen my understanding of JPA relationships and DTO patterns.
Gain confidence in building real-world backend applications.
How to Run the Project
Clone repo
Update your resources/application.properties, example structure from my project:
spring.application.name=shoppingCartBackend
spring.datasource.url=jdbc:mysql://localhost:3306/shoppingdb
spring.datasource.username=shoppinguser
spring.datasource.password=password123
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
##update = database is saved
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
##To show database in terminal
spring.jpa.properties.hibernate.format_sql=true
api.prefix=/api/v1
spring.servlet.multipart.max-file-size=5MB
spring.servlet.multipart.max-request-size=5MB
## 1 hour
auth.token.expirationInMils=3600000
auth.token.jwtSecret=YOUR_JWT_SECRET
Run the project
mvn spring-boot:run
Test the API using Postman
About
E-commerce Backend built with Java Spring Boot, MySQL, Spring Security & JWT. I built this project to deepen my understanding of how to develop a professional backend using Java Spring Boot.