GitHub Hot Board

GitHub Hot Board · Archive du dépôt

Denrox/nestjs-microservices-example

A working example of microservice architecture implementation using nestjs framework. (Cette description provient du dépôt lui-même.)

Données au October 26Denrox

Meilleur rang

#48

Jalons en direct

996

Étoiles totales

274

Forks totaux

5

Jours classés (30 j)

État du projetLicence: inconnuDernier push: October 22Issues ouvertes (PR incl.): 9

Collecté depuis 2026-10-25 ; inconnu = pas encore récolté

Mettez le badge dans votre README · Denrox/nestjs-microservices-example[![Mettez le badge dans votre README](https://git.vaiox.xyz/api/badge/Denrox/nestjs-microservices-example.svg)](https://git.vaiox.xyz/fr/repo/Denrox/nestjs-microservices-example)
<a href="https://git.vaiox.xyz/fr/repo/Denrox/nestjs-microservices-example"><img src="https://git.vaiox.xyz/api/badge/Denrox/nestjs-microservices-example.svg" alt="Mettez le badge dans votre README" height="20"></a>

Documentation du projet

This repository shows how you can build API with microservice architecture using nestjs

Features of this example

This example is basically an API for some task manager application. It provides a possibility to perform sign up users, confirm user's emails, manage user's tasks.

Running the example with docker-compose

Execute docker network create infrastructure && cp .env.example .env && docker compose up -d from the root of the repository

Accessing the API itself and swagger docs for the API

  • Once you launch the API it will be accessible on port 8000.
  • Swagger docs for the API will be accessible locally via URI "http://localhost:8000/api"

Launch services for integration testing (using docker-compose)

  • Execute sudo vim /etc/hosts and add line 127.0.0.1 db to it. This is a temporary step, it will not be required since new update.
  • Execute cp .env.example .env && cp .env.test.example .env.test
  • Execute docker compose -f ./docker-compose.test.yml up -d from the root of the repository
  • Run cd ./gateway && npm install && npm run test from the root of this repo

Brief architecture overview

This API showcase consists of the following parts:

  • API gateway
  • Token service - responsible for creating, decoding, destroying JWT tokens for users
  • User service - responsible for CRUD operations on users
  • Mailer service - responsible for sending out emails (confirm sign up)
  • Permission service - responsible for verifying permissions for logged in users.
  • Tasks service - responsible for CRUD operations on users tasks records
  • The service interact via TCP sockets

This example uses a SINGLE database (MongoDB) instance for all microservices. This is not a correct point, the correct way is to use a separate DB instance for every microservice. I used one DB instance for all microservices to simplify this example.

Classements actuels

  • 48

    Jalons en direct

    996 stars · 274 fork · Stars jusqu’à la prochaine ligne

    Jalons →

Évolution sur 30 jours

Étoiles cumulées

Évolution du rang

Gain quotidien

Voisins de classement sur le même tableau · Jalons

Projets similaires · sujets partagés

← Retour aux classements