# ohhaeseo/chaeumdo architecture

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

- Interactive diagram: https://gitdiagram.com/ohhaeseo/chaeumdo
- Repository: https://github.com/ohhaeseo/chaeumdo

## Overview

채움도는 여행 기록을 행정구역 지도에 채우는 웹 서비스다. 사용자는 체험 모드 또는 계정 모드로 진입해 지역을 탐색하고, 여행 기간·동행자·일자별 장소와 사진을 기록한 뒤 지도에서 방문 지역과 최근 사진을 확인한다. 체험 기록은 브라우저 IndexedDB에, 계정 기록은 Spring API와 PostgreSQL에 저장된다. 지도 경계 데이터와 Photon 장소 검색도 제품 기능에 포함된다. 일부 프론트엔드 저장·화면 흐름과 백엔드 구현은 발췌되지 않아 그 연결은 README 설명에 한정했다.

Main entry points: [`frontend/src/MobileApp.tsx`](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/MobileApp.tsx) (화면 흐름), [`frontend/src/TravelForm.tsx`](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/TravelForm.tsx) (여행 편집), [`frontend/src/KoreaMap.tsx`](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/KoreaMap.tsx) (지역 지도), [`frontend/src/data.ts`](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/data.ts) (API 클라이언트)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["웹 앱"]
  node_entry["앱 시작점<br/>[main.tsx]"]
  node_app["화면 흐름<br/>[MobileApp.tsx]"]
  node_auth["계정 화면<br/>[AuthView.tsx]"]
end

subgraph group_mapping["지도와 기록"]
  node_form["여행 편집<br/>[TravelForm.tsx]"]
  node_map["지역 지도<br/>[KoreaMap.tsx]"]
  node_place_map["장소 핀<br/>[PlaceMap.tsx]"]
  node_region_data["지역·기록 데이터<br/>[data.ts]"]
  node_map_data["경계 데이터 로더<br/>[mapData.ts]"]
  node_map_shape["지도 형상 계산<br/>[mapShape.mjs]"]
  node_dates["일정 계산<br/>[dates.mjs]"]
  node_photo["사진 처리<br/>[photo.ts]"]
  node_photo_size["썸네일 크기<br/>[photoSize.mjs]"]
  node_search["장소 검색<br/>[placeSearch.ts]"]
  node_api_client["API 클라이언트<br/>[data.ts]"]
end

subgraph group_backend["서버 기능"]
  node_account_api["계정 API"]
  node_session["세션 관리"]
  node_travel_api["여행 API"]
end

subgraph group_storage["저장소"]
  node_postgres[("PostgreSQL")]
  node_indexeddb[("브라우저 기록")]
end

node_traveler(("여행자"))
node_photon["Photon 검색"]

node_traveler -->|"opens"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_auth
node_app -->|"renders"| node_form
node_app -->|"renders"| node_map
node_app -->|"renders"| node_place_map
node_app -->|"loads records"| node_region_data
node_auth -->|"requests"| node_api_client
node_form -->|"saves records"| node_api_client
node_form -->|"searches places"| node_search
node_form -->|"prepares photos"| node_photo
node_form -->|"calculates days"| node_dates
node_search -->|"queries"| node_photon
node_map -->|"reads regions"| node_region_data
node_map -->|"loads boundaries"| node_map_data
node_map -->|"measures shapes"| node_map_shape
node_place_map -->|"reads locations"| node_region_data
node_photo -->|"uses sizing"| node_photo_size
node_region_data -->|"stores demo trips"| node_indexeddb
node_api_client -->|"sends account requests"| node_account_api
node_api_client -->|"sends trip requests"| node_travel_api
node_account_api -->|"manages sessions"| node_session
node_account_api -->|"reads and writes"| node_postgres
node_travel_api -->|"reads and writes trips"| node_postgres
node_session -->|"checks sessions"| node_postgres

