Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 1.17 KB

README.md

File metadata and controls

42 lines (25 loc) · 1.17 KB

TranslateByAi

NestJS microservices show case

Tech Stack

  • NestJS
  • NATS (Message Broker)
  • GraphQL API (CodeFirst)
  • Vite+React+TypeScript+Tailwind (Simple Frontend to use API)
  • Lerna (Monorepo)

Description

This is a simple show case of NestJS microservices. It has 3 microservices:

  1. packages\api - GraphQL API microservice
  2. packages\ai - translation microservice (uses ChatGPT API), event-based communications.
  3. packages\user - user microservice (create\find and etc), message-based communcations.

It works through event-based communication. All messages are non-blocking and are sent through the NATS message broker. There could be multiple instances of the AI microservice, which will be automatically load balanced by NATS using a queue.

Structure

How to run

  1. npm run start:nats-server
  2. npm run start:dev

Screenshots