How p0nch0d3v/scrum-poker works
Main Components
• Backend API (apps/api): This is built with Nestjs. Within it, you have clearly defined modules (auth, config, room, serie, user). Note the migration scripts and WebSocket-specific components (e.g., socket.gateway.ts, socket.service.ts) which indicate real-time communication in the room functionalities.
• Frontend Client (apps/client): A Vite-powered React application with numerous components (JoinRoom, CreateRoom, Login, etc.), context providers, hooks, and services that perform API communication.
• Shared Code and Models (apps/common & apps/models): These directories house common utilities and strongly typed DTOs/models that can be consumed by both frontend and backend.
• Supporting Infrastructure: Docker-related files (Dockerfile, docker-compose.yml, docker_entry_point.sh) and CI/CD workflows (under .github/workflows) indicate containerized deployment and automated builds/tests.
Relationships and Interactions
• Real-time Data Flow: Highlight the WebSocket mechanisms present in the “room” module (socket.gateway.ts & socket.service.ts) which manage bidirectional communication for live updates.
• Shared Modules/Models: Show that both the backend (apps/api) and possibly the frontend (indirectly via types/interfaces) depend on the DTOs and entities located in apps/models. A shared common module (apps/common) may also be used across different parts of the system.
Architectural Patterns and Design Principles
• Modular Architecture: In the backend, separate modules (for auth, config, room, etc.) enforce the modular design of Nestjs.
• Separation of Concerns: The client’s separation into components, hooks, contexts, and services ensures clear delineation between UI, state management, and business logic.
• Containerization and CI/CD: With Dockerfiles and GitHub workflows configured for both development and production environments, highlight how containerization encapsulates the app and automated pipelines help in continuous deployment.
• Shared Contracts: Including a common models layer that supplies DTO definitions reinforces consistency between API contracts and UI expectations.