https://github.com/bradlab/nest-devops-starter
A modern boilerplate for building scalable NestJS applications with a clean DevOps setup. Includes Docker, CI/CD with GitHub Actions, Prettier, ESLint, Jest, and production-ready configuration. Perfect for quickly bootstrapping professional Node.js backends with best practices out of the box.
https://github.com/bradlab/nest-devops-starter
backend cicd clean-code devops docker github-actions linter nestjs postgresql software-architecture typescript unit-testing
Last synced: 3 months ago
JSON representation
A modern boilerplate for building scalable NestJS applications with a clean DevOps setup. Includes Docker, CI/CD with GitHub Actions, Prettier, ESLint, Jest, and production-ready configuration. Perfect for quickly bootstrapping professional Node.js backends with best practices out of the box.
- Host: GitHub
- URL: https://github.com/bradlab/nest-devops-starter
- Owner: bradlab
- Created: 2025-04-18T21:26:42.000Z (about 1 year ago)
- Default Branch: develop
- Last Pushed: 2025-06-17T22:23:53.000Z (about 1 year ago)
- Last Synced: 2025-06-17T23:18:30.487Z (about 1 year ago)
- Topics: backend, cicd, clean-code, devops, docker, github-actions, linter, nestjs, postgresql, software-architecture, typescript, unit-testing
- Language: TypeScript
- Homepage:
- Size: 309 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nest API Starter
---
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
---
## đ§± Stack technique
- **Langage** : TypeScript
- **Framework** : [NestJS](https://nestjs.com/)
- **Base de données** : PostgreSQL
- **ORM** : TypeORM
- **Conteneurisation** : Docker + Docker Compose
- **Architecture** : Architecture modulaire
---
## đ DĂ©marrage rapide
### 1. Cloner le dépÎt
```bash
git clone https://github.com/bradlab/robassime-api.git
cd robassime-api
```
### 2. Installer les dépendances
#### Avec npm :
```bash
npm install
```
#### Avec yarn :
```bash
yarn install
```
---
### 3. Configurer les variables dâenvironnement
CrĂ©e un fichier `.env` Ă la racine du projet en tâinspirant du fichier `.env.example` :
```env
# Exemple de configuration
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USERNAME=postgres
DATABASE_PASSWORD=postgres
DATABASE_NAME=robassime
PORT=3000
```
---
### 4. Lancer lâapplication en mode dĂ©veloppement
#### Avec npm :
```bash
npm run start:dev
```
#### Avec yarn :
```bash
yarn start:dev
```
LâAPI sera accessible par dĂ©faut sur [http://localhost:3000](http://localhost:3000)
---
## đł Utilisation avec Docker
### 1. Lancer lâenvironnement complet
```bash
docker-compose up --build
```
Cela démarre :
- LâAPI NestJS
- La base de données PostgreSQL
---
### 2. ArrĂȘter les conteneurs
```bash
docker-compose down
```
---
## đ Structure du projet
```
âââ .gitignore # Fichiers Ă ignorer par Git
âââ .husky/ # Hooks Git (ex. : pre-commit)
âââ .github/
â âââ workflows/ # Fichiers de configuration GitHub Actions (CI/CD)
âââ commitlint.config.cjs # Configuration pour le lint des messages de commit
âââ docker-compose.yml # Configuration multi-conteneurs Docker (API + DB)
âââ Dockerfile # Image Docker de l'application
âââ jest.config.json # Configuration de Jest (tests unitaires)
âââ nest-cli.json # Configuration spĂ©cifique Ă NestJS CLI
âââ package.json # DĂ©pendances NPM et scripts de projet
âââ releaserc.json # Configuration de Semantic Release
âââ tsconfig.json # Configuration du compilateur TypeScript
âââ yarn.lock # Verrouillage des versions Yarn
âââ src/ # Code source
ââââutil
```
---
## đ ïž Scripts utiles
| Commande | npm | yarn |
|---------------------------------|---------------------------|--------------------------|
| Start the project | `npm run start` | `yarn start` |
| Development mode | `npm run start:dev` | `yarn start:dev` |
| Compiler | `npm run build` | `yarn build` |
| Lint | `npm run lint` | `yarn lint` |
| Tests unitaires | `npm run test` | `yarn test` |
| Tests en mode watch | `npm run test:watch` | `yarn test:watch` |
| Typescript check | `npx tsc` |
| Husky Hooks | `npm run init:hooks` | `yarn init:hooks` |
---
## đ§Ș Tests
#### Avec npm :
```bash
npm run test
```
#### Avec yarn :
```bash
yarn test
```
---
## đ§Ÿ Migrations TypeORM
#### Create a migration :
```bash
npm run typeorm migration:create -- -n migratinName
# ou
yarn typeorm migration:create -n migratinName
```
#### Execute migrations :
```bash
npm run typeorm migration:run
# ou
yarn typeorm migration:run
```
#### Rollback the migration :
```bash
npm run typeorm migration:revert
# ou
yarn typeorm migration:revert
```
## đ« Contact
For any questions or contributions :
- Author : **bradlab**
- Email : `matbradiouf@gmail.com`
- GitHub : [https://github.com/bradlab](https://github.com/bradlab)
---
## đ Licence
This project is licensed under the **MIT** license. See the `LICENSE` file for more information.