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.
- Host: GitHub
- URL: https://github.com/phyohtetarkar/marketplace-backend
- Owner: phyohtetarkar
- License: mit
- Created: 2022-11-22T16:23:24.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-24T04:23:31.000Z (about 1 year ago)
- Last Synced: 2024-08-24T05:28:38.959Z (about 1 year ago)
- Topics: backend, ecommerce-platform, java, multivendor-ecommerce, spring-boot
- Language: Java
- Homepage:
- Size: 2.82 MB
- Stars: 16
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Multi-vendor marketplace backend
[](https://github.com/phyohtetarkar/marketplace-backend/actions/workflows/build.yml) [](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
- Java (Java 17 OR Java 21 if you want to enable virtual thread)
- PostgreSQL
- 2C2P Payment Gateway Credentials
- 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