Skip to content
/ fiat-api Public template
forked from josephgoksu/prime-nestjs

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

License

Notifications You must be signed in to change notification settings

duniapay/fiat-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prime-nestjs

Production-ready and flexible NestJS Boilerplate with Typescript 🌃, Postgres 👾, TypeORM 🥷 and Docker 🐳.

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
  • 😴 Insomnia - Insomnia 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.



Joey Goksu

📖

Made with ♥ by Joey Göksu

About

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

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.7%
  • Shell 4.6%
  • JavaScript 4.2%
  • Other 0.5%