All Projects → Vivify-Ideas → Nestjs Boilerplate

Vivify-Ideas / Nestjs Boilerplate

Licence: mit
NestJS Boilerplate 😻(Authentication, TypeORM, Configuration, Swagger)

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Nestjs Boilerplate

Jianshu
仿简书nx+nodejs+nestjs6+express+mongodb+angular8+爬虫
Stars: ✭ 296 (+10.86%)
Mutual labels:  swagger, restful-api, nestjs
Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (-44.94%)
Mutual labels:  swagger, boilerplate
Grpc Gateway
The gRPC-Gateway is a plugin of the Google protocol buffers compiler protoc. It reads protobuf service definitions and generates a reverse-proxy server which translates a RESTful HTTP API into gRPC. This server is generated according to the google.api.http annotations in your service definitions.
Stars: ✭ 12,223 (+4477.9%)
Mutual labels:  swagger, restful-api
Proteus
Lean, mean, and incredibly fast JVM framework for web and microservice development.
Stars: ✭ 178 (-33.33%)
Mutual labels:  swagger, restful-api
Appy Backend
A user system to bootstrap your app.
Stars: ✭ 96 (-64.04%)
Mutual labels:  swagger, restful-api
Hapi Starter Kit
Hapi.js based REST boilerplate which uses latest ES7/ES8 features (async/await) with code coverage and follows best pratices
Stars: ✭ 103 (-61.42%)
Mutual labels:  swagger, boilerplate
Validator Badge
Validate your Swagger JSON/YAML today!
Stars: ✭ 158 (-40.82%)
Mutual labels:  swagger, restful-api
Restfeel
RESTFeel: 一个企业级的API管理&测试平台。RESTFeel帮助你设计、开发、测试您的API。
Stars: ✭ 59 (-77.9%)
Mutual labels:  swagger, restful-api
server
A server for tf2pickup.org
Stars: ✭ 16 (-94.01%)
Mutual labels:  restful-api, nestjs
nestjs-rest-sample
NestJS RESTful APIs Sample
Stars: ✭ 204 (-23.6%)
Mutual labels:  restful-api, nestjs
nest-admin
NestJs CRUD for RESTful API使用 nestjs + mysql + typeorm + redis + jwt + swagger 企业中后台管理系统项目RBAC权限管理(细粒度到按钮)、实现单点登录等。
Stars: ✭ 165 (-38.2%)
Mutual labels:  restful-api, nestjs
Swurg
Parse OpenAPI documents into Burp Suite for automating OpenAPI-based APIs security assessments (approved by PortSwigger for inclusion in their official BApp Store).
Stars: ✭ 94 (-64.79%)
Mutual labels:  swagger, restful-api
Testing Hapi
Hapi style guide compliant boilerplate (updated to v17!)
Stars: ✭ 90 (-66.29%)
Mutual labels:  swagger, boilerplate
Nest Permissions Seed
A simple application demonstrating the basic usage of permissions with NestJS.
Stars: ✭ 121 (-54.68%)
Mutual labels:  swagger, nestjs
Nest Hackathon Starter
Hackathon starter project for NestJS. Includes TypeORM, email verification, Passport-JWT authentication, Swagger and more
Stars: ✭ 86 (-67.79%)
Mutual labels:  swagger, boilerplate
Swagger meqa
Auto generate and run tests using swagger/OpenAPI spec, no coding needed
Stars: ✭ 151 (-43.45%)
Mutual labels:  swagger, restful-api
symfony5-jwt-restapi
API for Meeting app development
Stars: ✭ 21 (-92.13%)
Mutual labels:  swagger, restful-api
Molten Boilerplate
A boilerplate for the molten framework by Bogdanp https://github.com/Bogdanp/molten
Stars: ✭ 50 (-81.27%)
Mutual labels:  swagger, restful-api
Nestjs Redoc
📘 ReDoc frontend for you NestJS swagger API documentation
Stars: ✭ 54 (-79.78%)
Mutual labels:  swagger, nestjs
Nestjs Template
Scaffold quickly your next TypeScript API with this opinionated NestJS template crafted for Docker environments
Stars: ✭ 183 (-31.46%)
Mutual labels:  swagger, nestjs

NestJS Boilerplate Nest Logo

Description

NestJS Boilerplate made with ❤️ by 💡VivifyIdeas💡.

Start Guide

Outside Docker containers

  • Create .env file cp .env.example .env and replace existing env variables (mysql/mariadb connection params)
  • Install dependencies yarn
  • Start the app yarn start (app will be exposed through the port 3000)

Inside Docker containers

Just run already prepared bash script:

$ ./init

It will setup the project for you (starting docker-compose stack, running migrations). The NestJS app running in dev mode will be exposed on http://localhost (port 80)

For IDE autocompletion to work, run yarn on the host machine.

TypeORM integrated

TypeORM gives you possibility to use next db types: mysql, postgres, mariadb, sqlite, etc. Please look at docs for more details. The docker-compose template uses mariadb.

Migrations

If you don't work on a production-ready project you can always change DB_SYNC env variable to true so you can play with NestJS without the need to write actual migrations.

synchronize: true shouldn't be used in production - otherwise, you can lose production data.

Create Migration

Creating new migration is relatively easy and you can use typeorm CLI for that. You can run this command to create new migration:

$ docker exec -it nest yarn migration:create -n {CreateTableUsers}

Migration file will be placed under src/migrations. For more details check the existing 1611484925515-CreateUsersTable.ts

Run Migrations

$ docker exec -it nest yarn migration:run

Revert Migrations

$ docker exec -it nest yarn migration:revert

Test

# unit tests
$ docker exec -it nest yarn test

# e2e tests
$ docker exec -it nest yarn test:e2e

# test coverage
$ docker exec -it nest yarn test:cov

Environment Configuration

Integrated Configuration Module so you can just inject ConfigService and read all environment variables from .env file, which is created automatically by the init script from .env.example.

Swagger

RESTful APIs you can describe with already integrated Swagger. To see all available endpoints visit http://localhost/api/docs

Authentication - JWT

Already preconfigured JWT authentication. It's suggested to change current password hashing to something more secure. You can start use already working implementation of Login and Registration endpoints, just take a look at http://localhost/api/docs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].