# woowacourse-teams/2023-votogether architecture

> Architecture diagram of the GitHub repository woowacourse-teams/2023-votogether, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/woowacourse-teams/2023-votogether
- Repository: https://github.com/woowacourse-teams/2023-votogether

## Overview

##### Main System Components
- Database: Indicate a persistent storage system that the backend connects to. Although the file tree does not explicitly list a database, the presence of repository classes implies a database (likely relational).
- External Services: Identify components such as external OAuth (e.g., Kakao authentication client) and integration with Slack (as evidenced by the GitHub workflow scripts and Slack appender configuration). Also, include Redis (configured via RedisConfig) and image uploading services from the “infra/image” package.
- CI/CD Pipeline: Represent the GitHub workflows as part of the development process to illustrate automated testing, PR checks, and deployment pipelines for both the backend and frontend components.

##### Relationships and Data Flows
- How user interactions on the Frontend send REST API requests to the Backend Server.
- In the Backend, show flow: requests reach Controllers → invoke Service layer → call Repository/Data Access Objects for CRUD operations.
- Integration points for logging (global log config and log interceptor classes) and error handling through global exception handling modules.

##### Architectural Patterns and Key Details
- The Backend follows a modular “domain-driven design”, where each domain (alarm, auth, etc.) is separated into its own package with controller, DTO, service, entity, repository, and exception handling subpackages.
- The Frontend uses component-based design with Storybook for UI component development, and it includes both unit and end-to-end testing using Jest and Cypress.
- Use of middleware such as JWT authentication filters and OAuth integration.
- That CI/CD processes help ensure code quality with distinct workflows for pull requests, testing, and deployment (including lighthouse for frontend performance).

## Diagram (Mermaid)

```mermaid
flowchart TD
    CICD["CI/CD Pipeline (GitHub Workflows)"]:::cicd
    Frontend["Frontend (React/TypeScript)"]:::frontend
    Backend["Backend (Spring Boot)"]:::backend
    DB["Database (Relational)"]:::database

    subgraph "Backend Modules"
        Alarm["Alarm Module"]:::domain
        Auth["Auth Module"]:::domain
        Category["Category Module"]:::domain
        Member["Member Module"]:::domain
        Healthcheck["Healthcheck Module"]:::domain
        Notice["Notice Module"]:::domain
        Post["Post Module"]:::domain
        Ranking["Ranking Module"]:::domain
        Report["Report Module"]:::domain
        Vote["Vote Module"]:::domain
    end

    subgraph "External Services"
        OAuth["OAuth (Kakao)"]:::external
        Slack["Slack Integration"]:::external
        Redis["Redis Cache"]:::external
        ImageUpload["Image Uploading Service"]:::external
    end

    CICD -->|"deploys"| Frontend
    CICD -->|"deploys"| Backend

    Frontend -->|"HTTP_calls"| Backend
    Backend -->|"DB_operations"| DB
    Backend -->|"calls_externals"| OAuth
    Backend -->|"calls_externals"| Slack
    Backend -->|"calls_externals"| Redis
    Backend -->|"calls_externals"| ImageUpload

    Auth -->|"OAuth_integration"| OAuth

    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef backend fill:#FFCCCB,stroke:#000,stroke-width:2px;
    classDef domain fill:#F0E68C,stroke:#000,stroke-width:2px;
    classDef external fill:#D3D3D3,stroke:#000,stroke-width:2px;
    classDef cicd fill:#98FB98,stroke:#000,stroke-width:2px;
    classDef database fill:#FFD700,stroke:#000,stroke-width:2px;

    click Frontend "https://github.com/woowacourse-teams/2023-votogether/tree/dev/frontend/" "Frontend Codebase"
    click Backend "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/" "Backend Codebase"
    click Alarm "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/src/main/java/com/votogether/domain/alarm" "Alarm Module"
    click Auth "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/src/main/java/com/votogether/domain/auth" "Auth Module"
    click Category "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/src/main/java/com/votogether/domain/category" "Category Module"
    click Member "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/src/main/java/com/votogether/domain/member" "Member Module"
    click Healthcheck "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/src/main/java/com/votogether/domain/healthcheck" "Healthcheck Module"
    click Notice "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/src/main/java/com/votogether/domain/notice" "Notice Module"
    click Post "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/src/main/java/com/votogether/domain/post" "Post Module"
    click Ranking "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/src/main/java/com/votogether/domain/ranking" "Ranking Module"
    click Report "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/src/main/java/com/votogether/domain/report" "Report Module"
    click Vote "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/src/main/java/com/votogether/domain/vote" "Vote Module"
    click OAuth "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/src/main/java/com/votogether/domain/auth/service/oauth" "OAuth Integration"
    click Slack "https://github.com/woowacourse-teams/2023-votogether/blob/dev/backend/src/main/java/com/votogether/global/log/log4j2/SlackAppender.java" "Slack Integration"
    click Redis "https://github.com/woowacourse-teams/2023-votogether/blob/dev/backend/src/main/java/com/votogether/global/config/RedisConfig.java" "Redis Cache Config"
    click ImageUpload "https://github.com/woowacourse-teams/2023-votogether/tree/dev/backend/src/main/java/com/votogether/infra/image" "Image Uploading Service"
    click CICD "https://github.com/woowacourse-teams/2023-votogether/tree/dev/.github/workflows" "CI/CD Pipeline Workflows"
```
