GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - arifnextdev/swiftcart-server: SwiftCart is a Node.js e-commerce API using Express and MongoDB, featuring Stripe payment integration and real-time dashboard stats. It includes user authentication, product and order management, optimized with NodeCache.

BranchesTags
Open more actions menu

Latest commit

 

History

27 Commits
27 Commits

Folders and files

NameName
Last commit message
Last commit date
dist
dist
 
 
src
src
 
 
uploads
uploads
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
vercel.json
vercel.json
 
 

Repository files navigation

SwiftCart E-commerce API

SwiftCart is a Node.js-based e-commerce platform API built with Express, MongoDB, and Stripe for payment processing.

Features

  • User authentication and management
  • Product management
  • Order management
  • Payment processing using Stripe
  • Real-time dashboard stats
  • Caching with NodeCache
  • Logging with Morgan

Prerequisites

Before running the application, ensure you have the following installed:

  • Node.js (v14.x or later)
  • MongoDB
  • Stripe Account

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/swiftcart.git

Navigate to the project directory: Copy code

cd swiftcart

Install the dependencies:

npm install

#Create a .env file in the root directory and add the following environment variables:

PORT=4000
MONGO_DB_URI=your_mongo_db_uri
STRIPE_KEY=your_stripe_api_key

Running the Application Start the server with the following command:

npm run start

#The server will be running at http://localhost:4000.

API Endpoints

User Routes POST /api/user/register - Register a new user POST /api/user/login - Login a user GET /api/user/me - Get current user's profile Product Routes GET /api/product - Fetch all products POST /api/product - Add a new product (Admin) PUT /api/product/:id - Update product details (Admin) DELETE /api/product/:id - Delete a product (Admin) Order Routes POST /api/order - Create a new order GET /api/order/:id - Get details of a specific order GET /api/order/user/:userId - Get all orders for a user Payment Routes POST /api/payment/checkout - Process payment using Stripe Dashboard Routes GET /api/dashboard/stats - Fetch platform statistics (Admin)

Uploads

Static files (e.g., product images) are served from the /uploads directory.

Middleware

Error handling middleware to catch errors globally CORS middleware to handle cross-origin requests Morgan for request logging

About

SwiftCart is a Node.js e-commerce API using Express and MongoDB, featuring Stripe payment integration and real-time dashboard stats. It includes user authentication, product and order management, optimized with NodeCache.

swiftcart-server.vercel.app

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.