AdaptingAFM / necord-domain_authorization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Example of guarding a Necord interaction with domain authorization logic.

Things that could be done better:

  • Structurized DTO's with @nestjs/mapped-types; per-field validation and exception with class-validator.
  • Passing more metadata to the authguard for it to be smarter and capable of handling all possible discord interactions.
  • Domain Entities.
  • Single Responsibility Rule within most of the methods that the end user interacts with.
  • Figure a workaround to this issue

Installation

$ npm install

./.env => TOKEN=YOUR_DISCORD_TOKEN, GUILD=YOUR_DISCORD_GUILD 

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

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


Languages

Language:TypeScript 96.9%Language:JavaScript 3.1%