Skip to content

Repository files navigation

Finn Backend - Marketplace & Auction Platform

Live Link: Production Deployment
API Documentation (Swagger): Swagger UI
(Note: Deployed under the domain shazan-ad-marketplace-project for hosting, serving as the core API server for the Finn application).

A comprehensive, enterprise-ready marketplace and auction platform backend built with NestJS, Prisma, PostgreSQL, Stripe, and Socket.io. Finn enables dual listing models (fixed-price and time-based bidding), real-time user messaging, Stripe Connect seller integration, automatic platform fee splitting, and seller subscription memberships.


Features

⚡ Core Features

  • Secure Authentication: JWT-based authentication with OTP verification using Gmail SMTP (Nodemailer).
  • Dual Price Model: Set fixed prices or activate time-bound auctions (with support for start, end, base, and release pricing).
  • Real-time Messaging: Socket.io-driven bi-directional messaging with conversation blocking, attachment handling, and unread counts.
  • Stripe Connect Integration: Links sellers' Stripe accounts to process purchases with automatic 10% platform fee settlements and 90% payouts.
  • Subscribers & Boosts: Subscription plans governing listings limits and premium packages (e.g. Gold Boost) to promote items.
  • Structured Feedback: Threaded user reviews and comment branches on marketplace listings.
  • Geo-Tagging: Geospatial coordinate tracking (latitude & longitude) for location-based listing searches.
  • API Exploration: Interactive API documentation generated dynamically via Swagger.

🛠️ Technology Stack


📂 Project Structure

├── src/
│   ├── auth/              # JWT & Register/Login authentication module
│   ├── users/             # User profiles and access security
│   ├── sellers/           # Seller profiles, onboarding, and Stripe linking
│   ├── ads/               # Listing management (Fixed/Auction models)
│   ├── bids/              # Bids and highest-bid resolver for auctions
│   ├── payments/          # Stripe checkout, webhook handler, and fee math
│   ├── messages/          # Conversations and Message history
│   ├── comments/          # Listing reviews and nested comment threads
│   ├── categories/        # Categories & sub-categories (with custom specification schemas)
│   ├── mail/              # Mail services (Nodemailer wrappers)
│   └── common/            # Shared guards, decorators, exceptions, and utilities
├── prisma/
│   ├── schema.prisma      # Main database schema file
│   └── migrations/        # Automatic SQL migration history files
├── docs.md/               # Detailed documentation guides
└── package.json           # Modules, build scripts, and engine parameters

⚙️ Getting Started

1. Prerequisites

Verify that you have these installed:

2. Install dependencies

npm install

3. Environment Secrets Setup

Copy the example file and configure it with your credentials:

cp .env.example .env
# Edit .env with your system configurations.

(Reference the Environment Variables Guide for details on setting up Stripe, Cloudinary, and Nodemailer secrets).

4. Migrate the Database

Initialize tables in your PostgreSQL database instance:

npx prisma migrate dev --name init

5. Run the Server

Start the server in Development mode with hot-reloading:

npm run start:dev

The server will start, checking endpoints on http://localhost:3000.


📖 Sub-Documentation Guides

Additional backend development manuals are available in docs.md:


⚖️ License

Proprietary - All rights reserved. Registered by Shariyer Shazan.

About

A production-ready Marketplace & Auction Engine built with NestJS, Prisma, and PostgreSQL featuring dynamic specifications, real-time bidding, and split-payment processing

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages