Skip to content

Nbruchi/marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Marketplace landing

MarketPlace β€” Fullstack (Client + API)

A multi-vendor e-commerce platform: Next.js frontend and NestJS backend (TypeORM + PostgreSQL)

Next.js NestJS TypeScript PostgreSQL

πŸ“‹ Table of Contents

✨ Features

πŸ” Authentication & Authorization

JWT RBAC OAuth2 2FA

- πŸ”’ JWT-based authentication with refresh tokens - πŸ‘₯ Role-based access control (Admin, Seller, Customer) - βœ‰οΈ Email verification and password reset flow - 🌐 Social login integration (Google, Facebook)

πŸ›οΈ E-commerce Core

Multi-Vendor Catalog Inventory Reviews

- 🏬 Multi-vendor marketplace support - πŸ“š Comprehensive product catalog with categories and attributes - πŸ”„ Advanced product variations and options - πŸ“¦ Inventory and stock management - ⭐ Product reviews and ratings system

πŸͺ Seller Features

Dashboard Analytics Orders Refunds

- πŸ‘” Complete seller profile management - 🏬 Multi-shop support per seller - 🎨 Custom storefront configuration - πŸ“Š Sales analytics and reporting - πŸ“¦ Order management and fulfillment - πŸ”„ Refund and return processing

πŸ›’ Shopping Experience

Cart Wishlist Discounts Search

- πŸ›οΈ Shopping cart with guest checkout - πŸ’ Wishlist functionality - 🏷️ Coupon and discount system - πŸ” Product search and filtering - πŸ”„ Related products and recommendations

πŸ’³ Payments

Stripe Payments Payouts Webhooks

- πŸ’³ Secure payment processing with Stripe

Next.js Logo

MarketPlace β€” Fullstack (Client + API)

A multi-vendor e-commerce platform: a Next.js frontend and a NestJS backend (TypeORM + PostgreSQL)

Table of Contents

Overview

This repository contains two top-level apps:

  • client/ β€” a Next.js (App Router) React frontend using TypeScript and Tailwind.
  • server/ β€” a NestJS backend API built with TypeScript, TypeORM, and PostgreSQL.

They can be run independently or together for local development. Below are quick, copy-ready steps to get both running.

Tech Stack

  • Frontend: Next.js, React, TypeScript, Tailwind CSS
  • Backend: NestJS, TypeScript, TypeORM, PostgreSQL, Redis (optional)
  • Dev tools: PNPM, Docker, Jest, ESLint, Prettier

Quick Start

Prerequisites

  • Node.js v18+
  • PNPM
  • PostgreSQL
  • Redis (optional, used by the server)
  • Docker & Docker Compose (optional)

Run the Server (API)

  1. Open a terminal and change to the server/ directory:
cd server
pnpm install
  1. Create environment file and configure DB credentials (copy from example if present):
cp .env.example .env
# then edit .env to set database, redis, and other secrets
  1. Start the server in development mode (default port 3000):
pnpm run start:dev

The API should be reachable at http://localhost:3000. The server console will also print the Swagger/OpenAPI URL when available.

Run the Client (Frontend)

  1. Open a new terminal and change to the client/ directory:
cd client
pnpm install
  1. Configure the client to talk to the API. Create .env.local in client/ and set the API base URL (example):
# in client/.env.local
NEXT_PUBLIC_API_URL=http://localhost:3000
  1. Start the Next.js dev server. To avoid port conflicts with the backend, run the frontend on port 3001:
PORT=3001 pnpm run dev

The web app will be available at http://localhost:3001.

Run Both Locally

Start the server (port 3000) then the client (port 3001). If you prefer Docker, consult any docker-compose.yml in the repo (top-level or inside server/) to start required services (Postgres, Redis) and the apps.

Project Structure

  • client/ β€” Next.js frontend (App Router, TypeScript, Tailwind)

    • app/ β€” Next.js app folder
    • components/ β€” React components and UI primitives
    • public/ β€” static assets
    • package.json β€” frontend scripts & deps
  • server/ β€” NestJS backend

    • src/ β€” Nest application source
    • src/modules β€” feature modules
    • package.json β€” backend scripts & deps
    • README.md β€” server-specific instructions (if present)

Environment variables

  • server/.env β€” database, redis, JWT secrets, third-party API keys. Copy from server/.env.example when present.
  • client/.env.local β€” frontend-specific variables (e.g. NEXT_PUBLIC_API_URL).

Ports used by default:

  • Server API: 3000
  • Client (Next.js): 3001 (recommended when running alongside server)

Testing & Linting

  • Backend tests (in server/) typically run with:
cd server
pnpm test
  • Frontend tests (in client/) run with:
cd client
pnpm test

Run linters and formatters with pnpm lint / pnpm format inside each project if scripts are defined.

Resources


If you'd like, I can also:

  • Add example docker-compose.yml to orchestrate Postgres + Redis + both apps locally.
  • Add a root-level Makefile or task scripts to start both projects with a single command.
  • Commit this README update for you.

About

A multi-vendor e-commerce platform: Next.js frontend and NestJS backend (TypeORM + PostgreSQL)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages