How jaewon4/poki works
Main Components
• Client (Frontend):
– React-based single-page application with pages for signing in, chatting, mission management, video calls, and more.
– Integrates PWA elements (service workers, manifest.json) and Firebase for messaging.
– Organized into logical areas (components, pages, hooks, etc.).
• Server (Backend):
– Built with NestJS, which is organized into various modules such as auth, board, mission, event (chat messaging), push notifications, video-chat, and wishlist.
– Contains dedicated controllers, services, DTOs, repositories, and tests for each domain.
• Infrastructure / External Services:
– Database: Likely MySQL for persistent storage.
– Cache/Session: Redis, as indicated by the redis module.
– WebRTC and real-time communications: WebRTC, Socket.IO, and PeerJS for video calling and chat.
– DevOps/Deployment: AWS components (Route 53, CloudFront, ALB, ACM, S3) and GitHub Actions for deployment.
Relationships and Data Flow
• Client to Server:
– The React client makes API calls (documented in client/src/api) to the NestJS server endpoints.
– The backend handles authentication, mission registration, wish list updates, real-time chat, and video services.
• Server Internal Module Interactions:
– Each NestJS module (e.g., auth, board, mission, video-chat) encapsulates its own controller, service, and repository layers.
– Events for chat use real-time gateways (WebSocket/Socket.IO) to maintain communication channels.
• External Service Integration:
– Firebase messaging is integrated in the client for notifications.
– The backend interacts with MySQL for structured data and Redis for caching operations or session management.
– WebRTC/PeerJS facilitate direct video communications among users, making use of the backend as a signaling server when necessary.
Architectural Patterns
• Separation of Concerns: The project clearly separates presentation (client) from business logic and data management (server).
• Modularization: The NestJS backend is divided into modules (auth, board, mission, etc.), each with its own DTOs, services, and repositories.
• Real-Time Communication: Use of WebSocket-based real-time communication via Socket.IO and integration with WebRTC shows a mix of pub/sub or event-driven patterns.
• PWA and Responsive Design: The frontend configuration (service workers and manifest) signifies a mobile-friendly, installable app design.
Relevant Technologies and Frameworks
• Frontend: React, Tailwind CSS, Recoil for state management, Firebase.
• Backend: NestJS, TypeScript, various NestJS decorators, JWT authentication, and domain-specific modules.
• Communication: Socket.IO, PeerJS, WebRTC.
• Databases/Cache: MySQL and Redis.
• DevOps: GitHub Actions, AWS services.