Real-Time Chat Application

Horizontally scalable chat experience with Redis pub/sub fan-out, fine-grained channel permissions, and encrypted message storage. Includes presence indicators, file delivery, and long-term archival.

ReactSocket.ioExpressMongoDBRedisAWS S3
Real-Time Chat Application preview

Real-Time Chat Application

A horizontally scalable messaging platform tuned for high concurrency and persistent messaging.

Key Features

  • Group and direct channels, each with granular permission policies.
  • Typing indicators, read receipts, and presence tracking backed by Redis.
  • File and media sharing routed through signed AWS S3 URLs.
  • Searchable history with message retention controls per workspace.

Architecture Overview

Messages are published through a gateway using WebSockets. Redis pub/sub fans updates out to workers that handle persistence in MongoDB. Background jobs archive older messages to S3 and keep the search index fresh.

Local Development

  1. terminal
    pnpm install
  2. Copy
    terminal
    .env.example
    to
    terminal
    .env
    and configure Redis, MongoDB, and S3 credentials.
  3. Run
    terminal
    pnpm dev
    to start both the API and client using turborepo pipelines.

Deployment Tips

  • Scale horizontally by increasing the number of API pods; sticky sessions are not required thanks to Redis.
  • Enable autoscaling alerts to detect spikes in fan-out operations.
  • Rotate encryption keys regularly; the key schedule is handled by AWS KMS.
Project Links
Live Demo
Highlights
  • Group and direct channels with role permissions
  • File and media sharing with signed URLs
  • Typing indicators, read receipts, and presence
  • Message search across archives
  • Observability dashboards for ops
Key Challenge

Balanced horizontal scaling with consistent ordering by leveraging Redis streams for message fan-out.

Anant Kumar

Bridging the gap between high-level applications and low-level systems. Crafting resilient software with a focus on performance and observability.

Expertise

  • Systems Engineering
  • Full Stack Development
  • Cloud Infrastructure
  • Digital Signal Processing
  • Embedded Systems

Stay Connected

Open to opportunities and interesting conversations.

Get in Touch

© 2026 Anant Kumar. All rights reserved.

Systems Operational