Skip to content

primemb/chatt-nestjs

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

NestJS Chat Application with Microservices Architecture

This repository contains a simple Chat Application built with NestJS, showcasing a modular microservices architecture. The project includes real-time messaging powered by WebSockets, as well as RESTful APIs for chat management and user authentication.

Features

Auth Service

  • JWT Authentication: Secure authentication using private/public key for token signing and verification.
  • Token Validation: Seamless token validation across all microservices. run on port 3002 by default
  • Endpoints:
    • /login: Authenticate users and issue tokens.
    • /register: create new user.

Chat Service

  • RESTful API: Provides endpoints to create and manage chat sessions. run on port 3000 by default
  • Endpoints:
    • /chats: Create new chats.

WebSocket Service

  • Real-Time Messaging: Enables users to subscribe to and exchange messages in real-time. run on port 3001 by default
  • WebSocket Events:
    • chat_created: Subscribe to chat

Architecture

  • Microservices: Each service is isolated and communicates via RMQ transport.
  • Dockerized: Fully containerized for simplified deployment and scaling.
  • Shared Modules: Reusable modules for common functionality across services.

Getting Started

Prerequisites

  • Docker & Docker Compose installed.

Installation

  1. Clone the repository:

    git clone https://github.com/your-repo-link.git
    cd your-repo-link
  2. Change .env.development inside each /apps if needed

  3. Run

    docker compose up --build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published