The purpose of this repository is to use Java, Spring Boot, MySQL, Spring Security with JWT Authentication to create a basic e-commerce backend app.
Backend
Backend: Not Deployed
Click Me To Watch Video Presentation
- Register a new User and log in to get JWT Token
- Add product to Cart and remove item from Cart
- Retrieve products from Cart
- Admin register, Log In to get JWT Token
- Add product in database
- Considered a small level application
- Download or clone the repositor using ``
- Create Database ecommerce_xindus using
CREATE DATABASE ecommerce_db
- Set username, password, url in application.properties file.
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/ecommerce_db
spring.datasource.username=yourUsernameMYSQL
spring.datasource.password=yourPassword
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
- Open ecommerce directory with STS/Intellij and start the app
GET /api/cart - retrieve user's cart products 🔐
POST /api/cart - create a new cartItem 🔐
PATCH /api/cart/{id} - update cart item 🔐
DELETE /api/cart/{id} -remove cart item by id 🔐
GET /api/users/signIn - sign In to get token 🔐
POST /api/users - create new User
POST /api/admin/products - create new product 🔐
POST /api/admin - create new Admin
GET /api/products - retrieve all products
GET /api/products/{id} - retrieve product by id
GET /api/categories - Retrieve all categories
POST /api/orders - create a new Order 🔐
GET /api/orders - retrieve all orders made by user (i.e order history) 🔐
GET /api/orders/{id} - retrieve order detail 🔐
GET /api/orders/{id}/payment - retrieve URL to make payment
GET /api/orders/ 🔐
- Java
- Spring Boot
- MySQL
- Spring Security with JWT Token
- Git
- I have provided the json file of my postman collection at root folder of repository so if you are running locally you can use that by importing option that is available on postman.
- Don't forget to change Environment variables in postman collection while using. :JSON POSTMAN COLLECTION