How swm-fire/modoco-backend works
Main Components
a) Client Layer (External)
• Web Clients
• Mobile Clients (if any)
b) API Gateway Layer
• HTTP REST API Server (NestJS)
• WebSocket Server (Socket.IO)
• Swagger Documentation
c) Core Service Layer
• Authentication Service (Multiple OAuth providers)
• User Management Service
• Room Management Service
• Friends Service
• Session Management Service
• Email Service
• Records Service
d) Real-time Communication Layer
• WebSocket Gateways
• Room Gateway
• Lobby Gateway
• Playlist Gateway
e) Data Storage Layer
• PostgreSQL Database (via Prisma ORM)
• Redis (for session and real-time features)
f) External Services
• Kakao OAuth
• Google OAuth
• GitHub OAuth
• AWS SES (for email)
Relationship Flows to Highlight
• WebSocket connections between clients and Socket.IO server
• Database relationships with Prisma as the intermediary
• Redis connections for real-time features and caching
• Authentication flows with external OAuth providers
Important Details
• NestJS Modules structure
• Prisma ORM integration
• Redis session and message stores
• WebSocket event flow
• Authentication flow with multiple providers
• Database schema relationships (high-level)