{"id":26343724,"url":"https://github.com/agodin3z/nest-typeorm-template","last_synced_at":"2026-05-21T07:45:00.061Z","repository":{"id":191917364,"uuid":"649404272","full_name":"agodin3z/nest-typeorm-template","owner":"agodin3z","description":"TypeORM + NestJS API Template","archived":false,"fork":false,"pushed_at":"2024-10-17T14:58:48.000Z","size":2751,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-19T21:37:56.004Z","etag":null,"topics":["nestjs","typeorm","typeorm-seeding"],"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/agodin3z.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-04T18:29:04.000Z","updated_at":"2024-10-17T14:58:22.000Z","dependencies_parsed_at":"2024-10-26T23:47:40.936Z","dependency_job_id":null,"html_url":"https://github.com/agodin3z/nest-typeorm-template","commit_stats":null,"previous_names":["agodin3z/nest-typeorm-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agodin3z%2Fnest-typeorm-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agodin3z%2Fnest-typeorm-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agodin3z%2Fnest-typeorm-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agodin3z%2Fnest-typeorm-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agodin3z","download_url":"https://codeload.github.com/agodin3z/nest-typeorm-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826801,"owners_count":20354223,"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":["nestjs","typeorm","typeorm-seeding"],"created_at":"2025-03-16T05:17:58.757Z","updated_at":"2026-05-21T07:44:55.024Z","avatar_url":"https://github.com/agodin3z.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TypeORM + NestJS API Template\n\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\n## Tech Stack\n\n- [NestJS](https://nestjs.com/) - A progressive Node.js framework for building efficient, reliable and scalable server-side applications.\n- [TypeORM](https://typeorm.io/) - An ORM that can run many platforms and can be used with TypeScript and JavaScript.\n- [Jest](https://jestjs.io/) - Delightful JavaScript Testing Framework with a focus on simplicity.\n- [Husky](https://typicode.github.io/husky/) - Git hooks made easy dog woof!\n- [ESLint](https://eslint.org/) - Find and fix problems in your JavaScript code.\n- [Prettier](https://prettier.io/) - An opinionated code formatter.\n- [Lint Staged](https://github.com/okonet/lint-staged) - Run linters on git staged files.\n- [CommitLint](https://commitlint.js.org/) - Lint commit messages.\n\n## Prerequisites\n\n- [Volta](https://volta.sh/)* (node, npm, and yarn version manager)\n\n\u003e \\* Optional dependency, alternatives: [n](https://github.com/tj/n) or [nvm](https://github.com/nvm-sh/nvm)\n\n### Optional Development Prerequisites\n\nInstall the following dependencies:\n\n- [Docker Desktop](https://docs.docker.com/desktop/) (An one-click-install application that enables you to build and share containerized applications and microservices.)\n- [Docker Compose](https://docs.docker.com/compose/install/) (Plugin for running multi-container Docker applications)\n\nThen create a `docker.env` file with the following values:\n\n```env\nMYSQL_DATABASE=awesome_db\nMYSQL_USER=user\nMYSQL_PASSWORD=passwd\nMYSQL_ROOT_PASSWORD=secret_passwd\n```\n\nFinally, run docker containers from `docker-compose.yml` file with `docker-compose up -d` command or run it with Docker Desktop.\n\n## Getting Started\n\n### Enviroment config\n\nCreate a copy of `.env.example` with the name `.env` and `.env.test.example` with the name `.env.test` and placed it at the root of the project\n\n```bash\n  cp .env.example .env\n  cp .env.test.example .env.test\n```\n\nReplace its values with your own credentials.\n\n### Install Dependencies\n\nRun the following commands to install all dependencies:\n\n```bash\n  volta install node\n  volta install yarn\n  yarn\n```\n\n## Development server\n\nRun `yarn start:dev` to start a development server that watch for changes. For a debug server use: `yarn start:debug`\n\n## Running unit tests\n\nRun `yarn test` to execute the unit tests via [Jest](https://jestjs.io/). For coverage test use: `yarn test:cov`\n\n## Build for production\n\nRun `yarn build` to compile for production, this will execute `prebuild` and `postbuild` commands automatically. Then run `yarn start:prod` to start a production server.\n\n## Scripts API Reference\n\n### Server\n\n| Script             | Description                               |\n| :----------------- | :---------------------------------------- |\n| `yarn start`       | Start server (without watch)              |\n| `yarn start:dev`   | Start development server                  |\n| `yarn start:debug` | Start debug development server            |\n| `yarn start:prod`  | Start production server                   |\n| `yarn pm2`         | Run production server as Cluster with PM2 |\n| `yarn pm2:restart` | Reload API with PM2                       |\n| `yarn pm2:stop`    | Stop PM2 service                          |\n| `yarn pm2:logs`    | View PM2 logs                             |\n\n### Build\n\n| Script           | Description              |\n| :--------------- | :----------------------- |\n| `yarn prebuild`  | Clean dist folder        |\n| `yarn build`     | Build project            |\n\n### Lint \u0026 Format\n\n| Script        | Description                |\n| :------------ | :------------------------- |\n| `yarn format` | Format files with Prettier |\n| `yarn lint`   | Lint files with ESLint     |\n\n### Tests\n\n| Script            | Description              |\n| :---------------- | :----------------------- |\n| `yarn test`       | Run test (without watch) |\n| `yarn test:watch` | Run test and watch       |\n| `yarn test:cov`   | Run coverage test        |\n| `yarn test:e2e`   | Run end-to-end tests     |\n| `yarn test:debug` | Debug tests              |\n\n### TypeORM\n\n| Script                        | Description                                                                    |\n| :---------------------------- | :----------------------------------------------------------------------------- |\n| `yarn typeorm`                | Access to TypeORM CLI commands.                                                |\n| `yarn migrations`             | Applies all pending migrations, and creates the database if it does not exist. |\n| `yarn migrations:create`      | Creates a new migration file.                                                  |\n| `yarn migrations:test`        | Run migrations for test                                                        |\n| `yarn migrations:revert`      | Revert migrations in DB                                                        |\n| `yarn migrations:revert:test` | Revert migrations in test DB                                                   |\n| `yarn migrations:generate`    | Generate a migration from existing table schema and entities                   |\n| `yarn seeds`                  | Polulate DB with seed data                                                     |\n\n\u003e For more information on TypeORM, read the [official documentation](https://typeorm.io/using-cli)\n\n### Misc\n\n| Script                 | Description                                                            |\n| :--------------------- | :--------------------------------------------------------------------- |\n| `docker-compose up -d` | Builds, (re)creates, starts, and attaches to containers for a service. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagodin3z%2Fnest-typeorm-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagodin3z%2Fnest-typeorm-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagodin3z%2Fnest-typeorm-template/lists"}