• Stars
    star
    365
  • Rank 116,851 (Top 3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 3 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

NestJS Boilerplate

All Contributors License: MIT GitHub issues Known Vulnerabilities GitHub stars

prime-nestjs

πŸ“– Description

Open Source Love Maintenance GitHub last commit GitHub repo size GitHub code size in bytes GitHub top language GitHub language count GitHub contributors GitHub commit activity the past week, 4 weeks, year GitHub commit activity the past week, 4 weeks, year GitHub commit activity the past week, 4 weeks, year GitHub package.json version

Introducing the NestJS boilerplate - a great way to get started on your next Node.js project! It's built using the latest version of NestJS, which is a powerful and flexible framework for creating efficient and scalable server-side applications. The boilerplate includes TypeScript, PostgreSQL, and JWT authentication right out of the box, so you don't have to worry about setting those up yourself.

Other awesome features include configuration support with Dotenv, RBAC and CBAC for authorization, TypeORM for interacting with databases, Swagger for API documentation, and Docker Compose for container orchestration. Plus, the boilerplate also comes with pre-configured linting tools and secure HTTP headers with Helmet.

Getting started is easy - just clone the repository, install the dependencies, and you're ready to start building your next great idea!

πŸš€ 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
  • 😴 Insomnia - Insomnia config for endpoints
  • πŸ“ ESLint β€” Pluggable JavaScript linter
  • πŸ’– Prettier - Opinionated Code Formatter
  • ✨ Commitlint - Lint your conventional commits
  • πŸ•΅οΈβ€β™‚οΈ Code Scanning - Code scanning with CodeQL

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.



Joey Goksu

πŸ“–

Made with β™₯ by Joey GΓΆksu

More Repositories

1

sky-design

πŸŒƒ A design reference for developers who prioritize good design.
240
star
2

mobile-design-resources

πŸ“± A curated list of mobile design resources
56
star
3

prime-react-native

The ultimate collection of production-ready, flexible and accessible React Native Boilerplate.
TypeScript
54
star
4

reactive-microservices

This project epitome of reactive microservice architecture. Protocols, transports, unit/e2e tests and implementations are all in the same place.
TypeScript
2
star
5

CENG202-DataStructures

Yildirim Beyazit University CENG 202 Data Structures LAB Notes 2016
Java
1
star
6

Document-Analysis-API

Open Source Document Analyzer
Python
1
star
7

myShopList

Example NodeJS and React Rest App
JavaScript
1
star
8

Clean-Development-Environment

πŸ’» smells like a new computer spirit
Shell
1
star
9

mockingbird-theme

Vscode Mockingbird Theme
1
star
10

prime-go

This is a simple repository to test the Go language. It will be used for platform engineering exercises.
Go
1
star
11

VocabularyBuilderApp

Vocabulary Builder App for English
TypeScript
1
star
12

artspin

"artspin" is the best way to quickly and freely spin your articles. Currently, it is available for just Turkish Language.
1
star
13

CENG103-CENG104-LABs-Notes

Yildirim Beyazit University COMPUTER PROGRAMMING I - II. First and Second Semester is available.
C
1
star
14

ornekwebsite

Firebase Hosting + GatsbyJS + Github Actions ile olusturulmus ornek blog.
JavaScript
1
star
15

platform-eng-exercise

This repository contains the code for the Platform Engineering Exercise. The exercise is to create a Kubernetes cluster in AWS using Terraform.
HCL
1
star