{"id":13598505,"url":"https://github.com/Vivify-Ideas/nestjs-boilerplate","last_synced_at":"2025-04-10T09:31:25.487Z","repository":{"id":38848374,"uuid":"152983001","full_name":"Vivify-Ideas/nestjs-boilerplate","owner":"Vivify-Ideas","description":"NestJS Boilerplate 😻(Authentication, TypeORM, Configuration, Swagger)","archived":false,"fork":false,"pushed_at":"2023-03-14T22:13:59.000Z","size":1667,"stargazers_count":628,"open_issues_count":14,"forks_count":92,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-04T11:58:18.901Z","etag":null,"topics":["boilerplate","nestjs","restful-api","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/Vivify-Ideas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-10-14T14:31:01.000Z","updated_at":"2025-03-24T01:47:21.000Z","dependencies_parsed_at":"2024-01-07T18:06:57.729Z","dependency_job_id":"ce13949f-d4d8-4a29-83a9-c13b09b43a72","html_url":"https://github.com/Vivify-Ideas/nestjs-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vivify-Ideas%2Fnestjs-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vivify-Ideas%2Fnestjs-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vivify-Ideas%2Fnestjs-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vivify-Ideas%2Fnestjs-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vivify-Ideas","download_url":"https://codeload.github.com/Vivify-Ideas/nestjs-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248191700,"owners_count":21062555,"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":["boilerplate","nestjs","restful-api","swagger","typescript"],"created_at":"2024-08-01T17:00:53.163Z","updated_at":"2025-04-10T09:31:20.472Z","avatar_url":"https://github.com/Vivify-Ideas.png","language":"TypeScript","funding_links":[],"categories":["Resources","资源","TypeScript"],"sub_categories":[],"readme":"\u003ch1\u003eNestJS Boilerplate\n  \u003ca\n    href=\"http://nestjs.com/\"\n    target=\"blank\"\n  \u003e\n    \u003cimg\n      src=\"https://nestjs.com/img/logo_text.svg\"\n      width=\"65\"\n      alt=\"Nest Logo\"\n    /\u003e\n  \u003c/a\u003e\n\u003c/h1\u003e\n\n## Description\n\n[NestJS](https://github.com/nestjs/nest) Boilerplate made with ❤️ by [💡VivifyIdeas💡](https://www.vivifyideas.com).\n\n## Start Guide\n\n### Outside Docker containers\n\n- Create .env file `cp .env.example .env` and replace existing env variables\n  (mysql/mariadb connection params)\n- Install dependencies `yarn`\n- Start the app `yarn start` (app will be exposed through the port 3000)\n\n### Inside Docker containers\n\nJust run already prepared bash script:\n```bash\n$ ./init\n```\nIt will setup the project for you (starting docker-compose stack, running migrations).\nThe NestJS app running in dev mode will be exposed on `http://localhost` (port 80)\n\nFor IDE autocompletion to work, run `yarn` on the host machine.\n\n## TypeORM integrated\n\n[TypeORM](http://typeorm.io/) gives you possibility to use next db types:\n`mysql`, `postgres`, `mariadb`, `sqlite`, etc. Please look at docs for more details.\nThe `docker-compose` template uses `mariadb`.\n## Migrations\n\nIf you don't work on a production-ready project you can always change `DB_SYNC` env variable to true so you can play with NestJS without the need to write actual migrations.\n\n**`synchronize: true` shouldn't be used in production - otherwise, you can lose production data.**\n\n### Create Migration\nCreating new migration is relatively easy and you can use typeorm CLI for that. You can run this command to create new migration:\n```bash\n$ docker exec -it nest yarn migration:create -n {CreateTableUsers}\n```\nMigration file will be placed under `src/migrations`. For more details check the existing [1611484925515-CreateUsersTable.ts](src/migrations/1611484925515-CreateUsersTable.ts)\n\n### Run Migrations\n```bash\n$ docker exec -it nest yarn migration:run\n```\n### Revert Migrations\n```bash\n$ docker exec -it nest yarn migration:revert\n```\n\n## Test\n\n```bash\n# unit tests\n$ docker exec -it nest yarn test\n\n# e2e tests\n$ docker exec -it nest yarn test:e2e\n\n# test coverage\n$ docker exec -it nest yarn test:cov\n```\n\n## Environment Configuration\n\nIntegrated Configuration Module so you can just inject `ConfigService`\nand read all environment variables from `.env` file, which is created automatically by the init script from `.env.example`.\n\n## Swagger\n\nRESTful APIs you can describe with already integrated Swagger.\nTo see all available endpoints visit http://localhost/api/docs\n\n## Authentication - JWT\n\nAlready preconfigured JWT authentication.\nIt's suggested to change current password hashing to something more secure.\nYou can start use already working implementation of `Login` and `Registration`\nendpoints, just take a look at [http://localhost/api/docs](http://localhost/api/docs).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVivify-Ideas%2Fnestjs-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVivify-Ideas%2Fnestjs-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVivify-Ideas%2Fnestjs-boilerplate/lists"}