1 / 10

EasyShop E-Commerce API

Backend Spring Boot API for Modern E-Commerce

Spring Boot Java MySQL JWT Auth RESTful API

YearUp Java Development Program - Capstone Project

2 / 10

Project Overview

EasyShop is a full-featured e-commerce backend API that powers an online shopping platform.

Key Features:

Project Goals:

3 / 10

Technical Architecture

Backend Technologies:

Spring Boot 2.7 Spring Security Spring Data JDBC MySQL Database JWT Authentication Maven

Architecture Pattern:

📁 Controllers (REST Endpoints)

📁 Service Layer (Business Logic)

📁 DAO Layer (Data Access Objects)

🗄️ MySQL Database

Security:

4 / 10

Development Phases

Phase 1: Categories

Implemented CRUD operations for product categories

  • GET all categories
  • GET category by ID
  • POST new category (Admin)
  • PUT update category (Admin)
  • DELETE category (Admin)

Phase 2: Bug Fixes

Fixed critical issues in product management

  • Fixed product search/filter bugs
  • Resolved duplicate product issue
  • Corrected SQL query parameters
  • Fixed update logic creating duplicates

Phase 3: Shopping Cart

Full shopping cart implementation

  • View cart contents
  • Add products to cart
  • Update product quantities
  • Remove products
  • Clear entire cart

Phase 4: User Profiles

Profile management endpoints

  • GET user profile
  • PUT update profile
  • Secure authentication required
  • Data validation
5 / 10

Live Demo - Setup

Prerequisites for Testing:

1. Start the Application:

Run EasyshopApplication.main() in IntelliJ

2. Login to Get Token:

POST /login
{ "username": "user", "password": "user" }

3. Copy the JWT Token from Response

4. Add to Authorization Header: Bearer Token

6 / 10

Demo: Categories API

Let's test the Categories endpoints:

GET /categories

Expected: List of all product categories

GET /categories/1

Expected: Single category details

POST /categories (Admin only)
{ "name": "Books", "description": "All kinds of books" }
7 / 10

Demo: Shopping Cart API

Shopping Cart Operations:

GET /cart

View current cart (should be empty initially)

POST /cart/products/1

Add product ID 1 to cart

PUT /cart/products/1
{ "quantity": 3 }

Update quantity to 3

DELETE /cart/products/1

Remove product from cart

8 / 10

Demo: User Profile API

Profile Management:

GET /profile

Get current user's profile information

PUT /profile
{ "firstName": "John", "lastName": "Doe", "phone": "555-1234", "email": "john.doe@example.com", "address": "123 Main St", "city": "New York", "state": "NY", "zip": "10001" }

Update profile information

9 / 10

Challenges & Solutions

🔧 Challenge 1: Product Search Bug

🔧 Challenge 2: Duplicate Products on Update

🔧 Challenge 3: Shopping Cart State Management

🔧 Challenge 4: Security Implementation

10 / 10

Project Complete! 🎉

Achievements:

  • Fixed all identified bugs
  • Implemented full shopping cart functionality
  • Added user profile management
  • Secured all endpoints with JWT
  • Created comprehensive test suite

Future Enhancements:

  • Order processing and checkout
  • Payment integration
  • Product reviews and ratings
  • Email notifications

Questions?