From fb922fa7930a045a3990b4174827cccde95c03fe Mon Sep 17 00:00:00 2001 From: htlee Date: Sun, 15 Feb 2026 11:05:47 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20CLAUDE.md=20TypeScript=20=EC=A0=84?= =?UTF-8?q?=ED=99=98=20=EB=B0=8F=20Phase=203=20=EA=B3=84=ED=9A=8D=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 3cd8426e..e97c9972 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -5,12 +5,14 @@ 민간용 데모 버전으로, OSM + OpenSeaMap 기반 지도와 AIS API 폴링 방식의 선박 데이터를 사용. ## 기술 스택 +- **언어**: TypeScript (strict 모드, JS→TS 전환 완료) - **프레임워크**: React 18 + Vite 5 - **지도 엔진**: OpenLayers 9 + Deck.gl 9 (MapLibre 전환 예정) - **상태관리**: Zustand 4 - **HTTP**: Axios - **스타일**: SASS - **라우팅**: React Router DOM 6 +- **Lint**: ESLint 8 + @typescript-eslint ## 빌드 / 실행 ```bash @@ -47,16 +49,39 @@ src/ ├── scss/ # 글로벌 SCSS ├── stores/ # Zustand 스토어 (ship, map, auth, tracking 등) ├── tracking/ # 항적조회 모듈 -├── types/ # 상수 정의 +├── types/ # 타입 정의 (ship.ts, constants.ts, global.d.ts 등) ├── utils/ # 유틸리티 └── workers/ # Web Worker (signalWorker) ``` +## TypeScript 설정 +- `tsconfig.json`: composite 프로젝트 (tsconfig.app.json + tsconfig.node.json) +- `.eslintrc.cjs`: @typescript-eslint/recommended, react-hooks, react-refresh +- pre-commit hook: `npx eslint src/ --ext .ts,.tsx --quiet` +- 타입 체크: `npx tsc -b --noEmit` + ## Git 저장소 - **Remote**: https://gitea.gc-si.dev/gc/ship-gis.git -- **브랜치**: main (보호), develop (작업 브랜치) +- **브랜치**: main (보호), develop (작업 브랜치), chore/typescript-migration (TS 전환) ## 팀 워크플로우 - 버전: v1.2.0 - 커밋 형식: Conventional Commits (한/영 혼용) - 브랜치 전략: main ← develop ← feature/* + +## Phase 3 계획 (React 19 + Vite 7 + MapLibre 전환) + +상세 계획: `/Users/lht/.claude/plans/glittery-zooming-feigenbaum.md` + +### Step 1: React 19 + Vite 7 + ESLint 9 업그레이드 +- 브랜치: `chore/react19-vite7` (develop 기반) +- React 18→19, Vite 5→7, ESLint 8→9 flat config +- 미사용 패키지 제거 (@stomp/stompjs, sockjs-client, flatgeobuf) +- react-router-dom v6.x 유지 + +### Step 2: OpenLayers → MapLibre GL JS 전환 +- 브랜치: `refactor/maplibre-migration` (Step 1 병합 후) +- `@deck.gl/mapbox` MapboxOverlay로 Deck.gl 자동 통합 +- OL EPSG:3857 변환 제거 → MapLibre LngLat(4326) 직접 사용 +- `@turf/turf`로 측정/좌표 계산 대체 +- 22개 기존 파일 수정 + projection.ts 신규