Skip to content

About

Spring Boot-based ecommerce system for learning and practice purposes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

Spring Boot E-Commerce System

A full-stack e-commerce platform built with Spring Boot for learning and practice purposes. This project demonstrates modern web development practices including backend REST APIs, frontend interactivity, and database management.

Live Demo: https://springboot-ecommerce-jjun.onrender.com/

📋 Table of Contents

✨ Features

  • User authentication and registration
  • Product catalog and filtering
  • Shopping cart functionality
  • Order management
  • Responsive UI design
  • Admin dashboard for product management
  • Secure payment integration
  • Order history tracking

🛠️ Tech Stack

Layer Technology
Backend Java, Spring Boot, Spring Security, JPA/Hibernate
Frontend HTML5, CSS3, JavaScript
Database MySQL/PostgreSQL
Deployment Docker, Render
Build Tool Maven/Gradle

📁 Project Structure

springboot-ecommerce/
├── src/
│   ├── main/
│   │   ├── java/
│   │   │   └── com/ecommerce/
│   │   │       ├── controller/      # REST API endpoints
│   │   │       ├── service/         # Business logic
│   │   │       ├── model/           # Entity classes
│   │   │       └── repository/      # Database access
│   │   └── resources/
│   │       ├── templates/           # HTML templates
│   │       ├── static/              # CSS, JavaScript assets
│   │       └── application.yml      # Configuration
│   └── test/
├── Dockerfile                       # Container configuration
├── pom.xml                         # Maven dependencies
└── README.md

📦 Prerequisites

  • Java JDK 11 or higher
  • Maven 3.6+ or Gradle 6+
  • MySQL 8.0+ or PostgreSQL 12+
  • Git
  • Docker (optional, for containerization)

🚀 Installation & Setup

1. Clone the Repository

git clone https://github.com/hamza-vuiyan/springboot-ecommerce.git
cd springboot-ecommerce

2. Configure Database

Update src/main/resources/application.yml:

spring:
  datasource:
    url: jdbc:mysql://localhost:3306/ecommerce
    username: root
    password: your_password
  jpa:
    hibernate:
      ddl-auto: update

3. Install Dependencies

mvn clean install

▶️ Running the Application

Local Development

mvn spring-boot:run

The application will start at http://localhost:8080

Using Docker

docker build -t springboot-ecommerce .
docker run -p 8080:8080 springboot-ecommerce

📡 API Endpoints

Products

  • GET /api/products - List all products
  • GET /api/products/{id} - Get product details
  • POST /api/products - Create product (Admin)
  • PUT /api/products/{id} - Update product (Admin)
  • DELETE /api/products/{id} - Delete product (Admin)

Orders

  • GET /api/orders - Get user's orders
  • POST /api/orders - Create new order
  • GET /api/orders/{id} - Get order details

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - User login
  • POST /api/auth/logout - User logout

💡 Example Use Case

This project is perfect for learning how a typical online store works. For instance, when a customer browses products, the frontend sends requests to the Java backend, which queries the database for available items and returns them. When they add items to the cart and checkout, the system processes the order and stores it in the database—just like real e-commerce platforms like Amazon or eBay do.

🤝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📞 Support

For issues, questions, or suggestions, please open an issue on GitHub.


Happy coding! 🎉

About

Spring Boot-based ecommerce system for learning and practice purposes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages