/nest-seed

A smart seed that aims to facilitate the understanding of complexity

Primary LanguageTypeScriptMIT LicenseMIT

Shoulders: Nest Seed

Shoulders Logo

A smart organization that aims to facilitate the understanding of complexity



Nest Logo

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



Description

🚀 This ia a seed to start a Nest application easily with useful features already configured!


Our Features:

  • Security:
    • CORS
    • Helmet
    • Rate Limiting
  • Features
    • Authorization
    • Authentication
    • Cookies
    • Pagination
    • Request Logging
    • Error catch with logging
    • Docs with Swagger
    • Timeout interceptor
    • Interceptor to prevent sensitive data
    • Useful DTOs to filter body or query requests
      • With us you have the benefits of GraphQl without using GraphQl
    • Validation with class validators
      • We created some custom transformers to demystify the practice
    • Send Email
      • Confirmation token after register
      • Recover password
  • Facilitators
    • Prisma Configured
    • eslint and prettier configured
    • Docker Compose with PostgresSQL to development
    • Auth decorator that group auth logical
    • List Filters Improved
  • Resources
    • Users
    • People
      • Roles
      • Contacts

Working on:

  • Timezone
  • Tests
  • Refresh token

Future:

  • Security:
    • CSRF Protection
  • Features
    • File Upload

Analyzing:

  • Websocket Branch ( ZORIX )

Installation

$ yarn install

Start database

If you want to run the application and database with docker just run the following command:

$ docker-compose -f docker/docker-compose.dev.yaml up -d

# To stop the application
docker-compose -f docker/docker-compose.dev.yaml down

If you want to run only the database

$ docker-compose up -d

# To stop the database
docker-compose down

Running migrations

# You can edit prisma/schema.prisma before run (optional)
$ npx prisma migrate dev

Running the app

Not necessary if the application was started with docker in the above command

# development
$ yarn start

# watch mode
$ yarn dev

# production mode
$ yarn start:prod

Test

# unit tests
$ yarn test

# e2e tests
$ yarn test:e2e

# test coverage
$ yarn test:cov

Import Insomnia

If you use the insomnia to test your requests we have prepared a configured file to start testing our API.

Run in Insomnia}


Swagger

To view the documentation just access http://localhost:3000/api while the project is running

You can edit this URL configuration at file config/app.ts


Support

More info soon

License

Nest is MIT licensed.