- .gitea/workflows/deploy.yml: main merge 시 frontend/backend 자동 빌드·배포 - deploy/kcg-backend.service: systemd 서비스 (JDK 17, 2~4GB 힙) - deploy/nginx-kcg.conf: SSL + SPA 서빙 + API 프록시 + 외부 API CORS 프록시 - .githooks/pre-commit: 모노레포 대응 (frontend tsc+eslint, backend mvn compile) - .gitignore: frontend/backend/prediction 각각 빌드 산출물 추가 - CLAUDE.md: 모노레포 구조 반영 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
103 lines
2.4 KiB
Markdown
103 lines
2.4 KiB
Markdown
# 프로젝트 개요
|
|
|
|
- **타입**: 모노레포 (Frontend + Backend + Prediction)
|
|
- **Frontend**: React + TypeScript + Vite
|
|
- **Backend**: Spring Boot 3.2.5 + Java 17 + PostgreSQL
|
|
- **Prediction**: FastAPI (Python)
|
|
- **Node.js**: `.node-version` 참조
|
|
- **Java**: `backend/.sdkmanrc` 참조
|
|
- **패키지 매니저**: npm (frontend), Maven (backend), pip (prediction)
|
|
|
|
## 빌드 및 실행
|
|
|
|
### Frontend
|
|
```bash
|
|
cd frontend
|
|
npm install
|
|
npm run dev
|
|
```
|
|
|
|
### Backend
|
|
```bash
|
|
cd backend
|
|
# application-local.yml 설정 필요 (application-local.yml.example 참조)
|
|
cp src/main/resources/application-local.yml.example src/main/resources/application-local.yml
|
|
mvn spring-boot:run -Dspring-boot.run.profiles=local
|
|
```
|
|
|
|
### Database
|
|
```bash
|
|
psql -U postgres -f database/init.sql
|
|
psql -U postgres -d kcgdb -f database/migration/001_initial_schema.sql
|
|
```
|
|
|
|
### Prediction
|
|
```bash
|
|
cd prediction
|
|
python3 -m venv venv
|
|
source venv/bin/activate
|
|
pip install -r requirements.txt
|
|
uvicorn main:app --reload --port 8000
|
|
```
|
|
|
|
### 린트/검증
|
|
```bash
|
|
# Frontend
|
|
cd frontend && npm run lint
|
|
|
|
# Backend
|
|
cd backend && mvn compile
|
|
```
|
|
|
|
## 프로젝트 구조
|
|
|
|
```
|
|
frontend/
|
|
├── src/
|
|
│ ├── assets/
|
|
│ ├── components/
|
|
│ ├── hooks/
|
|
│ ├── pages/
|
|
│ ├── services/
|
|
│ ├── store/
|
|
│ ├── types/
|
|
│ ├── utils/
|
|
│ ├── App.tsx
|
|
│ └── main.tsx
|
|
├── package.json
|
|
└── vite.config.ts
|
|
|
|
backend/
|
|
├── src/main/java/gc/mda/kcg/
|
|
│ ├── config/ # 설정 (CORS, Security, Properties)
|
|
│ ├── auth/ # 인증 (Google OAuth + JWT)
|
|
│ ├── domain/ # 도메인 (event, news, osint, aircraft)
|
|
│ └── collector/ # 데이터 수집기 (GDELT, GoogleNews, CENTCOM)
|
|
├── src/main/resources/
|
|
│ ├── application.yml
|
|
│ └── application-*.yml.example
|
|
└── pom.xml
|
|
|
|
database/
|
|
├── init.sql
|
|
└── migration/
|
|
|
|
prediction/
|
|
├── main.py
|
|
└── requirements.txt
|
|
```
|
|
|
|
## 팀 규칙
|
|
|
|
- 코드 스타일: `.claude/rules/code-style.md` 참조
|
|
- 네이밍 규칙: `.claude/rules/naming.md` 참조
|
|
- 테스트 규칙: `.claude/rules/testing.md` 참조
|
|
- Git 워크플로우: `.claude/rules/git-workflow.md` 참조
|
|
- 팀 정책: `.claude/rules/team-policy.md` 참조
|
|
|
|
## 의존성 관리
|
|
|
|
- Frontend: Nexus 프록시 레포지토리를 통해 npm 패키지 관리 (`.npmrc`)
|
|
- Backend: Maven Central (pom.xml)
|
|
- Prediction: pip (requirements.txt)
|