generated from gc/template-java-maven
백엔드: - JPA Entity 9개 + Repository 9개 (common 스키마) - JWT 인증 (jjwt, Access/Refresh 토큰) - AuthController (login/logout/refresh) - 공통 모듈 (BaseEntity, ErrorCode, BusinessException, PageResponse) - SecurityConfig JWT 필터 체인 통합 프론트엔드: - MainLayout (사이드바 + 헤더) + AuthLayout - 로그인 페이지 + ProtectedRoute - API 클라이언트 (fetch wrapper, JWT 자동 첨부, 401 refresh) - AuthContext + useAuth 훅 - 9개 플레이스홀더 페이지 + 라우팅 설정: - DB: snp_connection / snp_admin / common 스키마 - ddl-auto: update (개발), validate (운영) Closes #6 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3.3 KiB
3.3 KiB
SNP Connection Monitoring
API Gateway + 모니터링 통합 플랫폼. 모든 서비스 사용자가 모니터링 애플리케이션에 데이터를 요청할 때 API 인증키를 통해 인증하고, 모든 요청/응답 데이터를 추적/관리하는 서비스.
기술 스택
- Java 17, Spring Boot 3.2.1, Spring Data JPA
- PostgreSQL (DB: snp_connection, 스키마: common)
- Spring Security (JWT 기반 인증 예정)
- WebFlux WebClient (Heartbeat, Gateway Proxy)
- Springdoc OpenAPI 2.3.0 (Swagger)
- Lombok
- Frontend: React 19 + TypeScript + Vite + Tailwind CSS 4
빌드 및 실행
# 프론트엔드 빌드 (별도)
cd frontend && npm install && npm run build && cd ..
# 백엔드 빌드 (프론트엔드 자동 빌드 포함)
./mvnw clean package -DskipTests
# 로컬 실행
./mvnw spring-boot:run
# 테스트
./mvnw test
# 프론트엔드 개발 서버
cd frontend && npm run dev
주의: frontend-maven-plugin의 Node 호환성 문제로, 프론트엔드와 백엔드를 분리하여 빌드합니다.
서버 설정
- 포트: 8042
- Context Path: /snp-connection
- Swagger UI: http://localhost:8042/snp-connection/swagger-ui/index.html
- 프론트엔드 개발 서버: http://localhost:5173/snp-connection/
디렉토리 구조
snp-connection-monitoring/
├── pom.xml # Maven 설정 (frontend-maven-plugin 포함)
├── frontend/ # React + TypeScript 프론트엔드
│ ├── package.json
│ ├── vite.config.ts # Vite 빌드 설정 (output → ../src/main/resources/static)
│ ├── tsconfig.json
│ ├── index.html
│ └── src/
│ ├── main.tsx # React 엔트리 포인트
│ ├── App.tsx # 루트 컴포넌트 (라우팅)
│ ├── index.css # 글로벌 스타일 (Tailwind)
│ ├── pages/ # 페이지 컴포넌트
│ ├── components/ # 재사용 가능 컴포넌트
│ ├── hooks/ # 커스텀 훅
│ ├── services/ # API 호출 모듈
│ ├── store/ # 상태 관리
│ ├── types/ # TypeScript 타입 정의
│ └── utils/ # 유틸리티 함수
├── src/main/java/com/gcsc/connection/
│ ├── SnpConnectionApplication.java # 메인 애플리케이션
│ ├── config/ # 설정 클래스
│ ├── common/ # 공통 모듈 (ApiResponse, Exception)
│ └── global/ # 글로벌 컨트롤러 (WebViewController)
└── src/main/resources/
├── application.yml # 공통 설정
└── static/ # 프론트엔드 빌드 결과물 (자동 생성)
팀 규칙
- 코드 스타일:
.claude/rules/code-style.md참조 - 네이밍 규칙:
.claude/rules/naming.md참조 - 테스트 규칙:
.claude/rules/testing.md참조 - Git 워크플로우:
.claude/rules/git-workflow.md참조 - 팀 정책:
.claude/rules/team-policy.md참조
의존성 관리
- Maven: Nexus 프록시 레포지토리 (
.mvn/settings.xml) - npm: Nexus npm 프록시 레지스트리 (
frontend/.npmrc)