# kijoojootopia/beauty_dashboard architecture

> Architecture diagram of the GitHub repository kijoojootopia/beauty_dashboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kijoojootopia/beauty_dashboard
- Repository: https://github.com/kijoojootopia/beauty_dashboard

## Overview

뷰우티 대시보드는 화장품의 해외 진출 준비를 위한 Flask 앱입니다. 사용자는 국가와 프로젝트를 선택하고 제품·성분을 등록한 뒤 규제 분석과 로드맵을 확인하고, 관세·환율 및 시장·수출 통계를 살펴봅니다. 계정·프로젝트 저장은 공통 플랫폼이 담당합니다. 그래프는 README의 주요 기능과 SOURCE INDEX를 반영했으며, 일부 서비스와 라우트의 세부 호출은 발췌 자료에 없어 해당 연결은 생략했습니다.

Main entry points: [`platform_core/services/data_loader.py`](https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/data_loader.py) (국가별 JSON 읽기), [`platform_core/app_factory.py`](https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/app_factory.py) (앱 구성), [`tab1_regulation/routes.py`](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab1_regulation/routes.py) (규제 탭 라우트), [`tab3_market/routes.py`](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab3_market/routes.py) (시장 탭 라우트)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["플랫폼 공통"]
  node_app["앱 구성<br/>[app_factory.py]"]
  node_web["공통 화면·라우트<br/>[routes.py]"]
  node_auth["계정·접근 제어<br/>[auth_service.py]"]
  node_projects["프로젝트·제품 저장<br/>[project_service.py]"]
  node_db[("SQLite·PostgreSQL<br/>[database.py]")]
  node_workspace["국가·작업공간"]
  node_country["국가·목적지 정보<br/>[country_service.py]"]
  node_jsondata["국가별 JSON 읽기<br/>[data_loader.py]"]
  node_http["HTTP·API 캐시<br/>[http_client.py]"]
  node_ai_client["OpenAI 공통 클라이언트<br/>[openai_client.py]"]
end

subgraph group_reg["규제·수출 준비"]
  node_ingredients["성분 입력·CSV 파싱"]
  node_screening["성분 규칙 판정"]
  node_regdata["규제 데이터"]
  node_roadmap["수출 로드맵<br/>[roadmap_service.py]"]
  node_reg_routes["규제 탭 라우트<br/>[routes.py]"]
end

subgraph group_customs["관세·통관"]
  node_customs_routes["관세 탭 라우트<br/>[routes.py]"]
  node_customs_service["관세·통관·환율<br/>[customs_service.py]"]
  node_exchange["환율 제공자<br/>[exchange_client.py]"]
end

subgraph group_market["시장 정보"]
  node_market_routes["시장 탭 라우트<br/>[routes.py]"]
  node_market_service["수출·시장 통계<br/>[market_service.py]"]
  node_distributors["유통사 후보"]
  node_news["해외시장 뉴스<br/>[news_service.py]"]
end

subgraph group_assistant["대화형 도우미"]
  node_chat_routes["챗봇 라우트<br/>[routes.py]"]
  node_chat_service["챗봇 응답<br/>[service.py]"]
  node_chat_context["대화 컨텍스트<br/>[context.py]"]
end

node_visitor(("사용자"))
node_external{{"외부 데이터 API"}}

