# woowacourse/service-apply architecture

> Architecture diagram of the GitHub repository woowacourse/service-apply, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/woowacourse/service-apply
- Repository: https://github.com/woowacourse/service-apply

## Overview

##### Main Components

a. Frontend Layer:
- React-based web application (in /frontend directory)
- Component structure with common UI elements
- Pages for different recruitment processes
- State management using contexts and hooks

b. Backend Layer:
- Kotlin-based Spring Boot application
- Domain-driven design architecture
- REST API endpoints
- Authentication/Security layer

c. Database Layer:
- Relational database (indicated by JPA/SQL migrations)
- Multiple domain entities (User, Recruitment, Application, etc.)

d. External Services:
- AWS SQS for judgment processing
- AWS SES for email handling
- GitHub integration for code assessment
- Elastic Beanstalk for deployment

**[Client Layer]**
- ↓ ↑
**[API Gateway/Load Balancer]**
- ↓ ↑
**[Application Layer]**
- ↓ ↑
**[Domain Layer]**
- ↓ ↑
**[Infrastructure Layer]**

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        FE[Frontend Application]:::frontend
        COMP[Components]:::frontend
        PAGES[Pages]:::frontend
        STATE[State Management]:::frontend
        API_INT[API Integration]:::frontend

        FE --> COMP
        FE --> PAGES
        FE --> STATE
        FE --> API_INT
    end

    subgraph API_Gateway
        LB[Load Balancer]:::infra
        SEC[Security Layer]:::security
        JWT[JWT Provider]:::security
        CORS[CORS Config]:::security

        LB --> SEC
        SEC --> JWT
        SEC --> CORS
    end

    subgraph Backend
        REST[REST Controllers]:::backend
        CORE[Core Application]:::backend
        DOM[Domain Logic]:::backend
        ADMIN[Admin Interface]:::backend

        REST --> CORE
        CORE --> DOM
        ADMIN --> CORE
    end

    subgraph Infrastructure
        DB[(Database)]:::database
        REPO[Entity Repositories]:::database
        MIGR[DB Migrations]:::database
        
        AWS_SQS[AWS SQS]:::external
        AWS_SES[AWS SES]:::external
        GH[GitHub Integration]:::external
        
        DB --> REPO
        DB --> MIGR
    end

    API_INT --> LB
    LB --> REST
    REST --> DB
    CORE --> AWS_SQS
    CORE --> AWS_SES
    CORE --> GH

    %% Click Events
    click FE "https://github.com/woowacourse/service-apply/tree/master/frontend/src"
    click COMP "https://github.com/woowacourse/service-apply/tree/master/frontend/src/components"
    click PAGES "https://github.com/woowacourse/service-apply/tree/master/frontend/src/pages"
    click STATE "https://github.com/woowacourse/service-apply/tree/master/frontend/src/provider"
    click API_INT "https://github.com/woowacourse/service-apply/tree/master/frontend/src/api"
    click REST "https://github.com/woowacourse/service-apply/tree/master/src/main/kotlin/apply/ui/api"
    click CORE "https://github.com/woowacourse/service-apply/tree/master/src/main/kotlin/apply/application"
    click DOM "https://github.com/woowacourse/service-apply/tree/master/src/main/kotlin/apply/domain"
    click SEC "https://github.com/woowacourse/service-apply/tree/master/src/main/kotlin/apply/security"
    click JWT "https://github.com/woowacourse/service-apply/blob/master/src/main/kotlin/apply/security/JwtTokenProvider.kt"
    click CORS "https://github.com/woowacourse/service-apply/blob/master/src/main/kotlin/apply/config/CorsConfig.kt"
    click MIGR "https://github.com/woowacourse/service-apply/tree/master/src/main/resources/db/migration"
    click REPO "https://github.com/woowacourse/service-apply/tree/master/src/main/kotlin/apply/domain"
    click AWS_SQS "https://github.com/woowacourse/service-apply/blob/master/src/main/kotlin/apply/infra/judgment/SqsClient.kt"
    click AWS_SES "https://github.com/woowacourse/service-apply/blob/master/src/main/kotlin/apply/infra/mail/AwsMailSender.kt"
    click GH "https://github.com/woowacourse/service-apply/blob/master/src/main/kotlin/apply/infra/github/GitHubClient.kt"
    click ADMIN "https://github.com/woowacourse/service-apply/tree/master/src/main/kotlin/apply/ui/admin"

    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef security fill:#e74c3c,stroke:#c0392b,color:white
    classDef database fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef external fill:#f1c40f,stroke:#f39c12,color:black
    classDef infra fill:#34495e,stroke:#2c3e50,color:white

    %% Legend
    subgraph Legend
        F[Frontend]:::frontend
        B[Backend]:::backend
        S[Security]:::security
        D[Database]:::database
        E[External Services]:::external
        I[Infrastructure]:::infra
    end
```
