Skip to content

parth3083/Chatter-Chimp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatter Chimp

A real-time chat application built with a microservices architecture using Node.js, TypeScript, and Docker.

⚠️ This is a basic implementation designed for learning and demonstration purposes.


Architecture Overview

┌─────────────────────────────────────────────────────────────────────────────┐
│                              Chatter Chimp                                  │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│   ┌─────────────┐   ┌─────────────┐   ┌─────────────┐   ┌───────────────┐  │
│   │    Auth     │   │    Group    │   │    Chat     │   │ Notification  │  │
│   │   Service   │   │   Service   │   │   Service   │   │   Service     │  │
│   │  (8001)     │   │  (8002)     │   │  (8003)     │   │   (Worker)    │  │
│   └──────┬──────┘   └──────┬──────┘   └──────┬──────┘   └───────┬───────┘  │
│          │                 │                 │                   │          │
│          └─────────────────┴────────┬────────┴───────────────────┘          │
│                                     │                                       │
│                            ┌────────┴────────┐                              │
│                            │    RabbitMQ     │                              │
│                            │  (Event Broker) │                              │
│                            └─────────────────┘                              │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Services

Service Port Description Tech Stack
Auth Service 8001 User registration, login & JWT authentication Express, PostgreSQL, Redis, Drizzle
Group Service 8002 Group creation & membership management Express, PostgreSQL, Redis, Drizzle
Chat Service 8003 Real-time messaging via WebSocket Express, MongoDB, Redis, Socket.io
Notification Service Email notifications (event-driven worker) Node.js, RabbitMQ, Nodemailer

For detailed API documentation, refer to each service's README in apps/<service-name>/.


Quick Start with Docker

Prerequisites

  • Docker & Docker Compose installed
  • Ports 5672, 8001, 8002, 8003 available

Step 1: Create the Shared Network

docker network create chatter_chimp_shared_network

Step 2: Start RabbitMQ

cd infrastructure/rabbitMQ
docker-compose up -d

Step 3: Start Each Service

Open separate terminals and run:

# Auth Service
cd apps/auth-service
docker-compose up --build

# Group Service
cd apps/group-service
docker-compose up --build

# Chat Service
cd apps/chat-service
docker-compose up --build

# Notification Service
cd apps/notification-service
docker-compose up --build

Tip: Add -d flag to run in detached mode.


Project Structure

Chatter-Chimp/
├── apps/
│   ├── auth-service/          # Authentication microservice
│   ├── group-service/         # Group management microservice
│   ├── chat-service/          # Real-time chat microservice
│   └── notification-service/  # Email notification worker
├── infrastructure/
│   └── rabbitMQ/              # RabbitMQ Docker setup
├── packages/                  # Shared packages & configs
└── turbo.json                 # Turborepo configuration

Development

Local Development

# Install dependencies (from root)
bun install

# Run all services in dev mode
turbo dev

# Run a specific service
turbo dev --filter=auth-service

Environment Variables

Each service requires its own .env file. Refer to the README of each service for the required variables:


License

ISC

About

A real-time chat application built with a microservices architecture using Node.js, TypeScript, and Docker.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors