Skip to content
/ nestjs-scaffold Public template

NestJS Scaffold with Authentication, Roles and Permissions

Notifications You must be signed in to change notification settings

efd1006/nestjs-scaffold

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.

NPM Version Package License NPM Downloads Travis Linux Coverage Gitter Backers on Open Collective Sponsors on Open Collective

Description

Nest framework TypeScript starter repository.

TODOS

  • Create endpoint on permissions controller to list all route resource on permissions
  • Create endpoint on permissions controller to list all permission prefix
  • CRUD permissions
  • CRUD role
  • Assigning of permissions on a specific role
  • Refactor permission.guard.ts to reduce query calls. One solution is to fetch the roles and permissions directly from the signed JWT or from req.user

Installation

$ npm install

Database Related (migration, seed, setup)

# Setup Database (build dist -> reset db -> run migration -> run seed)
$ npm run db:setup

# Generate migration based on created entity (auto generated)
$ npm run migration:generate -n <migration_name>

# Create an empty migration file
$ npm run migration:create -n <migration_name>

# Running the migration
$ npm run migration:up

# Revert a migration
$ npm run migration:down

# Show available migrations
$ npm run migration:show

# Run the seeder
$ npm run seed

# Run specific seed class
$ npm run seed:class <ClassName>

# Show seeding connection config
$ npm run seed:config

# Drop all the schema (Hard reset)
$ npm run schema:drop

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

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

About

NestJS Scaffold with Authentication, Roles and Permissions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages