How yves1da2vinci3/whatsapp-backend works
Main Components Identification
a) Core Services:
• Authentication Service (app/auth)
• Chat Service (app/chats)
• Stories Service (app/stories)
• Calls Service (app/calls)
• Upload Service (app/upload)
b) Infrastructure Components:
• FastAPI Application Server
• MongoDB Database (indicated by alembic migrations)
• Redis Cache
• MinIO Object Storage
• Socket.io Server
• Prometheus Monitoring
External Clients (Mobile/Web Apps)
• ↓
API Gateway (FastAPI)
Auth Service → Chat Service → Stories Service → Calls Service
• ↓ ↓ ↓ ↓
Shared Utils (Token, OTP, Mail, Socket)
MongoDB → Redis → MinIO → Socket.io
Specific Implementation Details
a) Authentication Flow:
Client → Auth Service → OTP Service → Redis
• ↘ Token Service
b) Real-time Communication:
Client ⇔ Socket.io ⇔ Chat Service
• ⇔ Calls Service
c) Media Handling:
Upload Service → MinIO
• ↓
Chat/Stories Services
Additional Elements
Important aspects:
• Database schemas (shown in ERD from README)
• API endpoints grouping
• Monitoring setup with Prometheus
• Docker container boundaries