GithubHelp home page GithubHelp logo

lollobene / prime-nestjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from josephgoksu/prime-nestjs

0.0 0.0 0.0 1.1 MB

A production-ready NestJS boilerplate using Typescript, Postgres, TypeORM, and Docker.

License: MIT License

Shell 10.36% JavaScript 9.02% TypeScript 79.62% Dockerfile 0.99%

prime-nestjs's Introduction

Introducing the NestJS boilerplate, a comprehensive and modular starting point for your next Node.js project! Built with the latest version of NestJS, a powerful and flexible framework for building efficient and scalable server-side applications, this boilerplate includes support for TypeScript, PostgreSQL, and JWT authentication out of the box. Other features include configuration support with Dotenv, RBAC and CBAC for authorization, TypeORM for database interactions, Swagger for API documentation, and Docker Compose for container orchestration. Additionally, the boilerplate comes with pre-configured linting tools and secure HTTP headers with Helmet. Simply clone the repository, install the dependencies, and start building your next great idea!

Out-of-box Solutions

Built-in Features

  • ๐Ÿ“ฑ NestJS โ€” latest version
  • ๐ŸŽ‰ TypeScript - Type checking
  • โš™๏ธ Dotenv - Supports environment variables
  • ๐Ÿ— Authentication - JWT, RSA256
  • ๐Ÿฌ Authorization - RBAC, CBAC
  • ๐Ÿช TypeORM - Database ORM
  • ๐Ÿช PostgreSQL - Open-Source Relational Database
  • ๐Ÿง  Configuration - Single config for all
  • ๐Ÿ“ƒ Swagger - API Documentation
  • ๐Ÿณ Docker Compose - Container Orchestration
  • ๐Ÿ” Helmet - secure HTTP headers
  • ๐Ÿ•น๏ธ Postman - Postman config for endpoints
  • ๐Ÿ“ ESLint โ€” Pluggable JavaScript linter
  • ๐Ÿ’– Prettier - Opinionated Code Formatter
  • โœจ Commitlint - Lint your conventional commits

GitHub actions

  • ๐Ÿ•ต๏ธโ€โ™‚๏ธ Code Scanning - Code scanning with CodeQL
  • ๐Ÿ•ต๏ธโ€โ™‚๏ธ Megalinter - analyzes 48 languages, 22 formats, 19 tooling formats, excessive copy-pastes, spelling mistakes and security issues

Quick Setup (Production)

bash ./setup.sh

Installation (Development)

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Endpoints

  1. Install the insomnia app
  2. Import the endpoints.json file
  3. Enjoy

Generate SSL certificates

  1. Generate an RSA private key, of size 2048, and output it to a file named key.pem:
openssl genrsa -out private_key.pem 2048
# It needs be copied&pasted from terminal manually
awk 'NF {sub(/\r/, ""); printf"%s\\n",$0;}' private_key.pem
  1. Extract the public key from the key pair, which can be used in a certificate:
openssl rsa -in private_key.pem -outform PEM -pubout -out public_key.pem
# It needs be copied&pasted from terminal manually
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' public_key.pem

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE.md file for more information.

prime-nestjs's People

Contributors

lollobene avatar josephgoksu 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.