AlexLoni1992 / E-Commerce-

E-Commerce Web Application This is a backend API for an e-commerce platform built using Java Spring Boot. It supports essential product management features, including product listing, detail retrieval, and CRUD operations for sellers. The application is designed with scalability and efficiency in mind, utilizing PostgreSQL for data persistance
MIT License
3 stars 6 forks source link
hacktoberfest hacktoberfest-accepted intellij java maven restful-api spring-boot

E-Commerce Web Application

This project is a backend implementation of an e-commerce web application built using the Java Spring Boot framework. The application allows users to retrieve product information from a database and enables sellers to update product details.

Features

Technologies Used

Project Structure

├── SpringEcom               # Main project directory
│   ├── controller            # Contains the controllers for handling HTTP requests
│   │   └── ProductController.java  # Handles product-related requests
│   ├── model                 # Contains the data model classes
│   │   └── Product.java       # Product entity class
│   ├── repo                  # Repository layer for database interactions
│   │   └── ProductRepo.java   # Repository interface for product data
│   ├── service               # Contains the service layer business logic
│   │   └── ProductService.java # Service class for product operations
│   └── SpringEcomApplication.java # Main entry point of the application
├── README.md                 # Project documentation

Setup Instructions

Prerequisites

Database Setup

  1. Install PostgreSQL and create a new database for the project.

  2. Update the application.properties file to configure the database connection.

    spring.datasource.url=jdbc:postgresql://localhost:5432/<your-database-name>
    spring.datasource.username=<your-username>
    spring.datasource.password=<your-password>
    spring.jpa.hibernate.ddl-auto=update

Build and Run

  1. Clone the repository to your local machine:

    git clone <repository-url>
    cd E-commerce-web-Application-main
  2. Build the project using Maven:

    mvn clean install
  3. Run the Spring Boot application:

    mvn spring-boot:run

    The application should now be running at http://localhost:8080.

API Endpoints

The application exposes the following REST API endpoints:

Lombok Configuration

This project uses Lombok annotations to reduce boilerplate code. Make sure to install Lombok in your IDE:

Running Tests

To run the unit tests, use the following command:

mvn test

Contributing

Feel free to contribute to this project by submitting issues or pull requests.

License

This project is licensed under the MIT License.

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

Contact If you have any questions or would like to reach out, feel free to email me at bheemhepte@gmail.com or connect with me on LinkedIn.