An open API service indexing awesome lists of open source software.

https://github.com/phyohtetarkar/marketplace-backend

Multi vendor marketplace project.
https://github.com/phyohtetarkar/marketplace-backend

backend ecommerce-platform java multivendor-ecommerce spring-boot

Last synced: 8 months ago
JSON representation

Multi vendor marketplace project.

Awesome Lists containing this project

README

          

# Multi-vendor marketplace backend

[![Buid](https://github.com/phyohtetarkar/marketplace-backend/actions/workflows/build.yml/badge.svg)](https://github.com/phyohtetarkar/marketplace-backend/actions/workflows/build.yml) [![Buid (Native)](https://github.com/phyohtetarkar/marketplace-backend/actions/workflows/build-native.yml/badge.svg)](https://github.com/phyohtetarkar/marketplace-backend/actions/workflows/build-native.yml)

Multi-vendor e-commerce backend application project developed with [Spring boot](https://spring.io/projects/spring-boot/).

The application business story is like Facebook's pages where users can create their shops and sells products but with subscriptions. After users created their shops, administrator need to approved and users need to subscribe one of plans to start selling products.

**Features**:


  • Banners


  • Catalog

    • Categories (Multi-level support)

    • Products (Variations support)



  • Orders

  • Shopping cart

  • Favorite products

  • Vendors | Shops

  • Subscription Plans

  • Subscription Promo-codes

  • Reviews

  • Users

**Front-end website repository** => [Multi-vendor marketplace website](https://github.com/phyohtetarkar/marketplace-web/)

## Requirement


  1. Java (Java 17 OR Java 21 if you want to enable virtual thread)

  2. PostgreSQL

  3. 2C2P Payment Gateway Credentials

  4. Firebase auth setup

## Setup

**This project use Firebase auth as authentication layer. So, you first need to setup firebase auth and manually create one owner account. Or you can use any other authentication providers like AWS Cognito, Auth0 etc., and setup accordingly.**

I use extra YML config files for different active profiles (e.g, dev, staging, prod). Here is example config for `env.development.yml` inside `/marketplace-application/src/main/resources/`

> [!NOTE]
> super-user config is required for owner account initialization.

```yml
app:
database:
url: jdbc:postgresql://localhost:5432/marketplace-db
username:
password:
image:
base-url: (http|https):///images
base-path: # for storing uploaded image (e.g, /var/www/html/images)
payment:
merchant-id: <2c2p-merchant-id>
merchant-sha-key: <2c2p-merchant-sha-key>
token-request-url: <2c2p-payment-token-request-url>
firebase:
api-key:
jwk-set-uri: https://www.googleapis.com/service_accounts/v1/jwk/securetoken%40system.gserviceaccount.com
issuer-uri: https://securetoken.google.com/
super-user:
name:
email: # The one you created from firebase auth
uid: # The one you created from firebase auth
misc:
website-url: http://localhost:3000 # for payment redirection
cors-origins: # cors domains for font-end website
- http://localhost:3000
```

## Build and run

**For JVM build**
```bash
cd marketplace-backend
./mvnw install && ./mvnw spring-boot:run -pl marketplace-application
```

**For native build**
```bash
cd marketplace-backend
./mvnw -Pnative clean package
```

JVM or Native build executable outputs can be found inside `/marketplace-application/target/` directory.

## Frontend rest apis

This backend produces three main API categories:


  • Admin APIs

  • Vendor APIs

  • Consumer APIs

You can explore api docs via [OpenAPI 3 UI](https://springdoc.org/) path `http://localhost:8080/api-docs-ui`.

> [!NOTE]
> Payment API is only for 2c2p's server-to-server response so that left out from main API categories.

## Architecture

## Support me







## Screenshots