release: v2.1.0 — 인증 시스템 + Google OAuth #4
14
.claude/scripts/on-commit.sh
Executable file
14
.claude/scripts/on-commit.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
INPUT=$(cat)
|
||||
COMMAND=$(echo "$INPUT" | python3 -c "import sys,json;print(json.load(sys.stdin).get('tool_input',{}).get('command',''))" 2>/dev/null || echo "")
|
||||
if echo "$COMMAND" | grep -qE 'git commit'; then
|
||||
cat <<RESP
|
||||
{
|
||||
"hookSpecificOutput": {
|
||||
"additionalContext": "커밋이 감지되었습니다. 다음을 수행하세요:\n1. docs/CHANGELOG.md에 변경 내역 추가\n2. memory/project-snapshot.md에서 변경된 부분 업데이트\n3. memory/project-history.md에 이번 변경사항 추가\n4. API 인터페이스 변경 시 memory/api-types.md 갱신\n5. 프로젝트에 lint 설정이 있다면 lint 결과를 확인하고 문제를 수정"
|
||||
}
|
||||
}
|
||||
RESP
|
||||
else
|
||||
echo '{}'
|
||||
fi
|
||||
23
.claude/scripts/on-post-compact.sh
Executable file
23
.claude/scripts/on-post-compact.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
INPUT=$(cat)
|
||||
CWD=$(echo "$INPUT" | python3 -c "import sys,json;print(json.load(sys.stdin).get('cwd',''))" 2>/dev/null || echo "")
|
||||
if [ -z "$CWD" ]; then
|
||||
CWD=$(pwd)
|
||||
fi
|
||||
PROJECT_HASH=$(echo "$CWD" | sed 's|/|-|g')
|
||||
MEMORY_DIR="$HOME/.claude/projects/$PROJECT_HASH/memory"
|
||||
CONTEXT=""
|
||||
if [ -f "$MEMORY_DIR/MEMORY.md" ]; then
|
||||
SUMMARY=$(head -100 "$MEMORY_DIR/MEMORY.md" | python3 -c "import sys;print(sys.stdin.read().replace('\\\\','\\\\\\\\').replace('\"','\\\\\"').replace('\n','\\\\n'))" 2>/dev/null)
|
||||
CONTEXT="컨텍스트가 압축되었습니다.\\n\\n[세션 요약]\\n${SUMMARY}"
|
||||
fi
|
||||
if [ -f "$MEMORY_DIR/project-snapshot.md" ]; then
|
||||
SNAP=$(head -50 "$MEMORY_DIR/project-snapshot.md" | python3 -c "import sys;print(sys.stdin.read().replace('\\\\','\\\\\\\\').replace('\"','\\\\\"').replace('\n','\\\\n'))" 2>/dev/null)
|
||||
CONTEXT="${CONTEXT}\\n\\n[프로젝트 최신 상태]\\n${SNAP}"
|
||||
fi
|
||||
if [ -n "$CONTEXT" ]; then
|
||||
CONTEXT="${CONTEXT}\\n\\n위 내용을 참고하여 작업을 이어가세요. 상세 내용은 memory/ 디렉토리의 각 파일을 참조하세요."
|
||||
echo "{\"hookSpecificOutput\":{\"additionalContext\":\"${CONTEXT}\"}}"
|
||||
else
|
||||
echo "{\"hookSpecificOutput\":{\"additionalContext\":\"컨텍스트가 압축되었습니다. memory 파일이 없으므로 사용자에게 이전 작업 내용을 확인하세요.\"}}"
|
||||
fi
|
||||
8
.claude/scripts/on-pre-compact.sh
Executable file
8
.claude/scripts/on-pre-compact.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# PreCompact hook: systemMessage만 지원 (hookSpecificOutput 사용 불가)
|
||||
INPUT=$(cat)
|
||||
cat <<RESP
|
||||
{
|
||||
"systemMessage": "컨텍스트 압축이 시작됩니다. 반드시 다음을 수행하세요:\n\n1. memory/MEMORY.md - 핵심 작업 상태 갱신 (200줄 이내)\n2. memory/project-snapshot.md - 변경된 패키지/타입 정보 업데이트\n3. memory/project-history.md - 이번 세션 변경사항 추가\n4. memory/api-types.md - API 인터페이스 변경이 있었다면 갱신\n5. 미완료 작업이 있다면 TodoWrite에 남기고 memory에도 기록"
|
||||
}
|
||||
RESP
|
||||
@ -43,5 +43,42 @@
|
||||
"Read(./**/.env.*)",
|
||||
"Read(./**/secrets/**)"
|
||||
]
|
||||
},
|
||||
"hooks": {
|
||||
"SessionStart": [
|
||||
{
|
||||
"matcher": "compact",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "bash .claude/scripts/on-post-compact.sh",
|
||||
"timeout": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"PreCompact": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "bash .claude/scripts/on-pre-compact.sh",
|
||||
"timeout": 30
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"PostToolUse": [
|
||||
{
|
||||
"matcher": "Bash",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "bash .claude/scripts/on-commit.sh",
|
||||
"timeout": 15
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
6
.claude/workflow-version.json
Normal file
6
.claude/workflow-version.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"applied_global_version": "1.3.0",
|
||||
"applied_date": "2026-02-27",
|
||||
"project_type": "react-ts",
|
||||
"gitea_url": "https://gitea.gc-si.dev"
|
||||
}
|
||||
96
CLAUDE.md
Normal file
96
CLAUDE.md
Normal file
@ -0,0 +1,96 @@
|
||||
# WING-OPS (해양 방제 운영 지원 시스템)
|
||||
|
||||
## 프로젝트 개요
|
||||
해양 오염 사고 대응을 위한 방제 운영 지원 시스템.
|
||||
유류/HNS 확산 예측, 역추적 분석, 구조 시나리오, 항공 방제, 자산 관리, SCAT 조사, 기상/해상 정보를 통합 제공한다.
|
||||
|
||||
- **프로젝트 타입**: react-ts (모노레포)
|
||||
- **Frontend**: React 19 + Vite 7 + TypeScript 5.9 + Tailwind CSS 3
|
||||
- **Backend**: Express 4 + better-sqlite3 + TypeScript
|
||||
- **상태관리**: Zustand (클라이언트), TanStack Query (서버)
|
||||
- **지도**: Leaflet, OpenLayers
|
||||
- **실시간**: Socket.IO
|
||||
|
||||
## 빌드/실행
|
||||
|
||||
### Frontend
|
||||
```bash
|
||||
cd frontend
|
||||
npm install
|
||||
npm run dev # 개발 서버 (Vite, localhost:5173)
|
||||
npm run build # 프로덕션 빌드 (tsc -b && vite build)
|
||||
npm run lint # ESLint 검증
|
||||
npm run preview # 빌드 미리보기
|
||||
```
|
||||
|
||||
### Backend
|
||||
```bash
|
||||
cd backend
|
||||
npm install
|
||||
npm run dev # 개발 서버 (tsx watch, localhost:3001)
|
||||
npm run build # TypeScript 컴파일 (tsc)
|
||||
npm start # 프로덕션 실행
|
||||
npm run db:seed # DB 초기 데이터
|
||||
```
|
||||
|
||||
### Docker
|
||||
```bash
|
||||
docker-compose up -d # PostgreSQL 16 + PostGIS + pgAdmin
|
||||
```
|
||||
|
||||
## 테스트
|
||||
테스트 프레임워크 미구성. 향후 Vitest + React Testing Library 도입 예정.
|
||||
|
||||
## Lint/Format
|
||||
```bash
|
||||
cd frontend && npx eslint . # ESLint (flat config)
|
||||
npx prettier --check . # Prettier 검증
|
||||
npx prettier --write . # Prettier 자동 수정
|
||||
```
|
||||
|
||||
## 프로젝트 구조
|
||||
```
|
||||
wing/
|
||||
├── frontend/ React 19 + Vite + TypeScript + Tailwind
|
||||
│ └── src/
|
||||
│ ├── App.tsx 메인 (MainTab 라우팅, 11개 탭)
|
||||
│ ├── components/ UI 컴포넌트 (13개 서브디렉토리)
|
||||
│ │ ├── analysis/ HNS/Oil/Rescue 분석 시나리오
|
||||
│ │ ├── board/ 게시판
|
||||
│ │ ├── incidents/ 사건/사고 관리
|
||||
│ │ ├── layer/ 레이어 트리
|
||||
│ │ ├── layout/ MainLayout, TopBar, LeftPanel, RightPanel
|
||||
│ │ ├── map/ MapView, BacktrackReplay
|
||||
│ │ ├── reports/ 보고서
|
||||
│ │ ├── views/ 각 탭별 페이지 뷰
|
||||
│ │ └── weather/ 해양/기상 시각화
|
||||
│ ├── hooks/ 커스텀 훅 (useLayers, useOceanForecast 등)
|
||||
│ ├── services/ API 서비스 (api, khoaApi, weatherApi 등)
|
||||
│ ├── store/ Zustand 상태관리
|
||||
│ ├── types/ 타입 정의
|
||||
│ └── utils/ 유틸리티 (coordinates, geo, sanitize)
|
||||
├── backend/ Express + better-sqlite3
|
||||
│ └── src/
|
||||
│ ├── server.ts Express 진입점
|
||||
│ ├── routes/ layers, simulation
|
||||
│ ├── middleware/ security (입력 살균, rate-limit)
|
||||
│ └── db/ database, seed
|
||||
├── database/ SQL 초기화 스크립트
|
||||
├── docs/ 문서
|
||||
├── .claude/ 팀 워크플로우 (rules, skills, scripts)
|
||||
├── .githooks/ Git hooks (pre-commit, commit-msg, post-checkout)
|
||||
└── docker-compose.yml PostgreSQL + PostGIS + pgAdmin
|
||||
```
|
||||
|
||||
## 팀 컨벤션
|
||||
`.claude/rules/` 디렉토리 참조:
|
||||
- `team-policy.md` — 보안/품질 정책
|
||||
- `git-workflow.md` — 브랜치/커밋/MR 규칙
|
||||
- `code-style.md` — TypeScript/React 코드 스타일
|
||||
- `naming.md` — 네이밍 규칙
|
||||
- `testing.md` — 테스트 규칙
|
||||
|
||||
## 환경 설정
|
||||
- Node.js 20 (`.node-version`, fnm 사용)
|
||||
- npm registry: Nexus proxy (`.npmrc`)
|
||||
- Git hooks: `.githooks/` (core.hooksPath 설정됨)
|
||||
불러오는 중...
Reference in New Issue
Block a user