node_app -->|"등록"| node_web
node_app -->|"등록"| node_reg_routes
node_app -->|"등록"| node_customs_routes
node_app -->|"등록"| node_market_routes
node_app -->|"연결"| node_chat_routes
node_web -->|"인증 호출"| node_auth
node_web -->|"프로젝트 호출"| node_projects
node_auth -->|"계정 조회·저장"| node_db
node_projects -->|"기록 저장"| node_db
node_projects -->|"국가 확인"| node_country
node_workspace -->|"프로젝트 조회"| node_projects
node_workspace -->|"목적지 확인"| node_country
node_jsondata -->|"국가 검증"| node_country
node_reg_routes -->|"성분 파싱"| node_ingredients
node_reg_routes -->|"판정 요청"| node_screening
node_reg_routes -->|"규칙 조회"| node_regdata
node_reg_routes -->|"단계 조회"| node_roadmap
node_screening -->|"행 정규화"| node_ingredients
node_screening -->|"규칙 로드"| node_regdata
node_regdata -->|"파일 읽기"| node_jsondata
node_roadmap -->|"파일 읽기"| node_jsondata
node_customs_routes -->|"작업공간 조회"| node_workspace
node_customs_routes -->|"관세 조회"| node_customs_service
node_customs_service -->|"자료 읽기"| node_jsondata
node_customs_service -->|"환율 조회"| node_exchange
node_exchange -->|"HTTP 요청"| node_http
node_market_routes -->|"작업공간 조회"| node_workspace
node_market_routes -->|"통계 조회"| node_market_service
node_market_routes -->|"후보 조회"| node_distributors
node_market_routes -->|"뉴스 조회"| node_news
node_market_service -->|"API 요청"| node_http
node_market_service -->|"자료 읽기"| node_jsondata
node_distributors -->|"자료 읽기"| node_jsondata
node_news -->|"자료 읽기"| node_jsondata
node_news -->|"API 요청"| node_http
node_chat_routes -->|"요청 전달"| node_chat_service
node_chat_service -->|"컨텍스트 조회"| node_chat_context
node_chat_service -->|"모델 호출"| node_ai_client
node_ai_client -->|"HTTP 요청"| node_http
node_http -.->|"API 통신"| node_external