click node_entry "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/main.tsx"
click node_app "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/MobileApp.tsx"
click node_auth "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/AuthView.tsx"
click node_form "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/TravelForm.tsx"
click node_map "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/KoreaMap.tsx"
click node_place_map "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/PlaceMap.tsx"
click node_region_data "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/data.ts"
click node_map_data "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/mapData.ts"
click node_map_shape "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/mapShape.mjs"
click node_dates "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/dates.mjs"
click node_photo "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/photo.ts"
click node_photo_size "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/photoSize.mjs"
click node_search "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/placeSearch.ts"
click node_account_api "https://github.com/ohhaeseo/chaeumdo/blob/main/backend/src/main/java/kr/chaeummdo/AccountController.java"
click node_session "https://github.com/ohhaeseo/chaeumdo/blob/main/backend/src/main/java/kr/chaeummdo/TravelerSession.java"
click node_travel_api "https://github.com/ohhaeseo/chaeumdo/blob/main/backend/src/main/java/kr/chaeummdo/TravelController.java"
click node_api_client "https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/data.ts"

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_entry,node_app,node_auth toneBlue
class node_form,node_map,node_place_map,node_region_data,node_map_data,node_map_shape,node_dates,node_photo,node_photo_size,node_search,node_api_client toneAmber
class node_account_api,node_session,node_travel_api toneMint
class node_postgres,node_indexeddb toneRose
class node_traveler,node_photon toneIndigo
```

## Components

### 웹 앱

- [앱 시작점](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/main.tsx): `frontend/src/main.tsx`
- [화면 흐름](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/MobileApp.tsx): `frontend/src/MobileApp.tsx`
- [계정 화면](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/AuthView.tsx): `frontend/src/AuthView.tsx`

### 지도와 기록

- [여행 편집](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/TravelForm.tsx): `frontend/src/TravelForm.tsx`
- [지역 지도](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/KoreaMap.tsx): `frontend/src/KoreaMap.tsx`
- [장소 핀](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/PlaceMap.tsx): `frontend/src/PlaceMap.tsx`
- [지역·기록 데이터](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/data.ts): `frontend/src/data.ts`
- [경계 데이터 로더](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/mapData.ts): `frontend/src/mapData.ts`
- [지도 형상 계산](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/mapShape.mjs): `frontend/src/mapShape.mjs`
- [일정 계산](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/dates.mjs): `frontend/src/dates.mjs`
- [사진 처리](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/photo.ts): `frontend/src/photo.ts`
- [썸네일 크기](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/photoSize.mjs): `frontend/src/photoSize.mjs`
- [장소 검색](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/placeSearch.ts): `frontend/src/placeSearch.ts`
- [API 클라이언트](https://github.com/ohhaeseo/chaeumdo/blob/main/frontend/src/data.ts): `frontend/src/data.ts`

### 서버 기능

- [계정 API](https://github.com/ohhaeseo/chaeumdo/blob/main/backend/src/main/java/kr/chaeummdo/AccountController.java): `backend/src/main/java/kr/chaeummdo/AccountController.java`
- [세션 관리](https://github.com/ohhaeseo/chaeumdo/blob/main/backend/src/main/java/kr/chaeummdo/TravelerSession.java): `backend/src/main/java/kr/chaeummdo/TravelerSession.java`
- [여행 API](https://github.com/ohhaeseo/chaeumdo/blob/main/backend/src/main/java/kr/chaeummdo/TravelController.java): `backend/src/main/java/kr/chaeummdo/TravelController.java`

### 저장소

- **PostgreSQL**
- **브라우저 기록**

### Other components

- **여행자**
- **Photon 검색**

## Connections

- 여행자 → 앱 시작점: opens (evidence: `README.md`)
- 앱 시작점 → 화면 흐름: renders (evidence: `frontend/src/main.tsx`)
- 화면 흐름 → 계정 화면: renders (evidence: `frontend/src/MobileApp.tsx`)
- 화면 흐름 → 여행 편집: renders (evidence: `frontend/src/MobileApp.tsx`)
- 화면 흐름 → 지역 지도: renders (evidence: `frontend/src/MobileApp.tsx`)
- 화면 흐름 → 장소 핀: renders (evidence: `frontend/src/MobileApp.tsx`)
- 화면 흐름 → 지역·기록 데이터: loads records (evidence: `frontend/src/MobileApp.tsx`)
- 계정 화면 → API 클라이언트: requests (evidence: `frontend/src/AuthView.tsx`)
- 여행 편집 → API 클라이언트: saves records (evidence: `frontend/src/TravelForm.tsx`)
- 여행 편집 → 장소 검색: searches places (evidence: `frontend/src/TravelForm.tsx`)
- 여행 편집 → 사진 처리: prepares photos (evidence: `frontend/src/TravelForm.tsx`)
- 여행 편집 → 일정 계산: calculates days (evidence: `frontend/src/TravelForm.tsx`)
- 장소 검색 → Photon 검색: queries (evidence: `frontend/src/placeSearch.ts`)
- 지역 지도 → 지역·기록 데이터: reads regions (evidence: `frontend/src/KoreaMap.tsx`)
- 지역 지도 → 경계 데이터 로더: loads boundaries (evidence: `frontend/src/KoreaMap.tsx`)
- 지역 지도 → 지도 형상 계산: measures shapes (evidence: `frontend/src/KoreaMap.tsx`)
- 장소 핀 → 지역·기록 데이터: reads locations (evidence: `frontend/src/PlaceMap.tsx`)
- 사진 처리 → 썸네일 크기: uses sizing (evidence: `frontend/src/photo.ts`)
- 지역·기록 데이터 → 브라우저 기록: stores demo trips (evidence: `README.md`)
- API 클라이언트 → 계정 API: sends account requests (evidence: `README.md`)
- API 클라이언트 → 여행 API: sends trip requests (evidence: `README.md`)
- 계정 API → 세션 관리: manages sessions (evidence: `backend/src/main/java/kr/chaeummdo/AccountController.java`)
- 계정 API → PostgreSQL: reads and writes (evidence: `backend/src/main/java/kr/chaeummdo/AccountController.java`)
- 여행 API → PostgreSQL: reads and writes trips (evidence: `backend/src/main/java/kr/chaeummdo/TravelController.java`)
- 세션 관리 → PostgreSQL: checks sessions (evidence: `backend/src/main/java/kr/chaeummdo/TravelerSession.java`)
