Skip to content

About

Choppe

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

ShoppingCartApplication

Overview

Choppee is a full-stack e-commerce web application developed using Java Spring Boot. The platform is designed as an online marketplace for high-end kitchen knives and lumberjack gear. It provides product browsing, shopping cart management, order processing, authentication, and REST API support.

The project demonstrates modern enterprise application development concepts such as:

  • MVC architecture
  • RESTful API development
  • Session management
  • JWT authentication
  • Database integration with JPA
  • Unit and integration testing
  • Frontend rendering with Thymeleaf

Features

User Features

  • User registration and login
  • Product catalog browsing
  • Product detail view
  • Shopping cart management
  • Checkout and order placement
  • Order history and tracking

Admin / System Features

  • Product management
  • Category and tag organization
  • Order management
  • Session handling
  • API authentication with JWT

Technical Features

  • RESTful APIs
  • Spring Boot MVC architecture
  • Spring Data JPA integration
  • H2 embedded database
  • Thymeleaf frontend templates
  • Validation support
  • Global exception handling
  • Unit and repository testing

Tech Stack

Technology Usage
Java 17 Programming Language
Spring Boot 3 Backend Framework
Spring MVC Web MVC Architecture
Spring Data JPA Database ORM
Thymeleaf Server-side Rendering
H2 Database Embedded Database
JWT Authentication
Maven Dependency Management
JUnit Testing
HTML/CSS Frontend UI

Project Structure

src/main/java/sg/edu/nus/choppee1
│
├── api/                # REST API controllers and JWT security
├── config/             # Application configuration classes
├── controller/         # MVC controllers
├── model/              # Entity models
├── repository/         # JPA repositories
├── service/            # Business logic services
│
src/main/resources
├── static/css/         # CSS styling
├── templates/          # Thymeleaf HTML templates
├── schema.sql          # Database schema
├── data.sql            # Sample data
└── application.properties

Main Components

Controllers

Handles incoming HTTP requests and routes application flow.

  • HomeController
  • ProductController
  • CartController
  • OrderController
  • UserController

API Layer

Provides REST API endpoints and JWT authentication.

  • ApiAuthController
  • ApiProductController
  • ApiCartController
  • ApiOrderController
  • JwtService
  • JwtFilter

Services

Contains business logic and transaction handling.

  • ProductService
  • CartService
  • OrderService
  • UserService

Repository Layer

Uses Spring Data JPA for database operations.

  • ProductRepository
  • CartRepository
  • OrderRepository
  • UserRepository

Database Design

The system uses an H2 embedded database with JPA entities such as:

  • User
  • Product
  • Category
  • Tag
  • Cart
  • CartItem
  • PurchaseOrder
  • OrderItem

The database schema and initial sample data are automatically loaded using:

  • schema.sql
  • data.sql

Testing

The project includes unit and integration tests for:

  • Services
  • Repositories
  • JWT authentication
  • Model calculations

Example test files:

CartServiceTest.java
OrderServiceTest.java
UserServiceTest.java
ProductRepositoryTest.java
JwtServiceTest.java

Installation & Setup

Prerequisites

  • Java 17+
  • Maven 3+
  • IDE (IntelliJ IDEA / Eclipse / VS Code)

Clone Repository

git clone <your-github-repository-url>
cd choppee

Build Project

mvn clean install

Run Application

mvn spring-boot:run

Access Application

http://localhost:8080

API Endpoints

Endpoint Description
/api/auth Authentication API
/api/products Product API
/api/cart Shopping cart API
/api/orders Order management API

Learning Outcomes

This project demonstrates practical experience in:

  • Full-stack web development
  • REST API implementation
  • Authentication and authorization
  • MVC software architecture
  • Database design and ORM
  • Software testing
  • Java enterprise application development

Future Improvements

  • Payment gateway integration
  • Admin dashboard
  • Product image upload
  • Email notification system
  • Docker deployment
  • Cloud hosting support
  • Responsive mobile UI
  • Advanced search and filtering

Author

Developed as an academic/project portfolio application using Spring Boot and Java enterprise technologies.


License

This project is for educational and portfolio purposes.

About

Choppe

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages