Spaces:
Running
Running
graph LR
%% 1. ํด๋ผ์ด์ธํธ ์์ญ
subgraph Client ["๐ป Client Side (Frontend)"]
User[๐ค ์ฌ์ฉ์ / ์น ๋ธ๋ผ์ฐ์ <br/>(HTML5, CSS3, JS)]
end
%% 2. ์๋ฒ ์์ญ
subgraph Server ["โ๏ธ Flask Server (Backend)"]
direction TB
Controller[๐ฎ Main Controller<br/>(Routing & Logic)]
InternalModel[๐ค Internal AI Engine<br/>(klue/roberta-base)]
end
%% 3. ์ธํ๋ผ ๋ฐ ์ธ๋ถ ์๋น์ค ์์ญ
subgraph External ["โ๏ธ Infrastructure & External APIs"]
direction TB
Gemini[โจ Google Gemini API<br/>(Generative AI Recommendation)]
Supabase[(๐๏ธ Supabase DB<br/>PostgreSQL)]
end
%% --- ๋ฐ์ดํฐ ํ๋ฆ (Flow) ---
%% ๋ถ์ ๋จ๊ณ
User -- "1. ์ผ๊ธฐ ์์ฑ & ๋ถ์ ์์ฒญ (/api/predict)" --> Controller
Controller -- "2. ํ
์คํธ ์ ์ฒ๋ฆฌ & ์ถ๋ก " --> InternalModel
InternalModel -- "3. ๊ฐ์ ๋ผ๋ฒจ & ํ๋ฅ ๋ฐํ" --> Controller
Controller -- "4. ์ถ์ฒ ์์ฒญ (Prompting)" --> Gemini
Gemini -- "5. ๋ง์ถคํ ์ฝํ
์ธ ์์ฑ" --> Controller
Controller -- "6. ๋ถ์ ๊ฒฐ๊ณผ(JSON) ์๋ต" --> User
%% ์ ์ฅ ๋จ๊ณ
User -- "7. '์ ์ฅํ๊ธฐ' ํด๋ฆญ (/diary/save)" --> Controller
Controller -- "8. ์๊ตฌ ์ ์ฅ (INSERT)" --> Supabase
%% ์คํ์ผ๋ง (์ ํ ์ฌํญ)
style Client fill:#e1f5fe,stroke:#01579b
style Server fill:#fff3e0,stroke:#e65100
style External fill:#f3e5f5,stroke:#4a148c
style InternalModel fill:#ffccbc,stroke:#bf360c,stroke-width:2px
```