{"id":14155234,"url":"https://github.com/smarlhens/nest-boilerplate","last_synced_at":"2025-04-05T16:08:13.263Z","repository":{"id":36975181,"uuid":"253094673","full_name":"smarlhens/nest-boilerplate","owner":"smarlhens","description":"Nest.js boilerplate with CircleCI, Commitizen, Commitlint, Docker-Compose, ESLint, GitHub Actions, Husky, Lint-staged, OpenAPI, Prettier, PostGreSQL, TypeORM","archived":false,"fork":false,"pushed_at":"2024-10-29T17:20:12.000Z","size":4223,"stargazers_count":105,"open_issues_count":10,"forks_count":21,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-29T17:32:57.762Z","etag":null,"topics":["circleci","commitizen","commitlint","docker","docker-compose","eslint","github-actions","husky","lint-staged","nest","nestjs","openapi","postgresql","prettier","typeorm"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smarlhens.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-04-04T20:40:52.000Z","updated_at":"2024-10-07T14:31:41.000Z","dependencies_parsed_at":"2023-09-28T10:13:47.465Z","dependency_job_id":"e76da84f-b83c-42bb-8e96-d5847de6dcb0","html_url":"https://github.com/smarlhens/nest-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/smarlhens%2Fnest-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smarlhens%2Fnest-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smarlhens%2Fnest-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smarlhens%2Fnest-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smarlhens","download_url":"https://codeload.github.com/smarlhens/nest-boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361689,"owners_count":20926643,"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":["circleci","commitizen","commitlint","docker","docker-compose","eslint","github-actions","husky","lint-staged","nest","nestjs","openapi","postgresql","prettier","typeorm"],"created_at":"2024-08-17T08:02:34.242Z","updated_at":"2025-04-05T16:08:13.235Z","avatar_url":"https://github.com/smarlhens.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","postgresql"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://nestjs.com/\" target=\"blank\"\u003e\u003cimg src=\"https://github.com/nestjs/docs.nestjs.com/blob/master/src/assets/logo-small.svg\" height=\"100\" alt=\"Nest logo\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://typeorm.io/\" target=\"blank\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/20165699\" height=\"100\" alt=\"TypeORM logo\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.postgresql.org/\" target=\"blank\"\u003e\u003cimg src=\"https://www.postgresql.org/media/img/about/press/elephant.png\" height=\"100\" alt=\"PostgreSQL logo\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://jestjs.io/\" target=\"blank\"\u003e\u003cimg src=\"https://github.com/facebook/jest/blob/main/website/static/img/jest.png\" height=\"100\" alt=\"Jest logo\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://prettier.io/\" target=\"blank\"\u003e\u003cimg src=\"https://github.com/prettier/prettier/blob/main/website/static/icon.png\" height=\"100\" alt=\"Prettier logo\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://eslint.org/\" target=\"blank\"\u003e\u003cimg src=\"https://github.com/eslint/website/blob/master/assets/img/logo.svg\" height=\"100\" alt=\"ESLint logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://docs.docker.com/\" target=\"blank\"\u003e\u003cimg src=\"https://www.docker.com/wp-content/uploads/2022/03/Moby-logo.png\" height=\"60\" alt=\"Docker logo\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/features/actions\" target=\"blank\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/44036562\" height=\"60\" alt=\"GitHub Actions logo\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://circleci.com/\" target=\"blank\"\u003e\u003cimg src=\"https://www.vectorlogo.zone/logos/circleci/circleci-icon.svg\" height=\"60\" alt=\"CircleCI logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Nest - Boilerplate\n\n[![GitHub CI](https://github.com/smarlhens/nest-boilerplate/workflows/CI/badge.svg)](https://github.com/smarlhens/nest-boilerplate/actions?query=workflow%3ACI)\n[![CircleCI](https://circleci.com/gh/smarlhens/nest-boilerplate.svg?style=svg)](https://circleci.com/gh/smarlhens/nest-boilerplate)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\n## Table of contents\n\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n- [What's in the box ?](#whats-in-the-box-)\n  - [CircleCI](#circleci)\n  - [Commitizen](#commitizen)\n  - [Commitlint](#commitlint)\n  - [Docker Compose](#docker-compose)\n  - [ESLint](#eslint)\n  - [GitHub Actions](#github-actions)\n  - [Husky](#husky)\n  - [Lint-staged](#lint-staged)\n  - [Prettier](#prettier)\n- [Running the app](#running-the-app)\n- [Code scaffolding](#code-scaffolding)\n- [Build](#build)\n- [Test](#test)\n- [Further help](#further-help)\n- [Useful Docker commands](#useful-docker-commands)\n\n---\n\n## Getting started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nWhat things you need to install the software and how to install them :\n\n- [Git](https://git-scm.com/)\n- [Node.js](https://nodejs.org/)\n- [Docker](https://docs.docker.com/get-docker/)\n\n---\n\n### Installation\n\n1. Clone the git repository\n\n   ```bash\n   git clone https://github.com/smarlhens/nest-boilerplate.git\n   ```\n\n1. Go into the project directory\n\n   ```bash\n   cd nest-boilerplate/\n   ```\n\n1. Checkout working branch\n\n   ```bash\n   git checkout \u003cbranch\u003e\n   ```\n\n1. Install NPM dependencies\n\n   ```bash\n   npm i\n   ```\n\n1. Copy `.env.dist` to `.env`\n\n   ```bash\n   cp .env.dist .env\n   ```\n\n1. Replace the values of the variables with your own\n\n1. Create Docker images and launch them\n\n   ```bash\n   docker-compose up -d --build\n   ```\n\n---\n\n## What's in the box ?\n\n### CircleCI\n\n[CircleCI](https://circleci.com/) automates your software builds, tests, and deployments.\n\n**CircleCI pipeline file**: [`.circleci/config.yml`](./.circleci/config.yml).\n\nFor more configuration options and details, see the [configuration docs](https://circleci.com/docs/).\n\n---\n\n### Commitizen\n\n[commitizen](https://github.com/commitizen/cz-cli) is a command line utility that makes it easier to create commit messages following the [conventional commit format](https://conventionalcommits.org) specification.\n\nUse `git cz` instead of `git commit` to use commitizen.\n\n[![Add and commit with Commitizen](https://github.com/commitizen/cz-cli/raw/master/meta/screenshots/add-commit.png)](https://github.com/commitizen/cz-cli/raw/master/meta/screenshots/add-commit.png)\n\n**Configuration file**: [`.czrc`](./.czrc).\n\n---\n\n### Commitlint\n\n[commitlint](https://github.com/conventional-changelog/commitlint) checks if your commit messages meet the [conventional commit format](https://conventionalcommits.org).\n\n**Configuration file**: [`.commitlintrc.json`](./.commitlintrc.json).\n\nIn general the pattern mostly looks like this:\n\n```sh\ntype(scope?): subject  #scope is optional\n```\n\nAre you a good `commitizen` ?\n\n---\n\n### Docker Compose\n\n**Compose file**: [`docker-compose.yml`](./docker-compose.yml).\n\nContainers :\n\n- PostgreSQL 14\n- pgAdmin 6\n\nCompose file uses `.env`.\n\n---\n\n### ESLint\n\n[ESLint](https://eslint.org/) is a fully pluggable tool for identifying and reporting on patterns in JavaScript.\n\n**Configuration file**: [`.eslintrc.js`](./.eslintrc.js).\n\nFor more configuration options and details, see the [configuration docs](https://eslint.org/docs/user-guide/configuring).\n\n---\n\n### GitHub Actions\n\n[GitHub Actions](https://github.com/features/actions) makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want.\n\n**CI workflow file**: [`.github/workflows/ci.yml`](./.github/workflows/ci.yml).\n\n---\n\n### Husky\n\n[Husky](https://github.com/typicode/husky) is a package that helps you create Git hooks easily.\n\n**Configuration folder**: [`.husky`](./.husky/).\n\n---\n\n### Lint-staged\n\n[Lint-staged](https://github.com/okonet/lint-staged) is a Node.js script that allows you to run arbitrary scripts against currently staged files.\n\n**Configuration file**: [`.lintstagedrc.json`](./.lintstagedrc.json).\n\n---\n\n### Prettier\n\n[Prettier](https://prettier.io/) is an opinionated code formatter.\n\n**Configuration file**: [`.prettierrc.json`](./.prettierrc.json).  \n**Ignore file**: [`.prettierignore`](./.prettierignore).\n\nFor more configuration options and details, see the [configuration docs](https://prettier.io/docs/en/configuration.html).\n\n---\n\n## Running the app\n\n### development\n\n```bash\nnpm run start\n```\n\n### watch mode\n\n```bash\nnpm run start:dev\n```\n\n### production mode\n\n```bash\nnpm run start:prod\n```\n\n---\n\n## Code scaffolding\n\nRun `nest generate|g \u003cschematic\u003e \u003cname\u003e [options]` to generate a new Nest Element.\n\n---\n\n## Build\n\nRun `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory.\n\n---\n\n## Test\n\n### unit tests\n\n```bash\nnpm run test\n```\n\n### e2e tests\n\n```bash\nnpm run test:e2e\n```\n\n### test coverage\n\n```bash\nnpm run test:cov\n```\n\n---\n\n## Further help\n\nTo get more help on the Nest CLI use `nest --help` or go check out the [Nest CLI README](https://github.com/nestjs/nest-cli/blob/master/README.md).\n\n---\n\n## Useful Docker commands\n\n1. If you want to check that all containers are up :\n\n   ```bash\n   docker-compose ps\n   ```\n\n1. Other Docker commands :\n\n   ```bash\n   # Start Docker\n   docker-compose start\n\n   # Restart Docker\n   docker-compose restart\n\n   # Stop Docker\n   docker-compose stop\n\n   # Delete all containers\n   docker rm $(docker ps -aq)\n\n   # Delete all images\n   docker rmi $(docker images -q)\n   ```\n\n1. How to get a Docker container's IP address from the host ?\n\n   ```bash\n   docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' \u003ccontainer\u003e\n   docker inspect $(docker ps -f name=\u003cservice\u003e -q) | grep IPAddress\n   ```\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmarlhens%2Fnest-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmarlhens%2Fnest-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmarlhens%2Fnest-boilerplate/lists"}