/nest-e-commerce-boilerplate

Backend for Ecommerce platform using Nest + PostgreSQL + TypeORM

Primary LanguageTypeScript

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

E-commerce Nest

The idea of this project was to build fully functional Ecommerce platform

Features

  • JWT auth
  • Roles, Permissions
  • Orders, Products
  • Stripe payment

Installation

$ npm install

Example of .env file

DB_NAME=postgres
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASS=pass123
JWT_ACCESS_SECRET=ACCESS_SECRET
JWT_REFRESH_SECRET=REFRESH_SECRET
STRIPE_API_KEY=STRIPE_KEY
PAYMENT_SUCCESS_URL=http://localhost:3000/order/success?session_id={CHECKOUT_SESSION_ID}
PAYMENT_CANCEL_URL=http://localhost:3000/order/cancel

Running the app

# start docker containers
$ docker-compose up

# migrations for default data
$ npx typeorm migration:run

# development
$ npm run start

# watch mode
$ npm run start:dev