Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 PreOwned Marketplace - Backend API

This repository contains the backend RESTful API service for the PreOwned Marketplace platform. Built with Node.js, Express, and MongoDB, it handles authentication, product management, order processing, role-based authorization, and Stripe payment integration.


🛠️ Tech Stack

  • Runtime Environment: Node.js
  • Framework: Express.js
  • Database: MongoDB (via Native Driver / Mongoose)
  • Authentication: Firebase Admin SDK / JWT
  • Payment Gateway: Stripe API
  • CORS & Middleware: CORS, Dotenv, Express JSON

🔑 Key Features

  • 🔐 Role-Based Authorization: Custom middlewares to secure routes for Buyers, Sellers, and Admins.
  • 📦 Product Management: Complete CRUD endpoints for product listings.
  • 💳 Stripe Payment Gateway: Secure payment intent generation and payment status updates.
  • 🛍️ Order Tracking: Endpoints to manage order states (Processing, Shipped, Delivered).
  • 📊 Analytics Data: Aggregated sales and revenue data endpoints for seller and admin dashboards.

⚡ Getting Started

Prerequisites

Ensure you have Node.js and MongoDB installed or have access to a MongoDB Atlas cluster.

  • Node.js v18.0.0 or higher

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/preowned-server.git
    cd preowned-server
    
    Install dependencies:
    npm install

2.Environment Setup (.env):

  PORT=5000
  MONGODB_URI=your_mongodb_connection_string
  STRIPE_SECRET_KEY=your_stripe_secret_key
  ACCESS_TOKEN_SECRET=your_jwt_secret
  1. Run the server:

    • Development Mode (Nodemon):

      npm run dev
    • Production Mode:

      npm start

👨‍💻 Author

MD. Arafat Ferdous


📝 License

This project is licensed under the MIT License.

About

Backend REST API for PreOwned platform built with Express.js, MongoDB, Firebase Auth, and Stripe for seamless e-commerce transactions.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages