# minji1104/closer architecture

> Architecture diagram of the GitHub repository minji1104/closer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/minji1104/closer
- Repository: https://github.com/minji1104/closer

## Overview

##### Main Components

Frontend Layer:
- React.js Application Structure
- Pages (Login, Signup, Profile, Board, etc.)
- Components (organized by feature)
- State Management (Redux modules)
- Asset Management
- Styling System

Backend Layer:
- Spring Boot Application
- Controllers (User, Board, Follow, Alarm, Search)
- Services Layer
- Data Access Layer (Mappers)
- JWT Authentication
- AOP Logging
- Swagger API Documentation

Database Layer:
- MySQL Database
- User-related tables
- Board-related tables
- Follow/Social tables
- Alarm/Notification tables

External Services:
- Naver Search API
- Naver Maps API
- AWS Deployment Infrastructure

##### Component Relationships

**Frontend ←→ Backend (REST API)**
- ↑          ↑

- ↓          ↓
**External    Database**
**Services**

##### Detailed Component Breakdown

Frontend Modules:
**React Application**
- Core Components
- Authentication (Login/Signup)
- Profile Management
- Feed System
- Messaging
- Feature Components
- Board Management
- Search functionality
- Notification System
- Shared Components
- Navigation
- UI Elements

Backend Services:
**Spring Boot Application**
- API Controllers
- User Management
- Content Management
- Social Features
- Search Integration
- Service Layer
- Business Logic
- External API Integration
- Data Access
- MyBatis Mappers
- Database Connections

##### Special Features to Highlight

- JWT Authentication Flow
- Real-time Notification System
- Bot Alarm System
- Location-based Services
- Badge System
- Follow/Unfollow Mechanism

##### Data Flow Patterns

Following flows:
- User Authentication Process
- Content Creation/Retrieval
- Social Interaction Flow
- Notification Distribution
- Search Operations

##### Infrastructure Layer

Deployment components:
- AWS Infrastructure
- Database Servers
- API Gateway
- Static Content Delivery

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        FPages["Pages"]:::frontend
        FComponents["Components"]:::frontend
        FState["State Management"]:::frontend
        FStyles["Styles"]:::frontend
        FAssets["Assets"]:::frontend
        FAPI["API Service Layer"]:::frontend

        subgraph FComponents
            AlarmComp["Alarm Component"]:::frontend
            BoardComp["Board Component"]:::frontend
            SearchComp["Search Component"]:::frontend
            ProfileComp["Profile Component"]:::frontend
        end
    end

    subgraph Backend
        Controllers["Controllers"]:::backend
        Services["Services Layer"]:::backend
        DataAccess["Data Access Layer"]:::backend
        JWT["JWT Authentication"]:::backend
        AOP["AOP Logging"]:::backend
        Swagger["Swagger API Docs"]:::backend

        subgraph Controllers
            UserCtrl["User Controller"]:::backend
            BoardCtrl["Board Controller"]:::backend
            AlarmCtrl["Alarm Controller"]:::backend
            SearchCtrl["Search Controller"]:::backend
        end
    end

    subgraph Database
        MySQL[(MySQL Database)]:::database
        subgraph Tables
            UserTables["User Tables"]:::database
            ContentTables["Content Tables"]:::database
            RelationTables["Relation Tables"]:::database
        end
    end

    subgraph External
        NaverSearch["Naver Search API"]:::external
        NaverMaps["Naver Maps API"]:::external
        AWS["AWS Infrastructure"]:::external
    end

    %% Frontend to Backend Connections
    FPages --> FAPI
    FComponents --> FAPI
    FAPI --> Controllers

    %% Backend Layer Connections
    Controllers --> Services
    Services --> DataAccess
    DataAccess --> MySQL
    JWT -.-> Controllers
    AOP -.-> Controllers

    %% External Service Connections
    Services --> NaverSearch
    Services --> NaverMaps
    AWS -.-> Backend

    %% Component Specific Connections
    AlarmComp --> AlarmCtrl
    BoardComp --> BoardCtrl
    SearchComp --> SearchCtrl
    ProfileComp --> UserCtrl

    %% Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef database fill:#f1c40f,stroke:#f39c12,color:black
    classDef external fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Click Events
    click FPages "https://github.com/minji1104/CLOSER/tree/main/CLOSER-front/src/pages/"
    click FComponents "https://github.com/minji1104/CLOSER/tree/main/CLOSER-front/src/components/"
    click FState "https://github.com/minji1104/CLOSER/tree/main/CLOSER-front/src/modules/"
    click FStyles "https://github.com/minji1104/CLOSER/tree/main/CLOSER-front/src/styles/"
    click FAssets "https://github.com/minji1104/CLOSER/tree/main/CLOSER-front/src/assets/"
    click Controllers "https://github.com/minji1104/CLOSER/tree/main/CLOSER-back/src/main/java/com/ssafy/closer/controller/"
    click Services "https://github.com/minji1104/CLOSER/tree/main/CLOSER-back/src/main/java/com/ssafy/closer/model/service/"
    click DataAccess "https://github.com/minji1104/CLOSER/tree/main/CLOSER-back/src/main/java/com/ssafy/closer/model/mapper/"
    click JWT "https://github.com/minji1104/CLOSER/blob/main/CLOSER-back/src/main/java/com/ssafy/closer/JwtInterceptor.java"
    click AOP "https://github.com/minji1104/CLOSER/blob/main/CLOSER-back/src/main/java/com/ssafy/closer/aop/LoggingAspect.java"
    click Swagger "https://github.com/minji1104/CLOSER/blob/main/CLOSER-back/src/main/java/com/ssafy/closer/SwaggerConfiguration.java"
    click MySQL "https://github.com/minji1104/CLOSER/tree/main/exec/3. 데이터베이스 덤프 파일/closer_final/"
    click AlarmComp "https://github.com/minji1104/CLOSER/tree/main/CLOSER-front/src/components/alarm/"
    click BoardComp "https://github.com/minji1104/CLOSER/tree/main/CLOSER-front/src/components/board/"
    click SearchComp "https://github.com/minji1104/CLOSER/tree/main/CLOSER-front/src/components/search/"
    click ProfileComp "https://github.com/minji1104/CLOSER/tree/main/CLOSER-front/src/components/profile/"
    click AlarmCtrl "https://github.com/minji1104/CLOSER/blob/main/CLOSER-back/src/main/java/com/ssafy/closer/controller/AlarmController.java"
    click BoardCtrl "https://github.com/minji1104/CLOSER/blob/main/CLOSER-back/src/main/java/com/ssafy/closer/controller/BoardController.java"
    click SearchCtrl "https://github.com/minji1104/CLOSER/blob/main/CLOSER-back/src/main/java/com/ssafy/closer/controller/SearchController.java"
    click UserCtrl "https://github.com/minji1104/CLOSER/blob/main/CLOSER-back/src/main/java/com/ssafy/closer/controller/UserController.java"
```
