# velopert/velog-client architecture

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

- Interactive diagram: https://gitdiagram.com/velopert/velog-client
- Repository: https://github.com/velopert/velog-client

## Overview

##### Main Components Identification

The system should be represented with these key components:

a. Client-Side Architecture:
- Frontend Application (React + TypeScript)
- State Management Layer (Redux + Apollo Client)
- Routing System (React Router)
- UI Component Library (Styled Components)
- Markdown Processing (Remark)
- Code Editor (Codemirror)

b. Server Integration:
- GraphQL API Integration
- AWS Lambda Functions
- Serverless Framework
- Redis Cache Layer

##### Key Features to Highlight

- Markdown editing system
- Authentication flow
- Post management
- User profiles
- Series management
- Search functionality
- File upload system

##### Specific Implementation Details

**Client Application**
- Core Features
- Post Editor (WriteMarkdownEditor)
- Authentication (AuthModal)
- User Profiles (VelogPage)
- State Management
- Redux Modules
- Apollo GraphQL Cache
- API Integration
- GraphQL Operations
- REST Endpoints
- Infrastructure
- Serverless Functions
- Redis Cache

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Frontend Layer"
        FE[Frontend Application]
        RC[React Core]:::react
        TS[TypeScript]:::typescript
    end

    subgraph "Core Features"
        PME[Post Management & Editor]:::feature
        AS[Authentication System]:::feature
        UPS[User Profile System]:::feature
        SMS[Series Management]:::feature
        SS[Search System]:::feature
        FUS[File Upload System]:::feature
    end

    subgraph "State Management"
        RD[Redux Store]:::state
        AC[Apollo Client]:::state
        LS[Local Storage]:::state
    end

    subgraph "UI Components"
        MD[Markdown Editor]:::ui
        MR[Markdown Renderer]:::ui
        CM[Common Components]:::ui
        BC[Base Components]:::ui
        TH[Theme System]:::ui
    end

    subgraph "Integration Layer"
        API[API Client]:::api
        GQL[GraphQL Operations]:::api
        REST[REST Endpoints]:::api
    end

    subgraph "Infrastructure"
        AWS[AWS Lambda]:::infra
        RDS[Redis Cache]:::infra
        S3[S3 Storage]:::infra
        CF[CloudFront]:::infra
    end

    FE --> RC
    RC --> TS

    FE --> PME
    FE --> AS
    FE --> UPS
    FE --> SMS
    FE --> SS
    FE --> FUS

    PME --> MD
    PME --> MR
    UPS --> CM
    SS --> CM
    AS --> CM

    PME --> RD
    UPS --> RD
    AS --> RD
    SMS --> RD

    PME --> AC
    UPS --> AC
    SS --> AC

    FUS --> S3
    FUS --> CF

    AC --> GQL
    RD --> API
    API --> AWS
    GQL --> AWS
    AWS --> RDS

    %% Component Mappings
    click FE "https://github.com/velopert/velog-client/blob/master/src/App.tsx"
    click RC "https://github.com/velopert/velog-client/blob/master/src/index.tsx"
    click RD "https://github.com/velopert/velog-client/tree/master/src/modules/"
    click AC "https://github.com/velopert/velog-client/tree/master/src/lib/graphql/"
    click AS "https://github.com/velopert/velog-client/tree/master/src/components/auth/"
    click PME "https://github.com/velopert/velog-client/tree/master/src/components/post/"
    click UPS "https://github.com/velopert/velog-client/blob/master/src/components/velog/VelogPageTemplate.tsx"
    click SMS "https://github.com/velopert/velog-client/blob/master/src/components/velog/SeriesList.tsx"
    click SS "https://github.com/velopert/velog-client/blob/master/src/components/search/SearchTemplate.tsx"
    click FUS "https://github.com/velopert/velog-client/blob/master/src/lib/hooks/useCFUpload.ts"
    click MD "https://github.com/velopert/velog-client/blob/master/src/components/common/MarkdownEditor.tsx"
    click MR "https://github.com/velopert/velog-client/blob/master/src/components/common/MarkdownRender.tsx"
    click API "https://github.com/velopert/velog-client/tree/master/src/lib/api/"
    click CM "https://github.com/velopert/velog-client/tree/master/src/components/common/"
    click BC "https://github.com/velopert/velog-client/tree/master/src/components/base/"
    click TH "https://github.com/velopert/velog-client/blob/master/src/lib/styles/themes.ts"

    classDef react fill:#61DAFB
    classDef typescript fill:#007ACC
    classDef feature fill:#FF6B6B
    classDef state fill:#FFD93D
    classDef ui fill:#4DABF7
    classDef api fill:#63E6BE
    classDef infra fill:#845EF7

    %% Legend
    subgraph Legend
        L1[React]:::react
        L2[TypeScript]:::typescript
        L3[Features]:::feature
        L4[State]:::state
        L5[UI Components]:::ui
        L6[API Layer]:::api
        L7[Infrastructure]:::infra
    end
```
