S&P API Gateway + 모니터링 통합 플랫폼
Go to file
2026-04-17 14:50:35 +09:00
.claude chore: CLAUDE_BOT_TOKEN 환경변수 추가 2026-04-07 11:10:17 +09:00
.gitea/workflows ci: Gitea Actions 자동 배포 워크플로우 추가 2026-04-07 11:28:39 +09:00
.githooks Initial commit 2026-04-07 10:20:40 +09:00
.mvn Initial commit 2026-04-07 10:20:40 +09:00
docs docs: 릴리즈 노트 정리 (2026-04-17) 2026-04-17 14:50:12 +09:00
frontend feat(frontend): 디자인 시스템 적용 및 전체 UI 개선 (#42) 2026-04-17 14:45:27 +09:00
scripts feat(domain): 도메인 관리 기능 및 API HUB 사이드바 개선 2026-04-14 13:59:05 +09:00
src feat(api-hub): 대시보드 개선 및 도메인 상세 페이지 구현 2026-04-14 15:47:06 +09:00
.editorconfig Initial commit 2026-04-07 10:20:40 +09:00
.gitignore feat: 프론트엔드 통합 프로젝트 초기 구조 구성 2026-04-07 10:56:10 +09:00
.sdkmanrc Initial commit 2026-04-07 10:20:40 +09:00
claude-code-design-system-prompt.md feat(frontend): 디자인 시스템 적용 및 전체 UI 개선 (#42) 2026-04-17 14:45:27 +09:00
CLAUDE.md feat(design): 디자인 시스템 적용 (CSS 토큰, Button/Badge, 차트, 다크모드) (#48) 2026-04-15 16:38:00 +09:00
design-system-preview.html feat(frontend): 디자인 시스템 적용 및 전체 UI 개선 (#42) 2026-04-17 14:45:27 +09:00
pom.xml feat(phase1): 기반 구축 - DB Entity, JWT 인증, 프론트엔드 레이아웃 2026-04-07 13:52:25 +09:00
README.md docs: README.md 프로젝트 문서 작성 2026-04-09 12:24:41 +09:00
workflow-version.json feat: 프론트엔드 통합 프로젝트 초기 구조 구성 2026-04-07 10:56:10 +09:00

SNP Connection Monitoring

API Gateway + 모니터링 통합 플랫폼. 서비스 사용자가 모니터링 애플리케이션에 데이터를 요청할 때 API 인증키를 통해 인증하고, 모든 요청/응답 데이터를 추적/관리합니다.

주요 기능

  • API Gateway: API Key 인증 기반 프록시, 요청/응답 자동 로깅
  • API Key 관리: AES-256 암호화 발급, 신청/승인 워크플로우, Permission 관리
  • 모니터링 대시보드: 실시간 통계 (Recharts), 30초 자동 갱신
  • 서비스 헬스체크: 1분 간격 폴링, 90일 uptime 추적, Service Status 페이지
  • 통계 분석: 서비스/사용자/API/테넌트/사용량 추이별 상세 통계
  • 다크/라이트 모드: 전체 UI 테마 지원

기술 스택

구분 기술
Backend Java 17, Spring Boot 3.2.1, Spring Data JPA, Spring Security (JWT)
Frontend React 19, TypeScript, Vite 7, Tailwind CSS 4, Recharts
Database PostgreSQL (월별 Range 파티셔닝)
Build Maven, frontend-maven-plugin
CI/CD Gitea Actions, systemd 자동 배포

서버 설정

항목
포트 8042
Context Path /snp-connection
DB PostgreSQL (snp_connection / common 스키마)
Swagger UI http://localhost:8042/snp-connection/swagger-ui/index.html

빌드 및 실행

# JDK 설정
sdk use java 17.0.18-amzn

# 프론트엔드 빌드
cd frontend && npm install && npm run build && cd ..

# 백엔드 빌드
mvn clean package -DskipTests -Dfrontend.skip=true

# 로컬 실행
mvn spring-boot:run

# 프론트엔드 개발 서버 (별도 터미널)
cd frontend && npm run dev

프로젝트 구조

snp-connection-monitoring/
├── frontend/                          # React + TypeScript 프론트엔드
│   ├── src/
│   │   ├── pages/                     # 페이지 컴포넌트
│   │   │   ├── DashboardPage.tsx      # 대시보드 (차트, 요약 카드)
│   │   │   ├── admin/                 # 관리 (서비스, 사용자, 테넌트)
│   │   │   ├── apikeys/              # API Key (신청, 관리)
│   │   │   ├── monitoring/           # 모니터링 (로그, 서비스 상태)
│   │   │   └── statistics/           # 통계 (서비스, 사용자, API, 테넌트, 사용량)
│   │   ├── services/                  # API 호출 모듈
│   │   ├── store/                     # 상태 관리 (Auth, Theme)
│   │   └── types/                     # TypeScript 타입 정의
│   └── vite.config.ts
├── src/main/java/com/gcsc/connection/
│   ├── auth/                          # JWT 인증 (login, refresh)
│   ├── tenant/                        # 테넌트 CRUD
│   ├── user/                          # 사용자 CRUD
│   ├── service/                       # 서비스/API CRUD
│   ├── apikey/                        # API Key 관리 (발급, 신청, 권한)
│   ├── gateway/                       # API Gateway (프록시, 인증 필터)
│   ├── monitoring/                    # 모니터링 (대시보드, 헬스체크, 로그)
│   ├── statistics/                    # 통계 API
│   ├── config/                        # 설정 (Security, WebClient, Async)
│   └── common/                        # 공통 (ApiResponse, Exception, AES)
├── docs/
│   ├── schema/                        # DB 스키마 SQL
│   └── dashboard-statistics-guide.md  # 대시보드/통계 가이드
└── .gitea/workflows/deploy.yml        # CI/CD 배포 워크플로우

API 엔드포인트

인증

Method URL 설명
POST /api/auth/login 로그인 (JWT 발급)
POST /api/auth/refresh 토큰 갱신

Gateway

Method URL 설명
ANY /gateway/{serviceCode}/** API Key 인증 후 대상 서비스로 프록시

관리 API

Method URL 설명
GET/POST/PUT /api/tenants 테넌트 CRUD
GET/POST/PUT/DELETE /api/users 사용자 CRUD
GET/POST/PUT /api/services 서비스 CRUD
GET/POST /api/services/{id}/apis 서비스 API CRUD

API Key

Method URL 설명
GET/POST /api/keys API Key 관리
POST /api/keys/requests API Key 신청
PUT /api/keys/requests/{id}/review 신청 승인/반려

모니터링

Method URL 설명
GET /api/dashboard/* 대시보드 통계
GET /api/monitoring/logs 요청 로그 검색
GET /api/heartbeat/status 서비스 헬스 상태
GET /api/statistics/* 도메인별 통계

배치 스케줄러

배치 주기 작업
HeartbeatScheduler 매 1분 서비스 헬스체크 폴링
PartitionManageScheduler 매월 1일 00:00 파티션 생성/삭제
DataCleanupScheduler 매일 02:00 health_log 90일 이전 삭제

팀 규칙

  • 코드 스타일: .claude/rules/code-style.md
  • Git 워크플로우: .claude/rules/git-workflow.md
  • 팀 정책: .claude/rules/team-policy.md