AI 기반 불법조업 탐지·차단 플랫폼 (React 19 + MapLibre + deck.gl + Zustand + Tailwind CSS)
Go to file
htlee 20806ee80c fix(prediction): dark_suspicion Adapter 입력 매핑 교정 (run_outputs 0 rows silent)
기존 DarkSuspicionModel.run() 이 ctx.inputs[*].features.gap_info.is_dark
로 대상을 필터했으나, 실제 AnalysisResult.features 는 gap_info 키를
포함하지 않고 다음으로 이미 flatten 저장됨:
  - dark_suspicion_score (0~100 int)
  - dark_tier ('CRITICAL'/'HIGH'/'WATCH'/'NONE')
  - dark_patterns (list[str])
  - gap_start_state / gap_start_sog / gap_start_lat / gap_start_lon

결과: PRIMARY 승격 + feature flag=1 적용해도 Adapter 가 한 선박도
평가하지 못해 detection_model_run_outputs 에 0 rows 적재 — E2E 검증
에서 evaluated_count=0 메트릭이 silent 조기 포착.

수정: Adapter 를 transshipment/risk/pair_trawl 과 동일한 관찰형으로 재작성.
  - row.is_dark 필터 후 기존 결과(score/tier/patterns) JSONB snapshot 기록
  - critical/high/watch/none_count + avg_score 메트릭 집계
  - input_ref: {mmsi, analyzed_at, gap_min}

운영 반영 후 1 사이클에서 3508 rows 적재 (141 CRITICAL / 467 HIGH /
963 WATCH / avg_score=27.78) 확인.

범위 밖 (후속 PR):
- compute_dark_suspicion 에 ACTIVE 버전 params 를 런타임 주입해 실제
  score/tier 재계산하는 scheduler 호출부 리팩토링. 현 상태는 params
  카탈로그 관찰까지만 (나머지 4 모델과 동일 수준).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 16:05:38 +09:00
.claude chore: .env.development → .example + pre-commit 모노레포 대응 2026-04-07 13:52:53 +09:00
.gitea/workflows feat: System Flow 뷰어 추가 (system-flow.html) — 102 노드, 133 엣지 2026-04-07 17:10:22 +09:00
.githooks chore: .env.development → .example + pre-commit 모노레포 대응 2026-04-07 13:52:53 +09:00
backend feat(backend): Phase 3 MVP — Detection Model Registry 운영자 API 2026-04-20 13:46:31 +09:00
database/migration feat: 메뉴 DB SSOT 구조화 — auth_perm_tree 기반 메뉴·권한·i18n 통합 2026-04-09 15:54:04 +09:00
deploy refactor: 프로젝트 뼈대 정리 — iran 잔재 제거 + 백엔드 계층 분리 + 카탈로그 등록 2026-04-16 16:18:18 +09:00
docs fix(prediction): dark_suspicion Adapter 입력 매핑 교정 (run_outputs 0 rows silent) 2026-04-20 16:05:38 +09:00
frontend fix(ui): 모니터링/디자인시스템 런타임 에러 해소 2026-04-20 06:31:11 +09:00
prediction fix(prediction): dark_suspicion Adapter 입력 매핑 교정 (run_outputs 0 rows silent) 2026-04-20 16:05:38 +09:00
.gitignore feat(detection): DAR-03 어구 탐지 워크플로우 + 모선 검토 UI + 24h 리플레이 통합 2026-04-15 13:26:15 +09:00
AGENTS.md docs: prediction-analysis 신규 + 루트/SFR 문서 drift 해소 2026-04-17 11:20:53 +09:00
ATTRIBUTIONS.md chore: 팀 워크플로우 기반 초기 프로젝트 구성 2026-04-06 14:11:29 +09:00
CLAUDE.md docs: 절대 지침 섹션 추가 (develop 동기화 + design-system 준수) 2026-04-17 07:23:58 +09:00
Makefile feat: S2 prediction 분석 엔진 모노레포 이식 2026-04-07 12:56:51 +09:00
README.md docs: prediction-analysis 신규 + 루트/SFR 문서 drift 해소 2026-04-17 11:20:53 +09:00

