Final Project
Final Project
Submitted By:
Name: Vishnu
1. Introduction
E-commerce applications have revolutionized how we buy and sell products. The
growth of internet technology has enabled secure, scalable platforms that support
business operations online.
This project is a full-stack web application for an online shopping platform,
developed using Java Spring Boot, with a focus on security using Spring Security
and JWT, and dynamic rendering using Thymeleaf. The application allows users to
register, browse products, add them to cart, and place orders. Admins can manage
the products and orders via a secured admin interface.
2. Objectives
The objective of this project is to:
3. Technologies Used
Component Technology Used
Frontend HTML, CSS, Thymeleaf Templates
Backend Java 17, Spring Boot, Spring MVC
Security Spring Security with JWT
Database MySQL
ORM Spring Data JPA
Build Tool Maven
Server Embedded Apache Tomcat
Version Control Git & GitHub
IDE IntelliJ IDEA / Eclipse
4. System Architecture
This project follows the MVC (Model-View-Controller) architecture:
Spring Security is integrated with JWT for stateless authentication, ensuring each
request is verified via token without using sessions.
5. Modules Overview
🔹 User Module
Register and Login (JWT token generation)
Browse/Search products
🔹 Admin Module
Admin login
Add/Edit/Delete products
6. Database Design
Database: MySQL
Key Tables:
users – ID, username, encrypted password, role
Example Schema:
sql
Copy
Edit
CREATE TABLE users (
id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(50) UNIQUE,
password VARCHAR(255),
role VARCHAR(20)
);
7. JWT & Spring Security Integration
Security is the heart of this application. It uses:
A JWT is issued.
8. Project Structure
css
Copy
Edit
/ecommerce-springboot
│
├── /src/main/java/com/vishnu/ecommerce
│ ├── controller
│ ├── model
│ ├── repository
│ ├── service
│ ├── security
│ └── EcommerceApplication.java
│
├── /src/main/resources
│ ├── templates/ → Thymeleaf HTML files
│ ├── static/ → CSS, JS, images
│ └── application.properties
9. Key Features
Secure login with JWT
Admin dashboard
Wishlist functionality
13. Conclusion
This project was a complete learning experience of developing a modern, secure
full-stack web application. It involved working with core backend principles,
authentication systems, and frontend rendering. The use of Spring Boot, Spring
Security, JWT, and MySQL allowed for a scalable and secure system that mimics a
real-world e-commerce platform.