This project was built using nestjs for managing users, roles and permissions and serves as a basis for building other projects.
A progressive Node.js framework for building efficient and scalable server-side applications.
This project uses pnpm as code handler.
-
Clone this repository
git clone https://github.com/Zuniga63/nest-auth-template.git
-
Install packages
pnpm install
-
Copy the .env.example
cp .env.example .env
-
Enter the environment variables related to the database, secret key, cloudinary credentials and mailing data.
# development
$ pnpm run start
# watch mode
$ pnpm run start:dev
# production mode
$ pnpm run start:prod
# unit tests
$ pnpm run test
# e2e tests
$ pnpm run test:e2e
# test coverage
$ pnpm run test:cov
End point documentation can be accessed at http://localhost:${PORT}/api-docs/
The general config of swagger find in src/config/swagger.config.ts
-
Users: Entity in charge of using the platform and to which a role can be asigned. Module
Note: The first user created on the platform is assigned the super administrator property in true and by default disables all platform guards.
-
Cloudinary: Module in charge of managing the connection to the file cloud Cloudinary
-
Mail: Module in charge of sending e-mails.