Git Product home page Git Product logo

phasezero-backend-nestjs's Introduction

Nest Js Seed with features

  • Project Setup using @nestjs/fastify(Fast and low overhead web framework, with a powerful plugin architecture, inspired by Hapi and Express)
  • Logging using @nestjs/commom logger
  • Swagger documentation using @nestjs/swagger with Authorization
  • Enabled dotenv support on Approot using @nestjs/config
  • API Versioning(/api/v1 , api/v2){default: /api/v1}
  • Enable RBAC
  • Added Docker Support
  • Create global custom exception filter to catch global errors
  • Use email and otp for user login instead of username and password; use otplib npm package
  • Enable User Authentication
  • Enabled Social Logins using Passport (JWT/ Local)
  • Added Mailing SMTP service for Mailing using Nodemailer with handlebars for email templates
  • Added Bull for Queuing purpose (currently using for Queuing Emails)
  • Replace Sqlite db with Prisma/Postgres
  • Linter (tslint + eslint + prettier)
  • Integration Testing / Unit Testing using Jest [With Test DB Environment]

Description

Nest framework TypeScript starter repository.

Requirements

  • PostgreSQL
  • Redis
  • Nodejs 18 and above

Installation

# Package Installation
$ npm install

# Copy the env example as .env file
$ cp .env.example .env

# Add your mailer service detail in .env file

Application Setup

#setup the db migration
$ npx prisma migrate dev --create-only

#Push the db migration
$ npx prisma db push

#Run the seed to setup the DB
$ npx ts-node prisma/seed.ts

Running the app

# development
$ npm run start

# watch mode (use this)
$ npm run start:dev

# production mode
$ yarn run start:prod

Testing the API EndPoints

  1. Visit the url shown in the terminal >>> http://localhost:3333/api/docs for more details

  2. Register the User

Register

  1. Send otp to the User

Send OTP

  1. Login

Login

  1. Use the Access token from Above to access protected route

Delete User Protected Route

  1. Refresh the token

Refresh

phasezero-backend-nestjs's People

Contributors

dipeshkumarsah98 avatar subhashish-rumsan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.