AI 기반 불법조업 탐지·차단 플랫폼

해양경찰청 AIS 신호 기반 불법 조업 선박 탐지, 단속 의사결정 지원 플랫폼.

기술 스택

분류 기술 버전
프레임워크 React + TypeScript 19.2 / 5.9
번들러 Vite (Rolldown) 8.0
지도 MapLibre GL + deck.gl 5.22 / 9.2
차트 ECharts 6.0
상태관리 Zustand 5.0
스타일 Tailwind CSS + CVA 4.2 / 0.7
다국어 react-i18next ko / en
린트 ESLint (Flat Config) 10

실행

npm install
npm run dev      # 개발 서버
npm run build    # 프로덕션 빌드 (~480ms)
npm run lint     # ESLint 검사

프로젝트 구조

src/
├── lib/charts/       ECharts 공통 (BaseChart + 프리셋)
├── lib/map/          MapLibre + deck.gl (BaseMap + 레이어 + hooks)
├── lib/i18n/         다국어 (10 네임스페이스, ko/en)
├── lib/theme/        디자인 토큰 + CVA 변형
├── data/mock/        공유 더미 데이터 (7 모듈)
├── stores/           Zustand 스토어 (8개)
├── services/         API 서비스 샘플
├── shared/           공유 UI 컴포넌트
├── features/         도메인별 페이지 (13그룹, 31페이지)
├── app/              라우터, 인증, 레이아웃
└── styles/           CSS (Dark/Light 테마)

문서

문서 설명
docs/architecture.md 아키텍처 현황 (기술스택, 구조, 렌더링 최적화, 테마)
docs/sfr-user-guide.md SFR 사용자 가이드 (메뉴별 기능 설명, 구현/미구현 현황)
docs/sfr-traceability.md SFR 요구사항 추적 매트릭스 (개발자용, 소스 경로 포함)
docs/page-workflow.md 31개 페이지 역할 + 4개 업무 파이프라인
docs/data-sharing-analysis.md 데이터 공유 분석 + mock 통합 결과
docs/next-refactoring.md 다음 단계 TODO (API 연동, 실시간, 코드 스플리팅)
docs/prediction-analysis.md Prediction 모듈 구조/방향 심층 분석 (2026-04-17, opus 4.7 독립 리뷰)

SFR 요구사항 대응 현황

20개 SFR 전체 UI 구현 완료. 백엔드 연동 대기 중.

SFR 기능 화면 상태
SFR-01 로그인·권한 관리 /login, /access-control UI 완료
SFR-02 환경설정·공지·공통 /system-config, /notices UI 완료
SFR-03 통합 데이터 허브 /data-hub UI 완료
SFR-04 AI 예측모델 관리 /ai-model UI 완료
SFR-05 위험도 지도 /risk-map UI 완료
SFR-06 단속 계획·경보 /enforcement-plan UI 완료
SFR-07 단일함정 순찰경로 /patrol-route UI 완료
SFR-08 다함정 경로최적화 /fleet-optimization UI 완료
SFR-09 Dark Vessel 탐지 /dark-vessel UI 완료
SFR-10 어구 탐지 /gear-detection, /gear-collision(V030) UI 완료
SFR-11 단속·탐지 이력 /enforcement-history UI 완료
SFR-12 모니터링 대시보드 /dashboard, /monitoring UI 완료
SFR-13 통계·성과 분석 /statistics UI 완료
SFR-14 외부 서비스 연계 /external-service UI 완료
SFR-15 모바일 서비스 /mobile-service UI 완료
SFR-16 함정 Agent /ship-agent UI 완료
SFR-17 AI 알림 발송 /ai-alert UI 완료
SFR-18/19 MLOps / LLMOps /mlops UI 완료
SFR-20 AI Q&A 지원 /ai-assistant UI 완료