An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# Nest API Starter

---


Nest Logo

[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.