This project implements a web application for an Online Marketplace using the Spring Boot framework for the backend. The application utilizes Spring Security for authentication and authorization, Hibernate with JPA for database operations, and MySQL as the database.
This project implements a web application for an Online Marketplace using the Spring Boot framework for the backend and ReactJS for the frontend. The application utilizes Spring Security for authentication and authorization, Hibernate with JPA for database operations, and MySQL as the database.
The Online Marketplace application is designed to handle products, sellers, users, and their interactions, including features such as user authentication, product management, and favorite/blacklist functionalities. It distinguishes between Admin and regular users, with Admins having additional privileges.
Below are some screenshots of the application to give you an idea of its user interface:
Follow the steps below to run the Online Marketplace application locally.
Make sure you have the following installed on your machine:
Clone the Repository
git clone https://github.com/your-username/OnlineMarketPlace.git
cd OnlineMarketPlace
Configure the Database
Create a new MySQL database:
CREATE DATABASE : your-database;
Update the application.yaml
file with your MySQL credentials:
spring:
datasource:
url: jdbc:mysql://localhost:3306/your-database
username: your-username
password: your-password
Build and Run the Application
Build and run the application using Maven:
mvn clean install
mvn spring-boot:run
The application will be available at http://localhost:8080
.
Update the application.yaml file in the backend directory to configure database connection and other settings. Ensure that the spring.datasource.url, spring.datasource.username, and spring.datasource.password fields are set correctly.
Open the following URLs in your browser:
/api/v1/login
/api/v1/users/{userId}
/api/v1/users
/api/v1/users/{userId}
/api/v1/users/{userId}/favorites
/api/v1/users/{userId}/favorites/{productId}
/api/v1/users/{userId}/favorites/{productId}
POST /api/v1/users/{userId}/block-seller
Description: Block a seller for a user.
GET /api/v1/users/{userId}/blocked-sellers
Description: Retrieve the blocked sellers for a user.
/api/v1/products
/api/v1/products/{id}
/api/v1/users/sellers
/api/v1/users/sellers/{id}