{"id":16726522,"url":"https://github.com/sonjoydatta/nestjs-boilerplate","last_synced_at":"2026-04-12T09:03:05.418Z","repository":{"id":183437868,"uuid":"668604430","full_name":"sonjoydatta/nestjs-boilerplate","owner":"sonjoydatta","description":"A backend boilerplate with NestJS for building fast, robust, and adaptable applications","archived":false,"fork":false,"pushed_at":"2023-07-23T14:16:26.000Z","size":170,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T05:28:40.715Z","etag":null,"topics":["becrypt","docker","fakerjs","handlebars","jwt","mongodb","nestjs","nodemailer","redis","swagger","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonjoydatta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-20T07:40:29.000Z","updated_at":"2024-05-30T12:53:28.000Z","dependencies_parsed_at":"2023-07-24T12:59:18.450Z","dependency_job_id":null,"html_url":"https://github.com/sonjoydatta/nestjs-boilerplate","commit_stats":null,"previous_names":["sonjoydatta/nestjs-boilerplate"],"tags_count":2,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonjoydatta%2Fnestjs-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonjoydatta%2Fnestjs-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonjoydatta%2Fnestjs-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonjoydatta%2Fnestjs-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonjoydatta","download_url":"https://codeload.github.com/sonjoydatta/nestjs-boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243747932,"owners_count":20341603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["becrypt","docker","fakerjs","handlebars","jwt","mongodb","nestjs","nodemailer","redis","swagger","typescript"],"created_at":"2024-10-12T22:53:25.405Z","updated_at":"2026-04-12T09:03:05.388Z","avatar_url":"https://github.com/sonjoydatta.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NestJS API Boilerplate\n\nThis is a boilerplate for NestJS API. It is based on the [NestJS](https://nestjs.com/) framework. It is a TypeScript starter repository.\n\n## Features\n\n1. JWT Authentication library with access, refresh, confirmation, and reset tokens\n   1. `Access tokens` are used to authenticate users\n   2. `Refresh tokens` are used to refresh access tokens\n   3. `Confirmation tokens` are used to confirm user email addresses\n   4. `Reset tokens` are used to reset user passwords\n2. Redis library with `ioredis` to store blacklisted tokens\n3. Configured with `@nestjs/config` to load environment variables from `.env` files\n4. Configured with `@nestjs/swagger` to generate Swagger documentation and Swagger example is documented with `Faker.js`\n5. Configured with `@nestjs/mongoose` to connect to MongoDB\n6. Configured with Docker and Docker Compose\n7. Mailer library with `nodemailer` and `Handlebars` for templating\n\n## Common Commands\n\n| Command        | Description                          |\n| -------------- | ------------------------------------ |\n| yarn start:dev | Start the server in development mode |\n| yarn build     | Build the app for production         |\n| yarn start     | Start the app in production mode     |\n| yarn lint      | Lint the code                        |\n| yarn format    | Format the code                      |\n\n## Environment Variables\n\nThere's a `.env.example` file in the `src/common/envs` directory. You can copy it to `.env`/`.env.development`/`.env.production` and set the values accordingly.\n\n## Quick start\n\n1. You'll need to have Node \u003e= 18.16.1 and yarn \u003e= 1.22.19 on your machine\n2. Clone this repo using `git clone --depth=1 https://github.com/sonjoydatta/nestjs-boilerplate.git \u003cYOUR_PROJECT_NAME\u003e`\n3. Enter to the project directory: `cd \u003cYOUR_PROJECT_NAME\u003e`\n4. Run `yarn or npm install` in order to install dependencies\n5. At this point you can run `yarn start:dev or npm run start:dev` to see the app at `http://localhost:4000`\n6. You may need to a `.env` file. For development `.env.development`\n\n## Docker\n\nYou can run the app with Docker and Docker Compose. There's a `docker-compose.yml` file in the root directory. You can run `docker-compose up` to start the app. You can also run `docker-compose up -d` to run the app in the background. You can run `docker-compose down` to stop the app.\n\n## Swagger\n\nYou can access the Swagger UI at `http://localhost:{PORT}`. The default port is `4000`.\n\n## Acknowledgements\n\n- [TypeScript](https://www.typescriptlang.org/)\n- [NestJS](https://nestjs.com/)\n- [Swagger](https://swagger.io/)\n- [Faker.js](https://fakerjs.dev)\n- [MongoDB](https://www.mongodb.com/)\n- [Redis](https://redis.io/)\n- [class-transformer](https://www.npmjs.com/package/class-transformer)\n- [class-validator](https://www.npmjs.com/package/class-validator)\n- [Nodemailer](https://nodemailer.com/about/)\n- [Handlebars](https://handlebarsjs.com/)\n- [JWT](https://jwt.io/)\n- [bcrypt](https://www.npmjs.com/package/bcrypt)\n- [Docker](https://www.docker.com/)\n- [Docker Compose](https://docs.docker.com/compose/)\n\n## License\n\nThis code is available under the MIT license. See the [LICENSE](LICENSE.md) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonjoydatta%2Fnestjs-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonjoydatta%2Fnestjs-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonjoydatta%2Fnestjs-boilerplate/lists"}