Macro Architecture
graph TD %% 스타일 정의 classDef spring fill:#6db33f,stroke:#fff,stroke-width:2px,color:white; classDef python fill:#3776ab,stroke:#fff,stroke-width:2px,color:white; classDef db fill:#e1e1e1,stroke:#333,stroke-width:2px; classDef external fill:#f9f9f9,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5; classDef unused fill:#f0f0f0,stroke:#999,stroke-width:1px,stroke-dasharray: 2 2,color:#999; classDef user fill:#ff9900,stroke:#fff,stroke-width:2px,color:white; %% 사용자 User(("User / Client")):::user %% 메인 서버 (Spring Boot) subgraph MainServer ["Main Server (Java)"] SB["sbServer
(Spring Boot)"]:::spring ExtModule["External API Module
(OpenAI/Claude/Naver - Unused)"]:::unused end %% 데이터 저장소 subgraph DataStorage ["Data Storage"] MySQL[("MySQL
(Account / Contents)")]:::db Redis[("Redis
(Task Queue)")]:::db end %% Python 앱 (AI & 파이프라인) subgraph PythonApps ["AI and Data Pipeline (Python)"] Pipeline["Data Collect Pipeline
(Prefect)"]:::python LocalAI["Local AI Model Runner
(FastAPI)"]:::python end %% 외부 소스 subgraph ExternalSources ["External Sources"] WebSources["News / Market / Tech
(Web Crawling & API)"]:::external end %% 연결 관계 User -->|"HTTP/HTTPS"| SB SB -->|"JPA/Hibernate (Read/Write)"| MySQL %% 데이터 파이프라인 흐름 Pipeline -->|"1. Collect Data"| WebSources Pipeline -->|"2. Request Summary"| LocalAI Pipeline -->|"3. Store Data"| MySQL %% 로컬 AI 흐름 LocalAI -->|"Task Management"| Redis %% 모듈 포함 관계 (선 없음) SB ~~~ ExtModule
sbServer Layered Architecture
graph LR classDef layer fill:#fff,stroke:#333,stroke-width:1px; Controller["Controller / Web
(API Endpoint)"]:::layer Service["Service Layer
(Business Logic)"]:::layer DAO["DAO / Repository
(Data Access)"]:::layer Infra["Infra
(Utility / Helper)"]:::layer DB[("Database")]:::db Controller --> Service Service --> DAO Service --> Infra DAO --> DB