Related Notes
ํ๋ก์ ํธ ๊ฐ์
Brandana - AI ๊ธฐ๋ฐ ๋ธ๋๋ ์์ ์ด๋ฏธ์ง ์๋ ์์ฑ ์๋ฃจ์
| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| ์๋ฃ์ผ | 2025-12-22 |
| GitHub | Cloud-Brandana/Brandana |
| ๊ธฐ์ ์คํ | React+Vite, Express, FastAPI, Gemini, LangChain, AWS |
ํต์ฌ ๊ฐ์น
๋ธ๋๋ ์คํ์ผ ๊ฐ์ด๋ ์ ๋ ฅ ์ ์ผ๊ด๋ ์์ด์ฝ/์ด๋ฏธ์ง ์์ ์ ๋น ๋ฅด๊ฒ ์์ฑ
- ์คํ์ผ ํ ํ๋ฆฟ + ํ๋กฌํํธ ์ค์ผ์คํธ๋ ์ด์
- ์๋ ๊ณ ์ + ์๋ ํ์ฒ๋ฆฌ
- Consistency Score ๊ธฐ๋ฐ ํ์ง ๊ฒ์ฆ
์์คํ ์ํคํ ์ฒ
flowchart LR subgraph Client React[React SPA] end subgraph Backend Express[Express<br/>API Gateway] FastAPI[FastAPI<br/>Orchestrator] end subgraph Storage RDS[(RDS/Redis)] S3[(S3/CloudFront)] end subgraph AI Gemini[Gemini API] LC[LangChain] end React --> Express Express --> FastAPI Express --> RDS Express --> S3 FastAPI --> Gemini FastAPI --> LC
์ญํ ๋ถ๋ด:
- Express (Core): ์ธ์ฆ, ์ฟผํฐ, DB, S3 ๋ฉํ๋ฐ์ดํฐ, Job ์ํ ๊ด๋ฆฌ
- FastAPI (Orchestrator): LangChain ์ฒด์ธ, Gemini ํธ์ถ, ConsistencyScore, ์ด๋ฏธ์ง ์ฒ๋ฆฌ
LangChain Pipeline
flowchart TD A[LangChainInput] --> B[StylePreprocessRunnable<br/>์ ๋ ฅ ์ ๊ทํ] B --> C[PromptBuilderRunnable<br/>์คํ์ผโ์์ฐ์ด ํ๋กฌํํธ] C --> D[GeminiImageRunnable<br/>with_retry] D --> E[LangChainOutput] D -.->|ํ์ง ๋ฏธ๋ฌ| F{ValidationAgent} F -->|์ฌ์๋| C F -->|ํต๊ณผ| E
์ฃผ์ ์ฒด์ธ:
StyleDNAChain: Vision API + LLM ํ ์คํธ ํ์ฑ โ ์คํ์ผ ํ๋ผ๋ฏธํฐ ์ถ์ถPromptBuilderChain: FewShot + ์คํ์ผ โ ์ต์ข ํ๋กฌํํธValidationAgent(ReAct): ํ์ง ๋ฏธ๋ฌ ์ ์๋ ์ฌ์๋ (์ต๋ 3 ํ)
์ฃผ์ ํ์ต
- LangChain Runnable/Chain ์ค๊ณ ๋ฐ
.with_retry()์ ๋ต - AWS ๋ฉํฐ AZ ์ํคํ ์ฒ (RDS, S3, CloudFront, Redis)
- Express โ FastAPI ์ธํฐํ์ด์ค ์ค๊ณ (trace_id, sync/async mode)
- ConsistencyScore + OpenCV Spec Checker ํ์ง ๊ฒ์ฆ
- LangSmith ํธ๋ ์ด์ฑ ๋ฐ ๋น์ฉ ๋ชจ๋ํฐ๋ง
๋ฌธ์
์์ธ ์ค๊ณ ๋ฐ ๊ตฌํ ๋ฌธ์๋ GitHub ์ ์ฅ์ ์ฐธ์กฐ:
- System Architecture & Data Flow
- API Specification (Express, FastAPI)
- LangChain Components & State Machine
- Style Parameter Schema (LogoStyleConfig)
- Retry Strategy & Error Handling