GithubHelp home page GithubHelp logo

phyohtetarkar / marketplace-backend Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 6.0 2.9 MB

Multi vendor marketplace project.

License: MIT License

Java 100.00%
backend ecommerce-platform java multivendor-ecommerce spring-boot

marketplace-backend's Introduction

Multi-vendor marketplace backend

Buid Buid (Native)

Multi-vendor e-commerce backend application project developed with 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

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.

app:
  database:
    url: jdbc:postgresql://localhost:5432/marketplace-db
    username: <username>
    password: <password>
  image:
    base-url: (http|https)://<your-domain>/images
    base-path: <image-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: <firebase-api-key>
    jwk-set-uri: https://www.googleapis.com/service_accounts/v1/jwk/securetoken%40system.gserviceaccount.com
    issuer-uri: https://securetoken.google.com/<projectId>
  super-user:
    name: <owner-name>
    email: <owner-email-address> # The one you created from firebase auth
    uid: <firebase-auth-user-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

cd marketplace-backend
./mvnw install && ./mvnw spring-boot:run -pl marketplace-application

For native build

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 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

marketplace-backend's People

Contributors

minnkhantkyaww avatar phyohtetarkar avatar theinmwenaing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.