# minoak/jeju architecture

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

- Interactive diagram: https://gitdiagram.com/minoak/jeju
- Repository: https://github.com/minoak/jeju

## Overview

카페인제주는 실제 리뷰·영상·블로그 발화를 근거로 제주 카페를 찾고 추천하는 RAG 검색 서비스입니다. 배치 단계에서 자료를 모아 정제·병합하고 근거를 가공해 카드 정본을 만듭니다. 런타임은 의도를 분석하고 태그·지역 조건으로 검색하며, 결과가 없으면 하드조건은 유지한 채 소프트 조건이나 지역을 완화하고 인용 기반 추천문을 생성합니다. API와 웹 프론트엔드가 이를 사용자에게 제공합니다. 배치 연결은 README에 근거하며, 일부 unsampled 구현의 세부 호출은 생략했습니다.

Main entry points: [`app/server.py`](https://github.com/minoak/jeju/blob/main/app/server.py) (검색 API), [`pipeline/merge.py`](https://github.com/minoak/jeju/blob/main/pipeline/merge.py) (카드 병합), [`app/router.py`](https://github.com/minoak/jeju/blob/main/app/router.py) (의도 분석), [`data/processed/cards.json`](https://github.com/minoak/jeju/blob/main/data/processed/cards.json) (카드 정본)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["자료 수집"]
  node_youtube["유튜브 수집"]
  node_naver["네이버 크롤링<br/>[naver_crawl.py]"]
  node_kakao_reviews["카카오 리뷰<br/>[kakao_review.py]"]
end

subgraph group_preparation["정제와 카드화"]
  node_comment_refine["댓글 정제<br/>[comments_refine.py]"]
  node_naver_refine["블로그 정제<br/>[naver_refine.py]"]
  node_kakao_refine["리뷰 정제"]
  node_place_matching["장소 식별<br/>[kakao_place.py]"]
  node_merge["카드 병합<br/>[merge.py]"]
  node_polarity["근거 극성 분리"]
  node_tag_embedding["태그 임베딩<br/>[tag_embed.py]"]
  node_cards_data[("카드 정본<br/>[cards.json]")]
end

subgraph group_search["검색과 추천"]
  node_router["의도 분석<br/>[router.py]"]
  node_tagdict["태그 사전<br/>[tagdict.py]"]
  node_tagtrans["조건 번역<br/>[tagtrans.py]"]
  node_retrieve["태그 검색<br/>[retrieve.py]"]
  node_relax["조건 완화<br/>[relax.py]"]
  node_synthesize["인용 종합<br/>[synthesize.py]"]
end

subgraph group_delivery["서비스 전달"]
  node_api["검색 API<br/>[server.py]"]
  node_web["검색 웹 화면<br/>[cards.js]"]
end

node_user(("질문자"))
node_kakao_map{{"카카오 지도"}}

node_youtube -->|"정제한다"| node_comment_refine
node_naver -->|"정제한다"| node_naver_refine
node_kakao_reviews -->|"정제한다"| node_kakao_refine
node_kakao_reviews -->|"장소 식별"| node_place_matching
node_comment_refine -->|"병합한다"| node_merge
node_naver_refine -->|"병합한다"| node_merge
node_kakao_refine -->|"병합한다"| node_merge
node_place_matching -->|"식별정보 제공"| node_merge
node_merge -->|"카드 기록"| node_cards_data
node_cards_data -->|"근거 전달"| node_polarity
node_polarity -->|"태그 처리"| node_tag_embedding
node_tag_embedding -->|"임베딩 제공"| node_tagdict
node_user -->|"질문 입력"| node_web
node_web -->|"검색 요청"| node_api
node_api -->|"의도 분석 호출"| node_router
node_router -->|"사전 참조"| node_tagdict
node_router -->|"조건 번역"| node_tagtrans
node_router -->|"검색 조건 전달"| node_retrieve
node_retrieve -->|"카드 조회"| node_cards_data
node_api -->|"검색 수행"| node_retrieve
node_api -->|"빈 결과 완화"| node_relax
node_relax -->|"재검색 호출"| node_retrieve
node_api -->|"추천문 생성"| node_synthesize
node_synthesize -->|"근거 조회"| node_cards_data
node_web -.->|"지도 표시"| node_kakao_map

click node_youtube "https://github.com/minoak/jeju/blob/main/pipeline/youtube_comments.py"
click node_naver "https://github.com/minoak/jeju/blob/main/pipeline/naver_crawl.py"
click node_kakao_reviews "https://github.com/minoak/jeju/blob/main/pipeline/kakao_review.py"
click node_comment_refine "https://github.com/minoak/jeju/blob/main/pipeline/comments_refine.py"
click node_naver_refine "https://github.com/minoak/jeju/blob/main/pipeline/naver_refine.py"
click node_kakao_refine "https://github.com/minoak/jeju/blob/main/pipeline/kakao_review_refine.py"
click node_place_matching "https://github.com/minoak/jeju/blob/main/pipeline/kakao_place.py"
click node_merge "https://github.com/minoak/jeju/blob/main/pipeline/merge.py"
click node_polarity "https://github.com/minoak/jeju/blob/main/pipeline/evidence_polarity.py"
click node_tag_embedding "https://github.com/minoak/jeju/blob/main/pipeline/tag_embed.py"
click node_cards_data "https://github.com/minoak/jeju/blob/main/data/processed/cards.json"
click node_router "https://github.com/minoak/jeju/blob/main/app/router.py"
click node_tagdict "https://github.com/minoak/jeju/blob/main/app/tagdict.py"
click node_tagtrans "https://github.com/minoak/jeju/blob/main/app/tagtrans.py"
click node_retrieve "https://github.com/minoak/jeju/blob/main/app/retrieve.py"
click node_relax "https://github.com/minoak/jeju/blob/main/app/relax.py"
click node_synthesize "https://github.com/minoak/jeju/blob/main/app/synthesize.py"
click node_api "https://github.com/minoak/jeju/blob/main/app/server.py"
click node_web "https://github.com/minoak/jeju/blob/main/web/cards.js"

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_youtube,node_naver,node_kakao_reviews toneBlue
class node_comment_refine,node_naver_refine,node_kakao_refine,node_place_matching,node_merge,node_polarity,node_tag_embedding,node_cards_data toneAmber
class node_router,node_tagdict,node_tagtrans,node_retrieve,node_relax,node_synthesize toneMint
class node_api,node_web toneRose
class node_user,node_kakao_map toneIndigo
```

## Components

### 자료 수집

- [유튜브 수집](https://github.com/minoak/jeju/blob/main/pipeline/youtube_comments.py): `pipeline/youtube_comments.py`
- [네이버 크롤링](https://github.com/minoak/jeju/blob/main/pipeline/naver_crawl.py): `pipeline/naver_crawl.py`
- [카카오 리뷰](https://github.com/minoak/jeju/blob/main/pipeline/kakao_review.py): `pipeline/kakao_review.py`

### 정제와 카드화

- [댓글 정제](https://github.com/minoak/jeju/blob/main/pipeline/comments_refine.py): `pipeline/comments_refine.py`
- [블로그 정제](https://github.com/minoak/jeju/blob/main/pipeline/naver_refine.py): `pipeline/naver_refine.py`
- [리뷰 정제](https://github.com/minoak/jeju/blob/main/pipeline/kakao_review_refine.py): `pipeline/kakao_review_refine.py`
- [장소 식별](https://github.com/minoak/jeju/blob/main/pipeline/kakao_place.py): `pipeline/kakao_place.py`
- [카드 병합](https://github.com/minoak/jeju/blob/main/pipeline/merge.py): `pipeline/merge.py`
- [근거 극성 분리](https://github.com/minoak/jeju/blob/main/pipeline/evidence_polarity.py): `pipeline/evidence_polarity.py`
- [태그 임베딩](https://github.com/minoak/jeju/blob/main/pipeline/tag_embed.py): `pipeline/tag_embed.py`
- [카드 정본](https://github.com/minoak/jeju/blob/main/data/processed/cards.json): `data/processed/cards.json`

### 검색과 추천

- [의도 분석](https://github.com/minoak/jeju/blob/main/app/router.py): `app/router.py`
- [태그 사전](https://github.com/minoak/jeju/blob/main/app/tagdict.py): `app/tagdict.py`
- [조건 번역](https://github.com/minoak/jeju/blob/main/app/tagtrans.py): `app/tagtrans.py`
- [태그 검색](https://github.com/minoak/jeju/blob/main/app/retrieve.py): `app/retrieve.py`
- [조건 완화](https://github.com/minoak/jeju/blob/main/app/relax.py): `app/relax.py`
- [인용 종합](https://github.com/minoak/jeju/blob/main/app/synthesize.py): `app/synthesize.py`

### 서비스 전달

- [검색 API](https://github.com/minoak/jeju/blob/main/app/server.py): `app/server.py`
- [검색 웹 화면](https://github.com/minoak/jeju/blob/main/web/cards.js): `web/cards.js`

### Other components

- **질문자**
- **카카오 지도**

## Connections

- 유튜브 수집 → 댓글 정제: 정제한다
- 네이버 크롤링 → 블로그 정제: 정제한다
- 카카오 리뷰 → 리뷰 정제: 정제한다
- 카카오 리뷰 → 장소 식별: 장소 식별
- 댓글 정제 → 카드 병합: 병합한다
- 블로그 정제 → 카드 병합: 병합한다
- 리뷰 정제 → 카드 병합: 병합한다
- 장소 식별 → 카드 병합: 식별정보 제공
- 카드 병합 → 카드 정본: 카드 기록
- 카드 정본 → 근거 극성 분리: 근거 전달
- 근거 극성 분리 → 태그 임베딩: 태그 처리
- 태그 임베딩 → 태그 사전: 임베딩 제공 (evidence: `pipeline/tag_embed.py`)
- 질문자 → 검색 웹 화면: 질문 입력
- 검색 웹 화면 → 검색 API: 검색 요청
- 검색 API → 의도 분석: 의도 분석 호출
- 의도 분석 → 태그 사전: 사전 참조 (evidence: `app/router.py`)
- 의도 분석 → 조건 번역: 조건 번역 (evidence: `app/router.py`)
- 의도 분석 → 태그 검색: 검색 조건 전달
- 태그 검색 → 카드 정본: 카드 조회 (evidence: `app/retrieve.py`)
- 검색 API → 태그 검색: 검색 수행
- 검색 API → 조건 완화: 빈 결과 완화
- 조건 완화 → 태그 검색: 재검색 호출 (evidence: `app/relax.py`)
- 검색 API → 인용 종합: 추천문 생성
- 인용 종합 → 카드 정본: 근거 조회
- 검색 웹 화면 → 카카오 지도: 지도 표시