click node_app "https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/app_factory.py"
click node_web "https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/routes.py"
click node_auth "https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/auth_service.py"
click node_projects "https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/project_service.py"
click node_db "https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/database.py"
click node_workspace "https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/workspace_service.py"
click node_country "https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/country_service.py"
click node_jsondata "https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/data_loader.py"
click node_http "https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/integrations/http_client.py"
click node_ai_client "https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/integrations/openai_client.py"
click node_ingredients "https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab1_regulation/services/ingredient_parser.py"
click node_screening "https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab1_regulation/services/screening_service.py"
click node_regdata "https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab1_regulation/services/regulation_loader.py"
click node_roadmap "https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab1_regulation/services/roadmap_service.py"
click node_reg_routes "https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab1_regulation/routes.py"
click node_customs_routes "https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab2_customs/routes.py"
click node_customs_service "https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab2_customs/services/customs_service.py"
click node_exchange "https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab2_customs/integrations/exchange_client.py"
click node_market_routes "https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab3_market/routes.py"
click node_market_service "https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab3_market/services/market_service.py"
click node_distributors "https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab3_market/services/distributor_service.py"
click node_news "https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab3_market/services/news_service.py"
click node_chat_routes "https://github.com/kijoojootopia/beauty_dashboard/blob/main/ai_chatbot/routes.py"
click node_chat_service "https://github.com/kijoojootopia/beauty_dashboard/blob/main/ai_chatbot/service.py"
click node_chat_context "https://github.com/kijoojootopia/beauty_dashboard/blob/main/ai_chatbot/context.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_web,node_auth,node_projects,node_db,node_workspace,node_country,node_jsondata,node_http,node_ai_client toneBlue
class node_ingredients,node_screening,node_regdata,node_roadmap,node_reg_routes toneAmber
class node_customs_routes,node_customs_service,node_exchange,node_external toneMint
class node_market_routes,node_market_service,node_distributors,node_news toneRose
class node_chat_routes,node_chat_service,node_chat_context,node_visitor toneIndigo
```

## Components

### 플랫폼 공통

- [앱 구성](https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/app_factory.py): `platform_core/app_factory.py`
- [공통 화면·라우트](https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/routes.py): `platform_core/routes.py`
- [계정·접근 제어](https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/auth_service.py): `platform_core/services/auth_service.py`
- [프로젝트·제품 저장](https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/project_service.py): `platform_core/services/project_service.py`
- [SQLite·PostgreSQL](https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/database.py): `platform_core/services/database.py`
- [국가·작업공간](https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/workspace_service.py): `platform_core/services/workspace_service.py`
- [국가·목적지 정보](https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/country_service.py): `platform_core/services/country_service.py`
- [국가별 JSON 읽기](https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/services/data_loader.py): `platform_core/services/data_loader.py`
- [HTTP·API 캐시](https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/integrations/http_client.py): `platform_core/integrations/http_client.py`
- [OpenAI 공통 클라이언트](https://github.com/kijoojootopia/beauty_dashboard/blob/main/platform_core/integrations/openai_client.py): `platform_core/integrations/openai_client.py`

### 규제·수출 준비

- [성분 입력·CSV 파싱](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab1_regulation/services/ingredient_parser.py): `tab1_regulation/services/ingredient_parser.py`
- [성분 규칙 판정](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab1_regulation/services/screening_service.py): `tab1_regulation/services/screening_service.py`
- [규제 데이터](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab1_regulation/services/regulation_loader.py): `tab1_regulation/services/regulation_loader.py`
- [수출 로드맵](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab1_regulation/services/roadmap_service.py): `tab1_regulation/services/roadmap_service.py`
- [규제 탭 라우트](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab1_regulation/routes.py): `tab1_regulation/routes.py`

### 관세·통관

- [관세 탭 라우트](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab2_customs/routes.py): `tab2_customs/routes.py`
- [관세·통관·환율](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab2_customs/services/customs_service.py): `tab2_customs/services/customs_service.py`
- [환율 제공자](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab2_customs/integrations/exchange_client.py): `tab2_customs/integrations/exchange_client.py`

### 시장 정보

- [시장 탭 라우트](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab3_market/routes.py): `tab3_market/routes.py`
- [수출·시장 통계](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab3_market/services/market_service.py): `tab3_market/services/market_service.py`
- [유통사 후보](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab3_market/services/distributor_service.py): `tab3_market/services/distributor_service.py`
- [해외시장 뉴스](https://github.com/kijoojootopia/beauty_dashboard/blob/main/tab3_market/services/news_service.py): `tab3_market/services/news_service.py`

### 대화형 도우미

- [챗봇 라우트](https://github.com/kijoojootopia/beauty_dashboard/blob/main/ai_chatbot/routes.py): `ai_chatbot/routes.py`
- [챗봇 응답](https://github.com/kijoojootopia/beauty_dashboard/blob/main/ai_chatbot/service.py): `ai_chatbot/service.py`
- [대화 컨텍스트](https://github.com/kijoojootopia/beauty_dashboard/blob/main/ai_chatbot/context.py): `ai_chatbot/context.py`

### Other components

- **사용자**
- **외부 데이터 API**

## Connections

- 앱 구성 → 공통 화면·라우트: 등록 (evidence: `platform_core/app_factory.py`)
- 앱 구성 → 규제 탭 라우트: 등록 (evidence: `platform_core/app_factory.py`)
- 앱 구성 → 관세 탭 라우트: 등록 (evidence: `platform_core/app_factory.py`)
- 앱 구성 → 시장 탭 라우트: 등록 (evidence: `platform_core/app_factory.py`)
- 앱 구성 → 챗봇 라우트: 연결
- 공통 화면·라우트 → 계정·접근 제어: 인증 호출 (evidence: `platform_core/routes.py`)
- 공통 화면·라우트 → 프로젝트·제품 저장: 프로젝트 호출 (evidence: `platform_core/routes.py`)
- 계정·접근 제어 → SQLite·PostgreSQL: 계정 조회·저장 (evidence: `platform_core/services/auth_service.py`)
- 프로젝트·제품 저장 → SQLite·PostgreSQL: 기록 저장 (evidence: `platform_core/services/project_service.py`)
- 프로젝트·제품 저장 → 국가·목적지 정보: 국가 확인 (evidence: `platform_core/services/project_service.py`)
- 국가·작업공간 → 프로젝트·제품 저장: 프로젝트 조회 (evidence: `platform_core/services/workspace_service.py`)
- 국가·작업공간 → 국가·목적지 정보: 목적지 확인 (evidence: `platform_core/services/workspace_service.py`)
- 국가별 JSON 읽기 → 국가·목적지 정보: 국가 검증 (evidence: `platform_core/services/data_loader.py`)
- 규제 탭 라우트 → 성분 입력·CSV 파싱: 성분 파싱 (evidence: `tab1_regulation/routes.py`)
- 규제 탭 라우트 → 성분 규칙 판정: 판정 요청 (evidence: `tab1_regulation/routes.py`)
- 규제 탭 라우트 → 규제 데이터: 규칙 조회 (evidence: `tab1_regulation/routes.py`)
- 규제 탭 라우트 → 수출 로드맵: 단계 조회 (evidence: `tab1_regulation/routes.py`)
- 성분 규칙 판정 → 성분 입력·CSV 파싱: 행 정규화 (evidence: `tab1_regulation/services/screening_service.py`)
- 성분 규칙 판정 → 규제 데이터: 규칙 로드 (evidence: `tab1_regulation/services/screening_service.py`)
- 규제 데이터 → 국가별 JSON 읽기: 파일 읽기 (evidence: `tab1_regulation/services/regulation_loader.py`)
- 수출 로드맵 → 국가별 JSON 읽기: 파일 읽기 (evidence: `tab1_regulation/services/roadmap_service.py`)
- 관세 탭 라우트 → 국가·작업공간: 작업공간 조회 (evidence: `tab2_customs/routes.py`)
- 관세 탭 라우트 → 관세·통관·환율: 관세 조회 (evidence: `tab2_customs/routes.py`)
- 관세·통관·환율 → 국가별 JSON 읽기: 자료 읽기 (evidence: `tab2_customs/services/customs_service.py`)
- 관세·통관·환율 → 환율 제공자: 환율 조회 (evidence: `tab2_customs/services/customs_service.py`)
- 환율 제공자 → HTTP·API 캐시: HTTP 요청 (evidence: `tab2_customs/integrations/exchange_client.py`)
- 시장 탭 라우트 → 국가·작업공간: 작업공간 조회 (evidence: `tab3_market/routes.py`)
- 시장 탭 라우트 → 수출·시장 통계: 통계 조회 (evidence: `tab3_market/routes.py`)
- 시장 탭 라우트 → 유통사 후보: 후보 조회 (evidence: `tab3_market/routes.py`)
- 시장 탭 라우트 → 해외시장 뉴스: 뉴스 조회 (evidence: `tab3_market/routes.py`)
- 수출·시장 통계 → HTTP·API 캐시: API 요청 (evidence: `tab3_market/services/market_service.py`)
- 수출·시장 통계 → 국가별 JSON 읽기: 자료 읽기 (evidence: `tab3_market/services/market_service.py`)
- 유통사 후보 → 국가별 JSON 읽기: 자료 읽기 (evidence: `tab3_market/services/distributor_service.py`)
- 해외시장 뉴스 → 국가별 JSON 읽기: 자료 읽기 (evidence: `tab3_market/services/news_service.py`)
- 해외시장 뉴스 → HTTP·API 캐시: API 요청 (evidence: `tab3_market/services/news_service.py`)
- 챗봇 라우트 → 챗봇 응답: 요청 전달 (evidence: `ai_chatbot/routes.py`)
- 챗봇 응답 → 대화 컨텍스트: 컨텍스트 조회 (evidence: `ai_chatbot/service.py`)
- 챗봇 응답 → OpenAI 공통 클라이언트: 모델 호출 (evidence: `ai_chatbot/service.py`)
- OpenAI 공통 클라이언트 → HTTP·API 캐시: HTTP 요청 (evidence: `platform_core/integrations/openai_client.py`)
- HTTP·API 캐시 → 외부 데이터 API: API 통신
