# pozafly/tripllo_vue architecture

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

- Interactive diagram: https://gitdiagram.com/pozafly/tripllo_vue
- Repository: https://github.com/pozafly/tripllo_vue

## Overview

##### Main Components

a. Frontend Layer:
- Vue.js Application (SPA)
- Components hierarchy (Auth, Board, Card, List)
- Vuex Store for state management
- Vue Router for navigation
- WebSocket client for real-time updates
- Social login integrations (Facebook, Google, Kakao)

b. Backend Layer:
- Spring Boot Application
- Security Layer (JWT Authentication)
- REST API Controllers
- WebSocket Server
- Service Layer
- MyBatis Data Access Layer
- Email Service

c. Database Layer:
- MySQL Database
- User management tables
- Board/List/Card tables
- Comments and attachments

d. External Services:
- AWS Infrastructure
- EC2 for backend hosting
- S3 for file storage
- CloudFront for CDN
- RDS for MySQL database
- Route53 for DNS
- Social Login Providers
- Google Maps API

##### Component Relationships

- Frontend to Backend communication via REST APIs
- Real-time updates via WebSocket
- File upload flow to S3
- Authentication flow with JWT
- Database interactions
- External service integrations

##### Specific Implementation Details

Notes about:
- JWT token flow for authentication
- WebSocket connections for real-time updates
- File upload process through S3
- Social login integration flow
- Database relationships (as shown in the ERD)

##### Deployment Architecture

CI/CD pipeline:
- Travis CI
- AWS CodeDeploy
- Nginx reverse proxy
- SSL termination

**[Client Layer (Browser)]**
- ↓
**[Frontend Layer (Vue.js)]**
- ↓
**[Nginx + SSL]**
- ↓
**[Backend Layer (Spring Boot)]**
- ↓
**[Database Layer (MySQL)]**

With external services shown on the sides connecting to appropriate layers.

Key Considerations:

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Web Browser"]
    end

    subgraph Frontend
        VueApp["Vue.js Application"]:::frontend
        click VueApp "https://github.com/pozafly/tripllo_vue/blob/master/src/App.vue"
        
        subgraph Components
            AuthComp["Authentication Components"]:::frontend
            click AuthComp "https://github.com/pozafly/tripllo_vue/tree/master/src/components/auth/"
            BoardComp["Board Components"]:::frontend
            click BoardComp "https://github.com/pozafly/tripllo_vue/tree/master/src/components/board/"
            CardComp["Card Components"]:::frontend
            click CardComp "https://github.com/pozafly/tripllo_vue/tree/master/src/components/card/"
            ListComp["List Components"]:::frontend
            click ListComp "https://github.com/pozafly/tripllo_vue/tree/master/src/components/list/"
            ProfileComp["Profile Components"]:::frontend
            click ProfileComp "https://github.com/pozafly/tripllo_vue/tree/master/src/components/profile/"
            MapComp["Location Map"]:::frontend
            click MapComp "https://github.com/pozafly/tripllo_vue/blob/master/src/components/card/cardModal/mainModal/location/CardLocationMap.vue"
        end

        subgraph State
            VuexStore["Vuex Store"]:::frontend
            click VuexStore "https://github.com/pozafly/tripllo_vue/blob/master/src/store/index.js"
            Router["Vue Router"]:::frontend
            click Router "https://github.com/pozafly/tripllo_vue/blob/master/src/routes/index.js"
        end

        subgraph Utils
            WSClient["WebSocket Client"]:::frontend
            click WSClient "https://github.com/pozafly/tripllo_vue/blob/master/src/utils/socket.js"
            SentryClient["Sentry Client"]:::frontend
            click SentryClient "https://github.com/pozafly/tripllo_vue/blob/master/src/utils/sentry.js"
        end

        subgraph API
            APILayer["API Service Layer"]:::frontend
            click APILayer "https://github.com/pozafly/tripllo_vue/blob/master/src/api/index.js"
            UploadAPI["Upload Service"]:::frontend
            click UploadAPI "https://github.com/pozafly/tripllo_vue/blob/master/src/api/upload.js"
            PushAPI["Push Message Service"]:::frontend
            click PushAPI "https://github.com/pozafly/tripllo_vue/blob/master/src/api/pushMessage.js"
        end

        subgraph Social
            FacebookAuth["Facebook Auth"]:::frontend
            click FacebookAuth "https://github.com/pozafly/tripllo_vue/blob/master/src/utils/social/Facebook.js"
            GoogleAuth["Google Auth"]:::frontend
            click GoogleAuth "https://github.com/pozafly/tripllo_vue/blob/master/src/utils/social/Google.js"
            KakaoAuth["Kakao Auth"]:::frontend
            click KakaoAuth "https://github.com/pozafly/tripllo_vue/blob/master/src/utils/social/Kakao.js"
        end
    end

    subgraph Infrastructure
        Nginx["Nginx + SSL"]:::infra
        TravisCI["Travis CI"]:::infra
        CodeDeploy["AWS CodeDeploy"]:::infra
    end

    subgraph Backend
        SpringBoot["Spring Boot Application"]:::backend
        Security["Security Layer (JWT)"]:::security
        RestAPI["REST Controllers"]:::backend
        WSServer["WebSocket Server"]:::backend
        ServiceLayer["Service Layer"]:::backend
        DataAccess["MyBatis Layer"]:::backend
        EmailService["Email Service"]:::backend
    end

    subgraph External
        S3["AWS S3"]:::external
        CloudFront["AWS CloudFront"]:::external
        Route53["AWS Route53"]:::external
        GoogleMaps["Google Maps API"]:::external
        SentryServer["Sentry Server"]:::external
    end

    subgraph Database
        RDS["AWS RDS"]:::database
        MySQL["MySQL Database"]:::database
    end

    %% Relationships
    Browser --> VueApp
    VueApp --> Components
    Components --> State
    Components --> Utils
    Components --> API
    Components --> Social

    API --> Nginx
    Nginx --> SpringBoot
    SpringBoot --> Security
    SpringBoot --> RestAPI
    SpringBoot --> WSServer
    SpringBoot --> ServiceLayer
    ServiceLayer --> DataAccess
    ServiceLayer --> EmailService
    DataAccess --> MySQL

    WSClient --> WSServer
    UploadAPI --> S3
    APILayer --> CloudFront
    Route53 --> Nginx
    MapComp --> GoogleMaps
    SentryClient --> SentryServer

    %% Styles
    classDef frontend fill:#3498db,color:#fff
    classDef backend fill:#2ecc71,color:#fff
    classDef database fill:#f1c40f,color:#000
    classDef external fill:#9b59b6,color:#fff
    classDef security fill:#e74c3c,color:#fff
    classDef infra fill:#34495e,color:#fff

    %% Legend
    subgraph Legend
        Frontend["Frontend"]:::frontend
        Backend["Backend"]:::backend
        Database["Database"]:::database
        External["External Services"]:::external
        Security["Security"]:::security
        Infrastructure["Infrastructure"]:::infra
    end
```
