Learn how to build a production-ready microservices chat application from scratch and deploy it using Docker Compose & Dokploy for self-hosting!
In this complete tutorial, we'll build a Slack/Discord-style chat app using a modern microservices architecture with 4 services:
✅ API Gateway - Single entry point for all client requests
✅ Auth Service - User registration, login & JWT tokens (MySQL)
✅ User Service - User profiles & data management (PostgreSQL)
✅ Chat Service - Conversations & messages (MongoDB + Redis caching)
All services communicate through RabbitMQ for event-driven messaging, ensuring they stay decoupled and scalable.
CONNECT WITH ME:
Try My Analytic Tool: https://glancelytics.com
My portfolio : https://www.fiston.net
Discord: / discord
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛠️ TECH STACK:
• TypeScript & Express.js
• MongoDB, PostgreSQL, MySQL
• Redis for caching
• RabbitMQ for message queues
• Docker & Docker Compose
• Dokploy for self-hosting
• pnpm monorepo
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📚 WHAT YOU'LL LEARN:
• Microservices architecture design & implementation
• Service-to-service communication patterns
• JWT authentication across multiple services
• Database selection strategies for different use cases
• Caching strategies with Redis
• Event-driven architecture with message queues
• Containerization with Docker Compose
• Self-hosting with Dokploy for production deployment
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⏱️ TIMESTAMPS:
0:00 - Introduction
2:08 - Project Setup
20:58 - Setup Shared Utils
1:00:23 - Auth Service Setup
1:42:25 - Auth Service Database
1:55:33 - User Auth Service
2:56:47 - API Gateway Setup
4:00:25 - RabbitMQ
4:34:00 - User Service Setup
5:04:01 - User Event Consumer
5:56:11 - Finishing Auth Service
6:22:08 - User Service Methods
7:48:36 - Chat Service Setup
8:20:11 - Chat Service Event Consumer
10:09:42 - Backend Deployment
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔗 RESOURCES:
📦 Source Code: https://github.com/fiston-user/chatap...
📖 Get VPS: https://www.linode.com/lp/refer/?r=5f...
📖 Dokploy: https://dokploy.com
📖 Setup Dokploy on VPS (Hetzner): https://community.hetzner.com/tutoria...
📖 RabbitMQ: https://www.rabbitmq.com
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 Drop a comment if you have questions!
👍 Like & Subscribe for more backend & DevOps tutorials
#microservices #nodejs #typescript #docker #chatapp #rabbitmq #redis #mongodb #selfhosted #dokploy #backend #webdevelopment