How prgrms-be-devcourse/nbe4-5-3-team04 works
Main Components
• Frontend – The Next.js application (in the “frontend” folder) that handles the UI/UX aspects and interacts with backend APIs. Include subcomponents like:
• Pages for posts, chat, member profiles, notifications, etc.
• Utility libraries and service layers (e.g., authentication service, notification service, map components).
• Backend – The Spring Boot application (in the “backend” folder) that serves as the API server. Key modules include:
• Domain modules such as:
▸ Chat (with WebSocket configuration, controllers, DTOs, repositories, services)
▸ Member (user management, social features such as follow functionality)
▸ Notification (with REST and SSE controllers, event listener, and service)
▸ Place (location-related functionalities)
▸ Post (handling posts, comments, likes, scraps including validations and mappers)
▸ Rank (providing ranking and popularity functionalities)
• Global configurations (security, aspect logging, web configuration, error handling, etc.)
• Dockerfile and Gradle build scripts indicating build automation and containerization setup.
• Database – Represent your database (MySQL, with H2 for testing) which supports the backend data persistence.
• External Services – Indicate integrations such as:
• Social Login (social authentication via Naver and Google).
• WebSocket for real-time chat.
• Possibly external API providers for maps (as seen from “kakaoMapLoader.ts”) and other services.
Interactions and Data Flow
• The Frontend communicates with the Backend via REST APIs for data (members, posts, notifications, etc.) and WebSocket endpoints (for live chat).
• Authentication flows would show browser–>authentication endpoints (also handling OAuth social login) and then proceeding with member operations.
• The Backend then interacts with the Database (CRUD operations on various domain entities) and uses internal service layers to coordinate business logic.
• Additionally, the backend might publish domain events (notification events, etc.) and, through SSE (Server-Sent Events) or WebSocket, push updates to the frontend.
Architectural Patterns & Design Principles
• Layered Architecture (Controller → Service → Repository → Entity): Each domain (chat, member, etc.) follows this pattern for separation of concerns.
• Micro-modular design within the backend: Each functional domain is segregated into its own package tree, making it clean to show modules such as “chat,” “member,” “notification,” “place,” “post,” and “rank.”
• Use of WebSockets for chat and SSE for notifications, which illustrates event-driven communication between components.
• Containerization: Include Docker components for both backend and frontend for deployment consistency.
• CI/CD Pipelines: GitHub workflows for CI and CD are part of the repository, indicating automated builds and tests.
Elements
• Clear Labels: Name each component (e.g., “Next.js Frontend,” “Spring Boot Backend – Chat Module”, “Member Management Module”, “MySQL Database”).
• Deployment and CI/CD: Optionally denote the Docker containers and GitHub workflows to illustrate the DevOps side.
• Communication Patterns: Highlight API calls, WebSocket channels for chat, and SSE for notifications.