docs: API 통합 프로젝트 계획 및 Flow Test 스펙 추가

- INDEX.md: TODO.md 링크 추가
- TODO.md: 프로젝트 할일 목록 신규 생성
- plans/flow-tests/: Flow Tester 테스트 시나리오 JSON 추가
  - auth-api-flow.json: 인증 API 플로우 테스트
  - pricing-validation-test.json: 가격 검증 테스트
- projects/api-integration/: 마이그레이션 계획 문서
  - MASTER_PLAN.md: 전체 마이그레이션 전략
  - PROGRESS.md: 진행 상황 추적
  - WORKFLOW.md: 작업 워크플로우
  - phase-1 ~ phase-4: 단계별 상세 계획

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-21 01:35:43 +09:00
parent 1f963a5c60
commit 2d9b02f74e
16 changed files with 3127 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
| 작업 유형 | 필수 문서 | 용도 |
|----------|----------|------|
| **TODO 확인** | `TODO.md` | 긴급/중요 이슈 및 개선사항 추적 |
| **API 개발** | `standards/api-rules.md` | Service-First, FormRequest, i18n 규칙 |
| **DB 변경** | `specs/database-schema.md` | 테이블 구조, 관계, 컬럼 규칙 |
| **새 기능 구현** | `architecture/system-overview.md` | 전체 아키텍처 이해 |

111
TODO.md Normal file
View File

@@ -0,0 +1,111 @@
# SAM Project TODO
> **마지막 업데이트**: 2025-12-20
---
## 🔴 긴급 (보안/필수)
### [TODO-001] Settings 권한 관리 localStorage → API 전환
**발견일**: 2025-12-20
**우선순위**: 🔴 긴급
**카테고리**: 보안
**현재 상태**:
- 권한 관리가 `localStorage`에 저장됨
- 파일: `react/src/components/settings/PermissionManagement/index.tsx`
- 키: `buddy_permissions`
**문제점**:
| 문제 | 설명 |
|------|------|
| 클라이언트 저장 | 권한이 브라우저에만 저장됨 |
| 조작 가능 | DevTools에서 누구나 수정 가능 |
| 서버 미검증 | 서버에서 권한 검증 안 함 |
| 세션 비공유 | 다른 브라우저/기기에서 권한 없음 |
**해결 방안**:
```
현재: localStorage → 브라우저에 저장
개선: API 호출 → DB에 저장 → 서버에서 검증
필요 API:
- GET /api/v1/roles
- POST /api/v1/roles
- PUT /api/v1/roles/{id}/permissions
- GET /api/v1/permissions
```
**관련 문서**:
- `docs/projects/api-integration/phase-3-api-mapping/gap-analysis.md`
---
## 🟡 중요 (기능 완성)
### [TODO-002] Mock 데이터 → API 연동 전환
**발견일**: 2025-12-20
**우선순위**: 🟡 중요
**카테고리**: 기능 개발
**현재 상태**:
- 109개 React 페이지 중 95개 (87.2%)가 Mock 데이터 사용
- `generateMockData()` 함수 패턴
**영향 모듈**:
| 모듈 | 페이지 수 | 상태 |
|------|----------|------|
| Accounting | 17 | 🆕 Mock |
| HR | 9 | 🆕 Mock |
| Board | 6 | 🆕 Mock |
| Approval | 4 | 🆕 Mock |
| Settings | 10 | 🆕 Mock |
| Dashboard | 1 | ⏳ 미구현 |
| Reports | 2 | 🆕 Mock |
| Customer Center | 6 | 🆕 Mock |
| Production | 4 | 🆕 Mock |
| Sales (일부) | 4 | 🆕 Mock |
**관련 문서**:
- `docs/projects/api-integration/phase-3-api-mapping/mapping-matrix.md`
- `docs/projects/api-integration/phase-3-api-mapping/gap-analysis.md`
---
## 🟢 개선 (최적화)
### [TODO-003] API 클라이언트 패턴 통일
**발견일**: 2025-12-20
**우선순위**: 🟢 개선
**카테고리**: 코드 품질
**현재 상태**:
| 패턴 | 사용처 | 비고 |
|------|--------|------|
| `/api/proxy/*` | Items, Clients | ✅ 표준 |
| `/api/v1/*` (Server Actions) | Pricing | 다른 패턴 |
| `generateMockData()` | 대부분 | Mock |
**권장사항**: `/api/proxy/*` 패턴으로 통일
---
## ✅ 완료
| ID | 제목 | 완료일 | 비고 |
|----|------|--------|------|
| - | - | - | - |
---
## 참고
- **Phase 3 분석 결과**: `docs/projects/api-integration/phase-3-api-mapping/`
- **전체 진행 상황**: `docs/projects/api-integration/PROGRESS.md`
---
*이 문서는 발견된 이슈와 개선사항을 추적합니다.*

View File

@@ -0,0 +1,124 @@
{
"name": "Auth API Flow Test",
"description": "인증 API 전체 플로우 테스트 - 로그인, 프로필 조회, 토큰 갱신, 로그아웃",
"version": "1.0",
"config": {
"baseUrl": "",
"timeout": 30000,
"stopOnFailure": true
},
"variables": {
"user_id": "{{$env.FLOW_TESTER_USER_ID}}",
"user_pwd": "{{$env.FLOW_TESTER_USER_PWD}}"
},
"steps": [
{
"id": "login",
"name": "1. 로그인",
"description": "access_token, refresh_token 획득",
"method": "POST",
"endpoint": "/login",
"body": {
"user_id": "{{user_id}}",
"user_pwd": "{{user_pwd}}"
},
"expect": {
"status": [200],
"jsonPath": {
"$.access_token": "@isString",
"$.refresh_token": "@isString"
}
},
"extract": {
"access_token": "$.access_token",
"refresh_token": "$.refresh_token"
}
},
{
"id": "get_profile",
"name": "2. 프로필 조회",
"description": "access_token으로 현재 사용자 정보 조회",
"method": "GET",
"endpoint": "/users/me",
"headers": {
"Authorization": "Bearer {{login.access_token}}"
},
"expect": {
"status": [200],
"jsonPath": {
"$.success": true,
"$.data.id": "@isNumber"
}
},
"extract": {
"user_id": "$.data.id",
"user_name": "$.data.name"
}
},
{
"id": "refresh_token",
"name": "3. 토큰 갱신",
"description": "refresh_token으로 새 access_token 발급",
"method": "POST",
"endpoint": "/refresh",
"body": {
"refresh_token": "{{login.refresh_token}}"
},
"expect": {
"status": [200],
"jsonPath": {
"$.access_token": "@isString"
}
},
"extract": {
"new_access_token": "$.access_token"
}
},
{
"id": "verify_new_token",
"name": "4. 새 토큰으로 프로필 조회",
"description": "갱신된 토큰으로 API 호출 가능 확인",
"method": "GET",
"endpoint": "/users/me",
"headers": {
"Authorization": "Bearer {{refresh_token.new_access_token}}"
},
"expect": {
"status": [200],
"jsonPath": {
"$.success": true
}
}
},
{
"id": "logout",
"name": "5. 로그아웃",
"description": "새 access_token으로 로그아웃",
"method": "POST",
"endpoint": "/logout",
"headers": {
"Authorization": "Bearer {{refresh_token.new_access_token}}"
},
"expect": {
"status": [200],
"jsonPath": {
"$.success": true
}
}
},
{
"id": "verify_logout",
"name": "6. 로그아웃 확인",
"description": "로그아웃 후 토큰 무효화 확인",
"method": "GET",
"endpoint": "/users/me",
"headers": {
"Authorization": "Bearer {{refresh_token.new_access_token}}"
},
"expect": {
"status": [401]
},
"continueOnFailure": true
}
]
}

View File

@@ -0,0 +1,138 @@
{
"name": "Pricing API Validation Test",
"description": "단가 API validation 테스트 - item_type_code common_codes 검증, margin_rate 100% 초과 허용 확인",
"version": "1.0",
"config": {
"baseUrl": "",
"timeout": 30000,
"stopOnFailure": false
},
"variables": {
"user_id": "{{$env.FLOW_TESTER_USER_ID}}",
"user_pwd": "{{$env.FLOW_TESTER_USER_PWD}}"
},
"steps": [
{
"id": "login",
"name": "1. 로그인",
"method": "POST",
"endpoint": "/login",
"body": {
"user_id": "{{user_id}}",
"user_pwd": "{{user_pwd}}"
},
"expect": {
"status": [200],
"jsonPath": {
"$.access_token": "@isString"
}
},
"extract": {
"token": "$.access_token"
}
},
{
"id": "test_valid_item_type",
"name": "2. 유효한 item_type_code 테스트 (PT)",
"description": "common_codes에 있는 PT 코드로 단가 등록",
"method": "POST",
"endpoint": "/pricing",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"body": {
"item_type_code": "PT",
"item_id": 1,
"purchase_price": 10000,
"margin_rate": 150,
"sales_price": 25000,
"effective_from": "2025-01-01"
},
"expect": {
"status": [200, 201],
"jsonPath": {
"$.success": true
}
},
"extract": {
"priceId": "$.data.id"
},
"continueOnFailure": true
},
{
"id": "test_invalid_item_type",
"name": "3. 잘못된 item_type_code 테스트",
"description": "common_codes에 없는 코드로 422 에러 확인",
"method": "POST",
"endpoint": "/pricing",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"body": {
"item_type_code": "INVALID_CODE",
"item_id": 1,
"effective_from": "2025-01-01"
},
"expect": {
"status": [422],
"jsonPath": {
"$.success": false
}
},
"continueOnFailure": true
},
{
"id": "test_high_margin_rate",
"name": "4. 100% 초과 마진율 테스트 (900%)",
"description": "margin_rate 900% 허용 확인",
"method": "POST",
"endpoint": "/pricing",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"body": {
"item_type_code": "FG",
"item_id": 2,
"purchase_price": 5000,
"margin_rate": 900,
"effective_from": "2025-01-01"
},
"expect": {
"status": [200, 201],
"jsonPath": {
"$.success": true
}
},
"extract": {
"priceId2": "$.data.id"
},
"continueOnFailure": true
},
{
"id": "cleanup1",
"name": "5. 테스트 데이터 정리 (1)",
"method": "DELETE",
"endpoint": "/pricing/{{test_valid_item_type.priceId}}",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"expect": {
"status": [200, 204, 404]
},
"continueOnFailure": true
},
{
"id": "cleanup2",
"name": "6. 테스트 데이터 정리 (2)",
"method": "DELETE",
"endpoint": "/pricing/{{test_high_margin_rate.priceId2}}",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"expect": {
"status": [200, 204, 404]
},
"continueOnFailure": true
}
]
}

View File

@@ -0,0 +1,232 @@
# React ↔ API 연동 마스터 플랜
> **프로젝트**: SAM ERP 프론트엔드-백엔드 연동
> **시작일**: 2025-12-20
> **목표**: React(dev.sam.kr) 화면이 API(api.sam.kr)와 완벽하게 연동되어 정상 작동
---
## 1. 프로젝트 개요
### 1.1 배경
- React와 API가 동일 기획서 기반으로 개발되었으나, 문서 없이 독립 개발
- 프론트엔드와 백엔드의 관점 차이로 API 불일치 발생
- 연동 및 오류 수정 작업 필요
### 1.2 핵심 원칙
| 원칙 | 설명 |
|------|------|
| **React 기준** | 화면 요구사항에 맞게 API 수정/신규 개발 |
| **시스템 구조 예외** | items 통합 등 구조 변경은 정책 기반 처리 |
| **문서화 우선** | 모든 작업은 문서화하여 세션 간 연속성 보장 |
### 1.3 현황 분석 결과 (2025-12-20)
#### API 프로젝트
- **테이블 통합 완료**: `products` + `materials``items` (2025-12-13)
- **총 엔드포인트**: 약 325개 (8개 주요 도메인)
- **인증 방식**: API Key + Bearer Token (Sanctum)
- **Swagger 문서**: 69개 파일
#### React 프로젝트
- **프레임워크**: Next.js 15.5.7 + React 19
- **라우팅**: App Router ([locale]/(protected)/*)
- **API 클라이언트**: Native Fetch (axios 미사용)
- **인증**: HttpOnly Cookie + Bearer Token
- **목업 데이터**: 없음 (모든 데이터 실시간 API 호출)
---
## 2. 작업 Phase 정의
### Phase 0: 사전 분석 ✅ 완료
- [x] API 프로젝트 구조 분석
- [x] React 프로젝트 구조 분석
- [x] 테이블 통합 현황 확인 (items 완료)
- [x] 문서 구조 생성
### Phase 1: 테이블 통합 검증 (🟢 확인됨 - 스킵 가능)
**상태**: items 테이블 통합 이미 완료 (2025-12-13)
- [x] products/materials → items 마이그레이션 완료
- [x] ItemsController, ItemService 통합 완료
- [x] BOM 관리 items/{id}/bom으로 통합
- [ ] 레거시 참조 정리 확인 (옵션)
### Phase 2: React 라우터 → 메뉴 추출 (병행 작업)
**목표**: React 라우트 기반 메뉴 등록
체크리스트:
- [ ] React 전체 라우트 목록 추출
- [ ] 메뉴 구조 정리 (계층, 이름, URL)
- [ ] mng 메뉴 등록 포맷 생성
- [ ] 권한 매핑 정의
**산출물**: `phase-2-menu-extraction/menu-list.md`
### Phase 3: React ↔ API 매핑 분석
**목표**: 화면별 필요 API 식별 및 Gap 분석
체크리스트:
- [ ] React 페이지별 API 호출 분석
- [ ] 기존 API 엔드포인트 매핑
- [ ] 신규 개발 필요 API 식별
- [ ] 수정 필요 API 식별
- [ ] 중복/유사 API 정리
**산출물**: `phase-3-api-mapping/mapping-matrix.md`
### Phase 4: 연동 작업 + 오류 수정
**목표**: 실제 연동 및 오류 해결
작업 그룹:
1. **인증/메뉴**: 로그인, 메뉴 로드, 권한 체크
2. **품목 관리**: Items CRUD, BOM, 파일
3. **거래처/판매**: 거래처, 견적, 주문
4. **인사/재무**: 사원, 근태, 급여
5. **기타 기능**: 게시판, 설정, 대시보드
**산출물**: `phase-4-integration/integration-log.md`
### Phase 5: 최종 검증 및 리포트
**목표**: 전체 기능 검증 및 문서화
체크리스트:
- [ ] 전체 기능 테스트
- [ ] 오류 리스트 정리
- [ ] 변경 내역 정리
- [ ] 최종 리포트 작성
**산출물**: `FINAL_REPORT.md`
---
## 3. 주요 연동 대상 (React 페이지 기준)
### 3.1 핵심 기능 (우선순위 높음)
| 카테고리 | 페이지 | API 엔드포인트 | 상태 |
|----------|--------|----------------|------|
| 인증 | /login | POST /login | ✅ 연동됨 |
| 대시보드 | /dashboard | GET /dashboard/* | 🔍 확인 필요 |
| 품목 | /items | GET/POST/PUT/DELETE /items | 🔍 확인 필요 |
| 품목 BOM | /items/[id] | GET/POST /items/{id}/bom | 🔍 확인 필요 |
### 3.2 업무 기능
| 카테고리 | 페이지 | API 그룹 | 상태 |
|----------|--------|----------|------|
| 회계-매출 | /accounting/sales | /sales/* | 🔍 확인 필요 |
| 회계-매입 | /accounting/purchase | /purchases/* | 🔍 확인 필요 |
| 거래처 | /accounting/vendors | /clients/* | 🔍 확인 필요 |
| 영업-견적 | /sales/quote-management | /quotes/* | 🔍 확인 필요 |
| 영업-단가 | /sales/pricing-management | /pricing/* | 🔍 확인 필요 |
### 3.3 관리 기능
| 카테고리 | 페이지 | API 그룹 | 상태 |
|----------|--------|----------|------|
| HR-사원 | /hr/employee-management | /employees/* | 🔍 확인 필요 |
| HR-근태 | /hr/attendance | /attendances/* | 🔍 확인 필요 |
| 설정-권한 | /settings/permissions | /roles/* | 🔍 확인 필요 |
| 게시판 | /board | /boards/*, /posts/* | 🔍 확인 필요 |
---
## 4. 기술 스택 참조
### 4.1 React (프론트엔드)
```yaml
Framework: Next.js 15.5.7
React: 19.2.1
UI: shadcn/ui (Radix UI + Tailwind CSS)
Form: React Hook Form 7.66 + Zod 4.1
State: Zustand 5.0.8
i18n: next-intl 4.4.0
HTTP: Native Fetch API
```
### 4.2 API (백엔드)
```yaml
Framework: Laravel 12
PHP: 8.4+
Auth: Sanctum (Bearer Token)
Multi-tenant: BelongsToTenant scope
API Version: v1 (/api/v1/*)
Swagger: L5-Swagger
```
### 4.3 React API 호출 패턴
```typescript
// 프록시 패턴: /api/proxy/* → PHP /api/v1/*
// HttpOnly 쿠키에서 토큰 자동 추출
fetch('/api/proxy/items', {
credentials: 'include',
headers: { 'Content-Type': 'application/json' }
});
```
---
## 5. 문서 구조
```
docs/projects/api-integration/
├── MASTER_PLAN.md # 이 문서
├── PROGRESS.md # 진행 상황 추적
├── WORKFLOW.md # 작업 프로세스
├── react-api-guide.md # React API 연동 가이드
├── phase-1-table-migration/ # 🟢 완료 (스킵)
│ └── README.md
├── phase-2-menu-extraction/ # 🟡 병행
│ ├── README.md
│ ├── react-routes-analysis.md
│ └── menu-list.md
├── phase-3-api-mapping/ # 🔵 순차
│ ├── README.md
│ ├── api-endpoints-list.md
│ ├── mapping-matrix.md
│ └── gap-analysis.md
├── phase-4-integration/ # 🔵 순차
│ ├── README.md
│ ├── integration-log.md
│ ├── api-changes.md
│ └── issues/
├── FINAL_REPORT.md
└── appendix/
├── api-analysis.json # API 분석 원본
└── react-analysis.json # React 분석 원본
```
---
## 6. 세션 영속성
### 6.1 Serena 메모리
```
api-integration-state.md # 현재 phase, task, 다음 액션
api-integration-context.md # 결정사항, 임시 메모
```
### 6.2 세션 복구
1. `serena.list_memories()` → 상태 확인
2. `PROGRESS.md` → 상세 진행상황
3. "다음 액션"부터 재개
---
## 7. 참조 문서
- [PROJECT_DEVELOPMENT_POLICY.md](../../../docs/guides/PROJECT_DEVELOPMENT_POLICY.md)
- [CLAUDE.md](../../../CLAUDE.md)
- [API_RULES.md](../../../API_RULES.md)
---
## 변경 이력
| 날짜 | 변경 내용 | 작성자 |
|------|----------|--------|
| 2025-12-20 | 초기 마스터 플랜 작성 | Claude |

View File

@@ -0,0 +1,150 @@
# API Integration Progress
> **마지막 업데이트**: 2025-12-20
> **현재 세션**: #1
---
## 🎯 현재 상태 (세션 복구 시 여기부터)
| 항목 | 값 |
|------|-----|
| **현재 Phase** | Phase 4 진행 중 |
| **현재 작업** | 각 API 실제 호출 검증 |
| **진행률** | 55% |
| **다음 액션** | POST /v1/pricing 오류 확인 및 수정 |
| **완료 기준** | ⚠️ 소스 존재가 아닌 **실제 API 호출 검증** |
---
## 📋 Phase 체크리스트
### Phase 0: 사전 분석 [✅ 완료]
- [x] API 프로젝트 구조 분석
- [x] React 프로젝트 구조 분석
- [x] 테이블 통합 현황 확인
- [x] 문서 구조 생성
- [x] MASTER_PLAN.md 작성
### Phase 1: 테이블 통합 [✅ 이미 완료됨 - 스킵]
> items 테이블 통합 2025-12-13에 완료됨
- [x] products/materials → items 마이그레이션
- [x] ItemsController 통합
- [x] ItemService 통합
- [x] BOM 관리 통합
### Phase 2: 메뉴 추출 [✅ 완료]
- [x] React 라우트 목록 추출 (107개 페이지)
- [x] 메뉴 구조 정리 (11개 대메뉴, 54개 중메뉴)
- [x] mng 등록용 포맷 생성 (JSON 포맷)
- [x] 권한 매핑 (52개 세부 권한)
### Phase 3: API 매핑 [✅ 완료]
- [x] React 페이지별 API 분석 (109 페이지)
- [x] 매핑 매트릭스 작성 (`mapping-matrix.md`)
- [x] Gap 분석 (`gap-analysis.md`)
- [x] API 엔드포인트 목록 (`api-endpoints-list.md`)
### Phase 4: 연동 작업 [⏳ 진행 중]
> ⚠️ **완료 기준**: 소스 존재가 아닌 **실제 API 호출 검증 후** 체크
- [ ] 인증/메뉴 - 실제 API 호출 검증
- [ ] 품목 관리 - 실제 API 호출 검증
- [ ] 거래처/판매 - 실제 API 호출 검증 (POST /v1/pricing 오류 확인 필요)
- [ ] 인사/재무 - 실제 API 호출 검증
- [ ] 기타 기능 - 실제 API 호출 검증
### Phase 5: 최종 검증 [⏳ 대기]
- [ ] 전체 기능 테스트
- [ ] 최종 리포트 작성
---
## 📊 분석 결과 요약
### API 현황
| 항목 | 값 |
|------|-----|
| 총 엔드포인트 | ~325개 |
| 주요 도메인 | 8개 |
| Swagger 문서 | 69개 파일 |
| 인증 방식 | API Key + Bearer Token |
### React 현황
| 항목 | 값 |
|------|-----|
| 프레임워크 | Next.js 15.5.7 |
| 라우트 그룹 | 15개+ |
| API 클라이언트 | Native Fetch |
| 인증 | HttpOnly Cookie |
### 주요 발견사항
1. **items 통합 완료**: Phase 1 스킵 가능
2. **대부분 Mock 데이터**: 87.2%가 generateMockData() 사용
3. **프록시 패턴 사용**: `/api/proxy/*` → PHP `/api/v1/*`
4. **API 연동 완료**: Items, Master Data, Clients, Pricing (7.3%)
5. **권한 관리 이슈**: localStorage 사용 중 (API 전환 필요)
---
## 🚨 중단 시 복구 가이드
### 1. 상태 확인
```
serena.list_memories()
serena.read_memory("api-integration-state")
```
### 2. 문서 확인
1. 이 문서의 "현재 상태" 섹션
2. 해당 Phase 디렉토리의 README.md
3. "다음 액션"부터 재개
### 3. 작업 재개
- Phase 2: `phase-2-menu-extraction/README.md`
- Phase 3: `phase-3-api-mapping/README.md`
- Phase 4: `phase-4-integration/README.md`
---
## 📝 세션 히스토리
| 세션 | 날짜 | 완료 작업 | 비고 |
|------|------|----------|------|
| #1 | 2025-12-20 | Phase 0 완료, 문서 구조 생성, 분석 완료 | 초기 세션 |
| #2 | 2025-12-20 | Phase 3 완료, API 매핑 분석, Gap 분석 | 109 페이지 분석 |
| #3 | 2025-12-20 | Phase 2 완료, 메뉴 추출, 권한 매핑 | 11개 대메뉴, 54개 중메뉴, 52개 권한 |
---
## 🔍 다음 세션 시작 시
1. **Serena 메모리 로드**
```
serena.read_memory("api-integration-state")
```
2. **이 문서의 "현재 상태" 확인**
3. **"다음 액션" 실행**
---
## 📌 중요 결정 사항
| 날짜 | 결정 | 근거 |
|------|------|------|
| 2025-12-20 | Phase 1 스킵 | items 통합 이미 완료됨 (2025-12-13) |
| 2025-12-20 | React 기준 연동 | 화면 요구사항 우선 |
| 2025-12-20 | 프록시 패턴 유지 | HttpOnly 쿠키 보안 |
---
## ⚠️ 블로커/이슈
현재 블로커 없음.
---
*이 문서는 작업 진행에 따라 지속 업데이트됩니다.*

View File

@@ -0,0 +1,260 @@
# API Integration Workflow
> 작업 프로세스 정의 및 간소화 가이드
---
## 1. 작업 유형별 프로세스
### 1.1 단일 작업 (code-workflow 5단계)
**적용**: 1-2개 파일 수정, 중요 변경
```
분석 → 수정 → 검증 → 정리 → 커밋
```
1. **분석**: 변경 대상 파일 확인, 영향 범위 파악
2. **수정**: 코드 변경 실행
3. **검증**: 린트, 타입체크, 테스트
4. **정리**: 코드 정리, 임시 파일 제거
5. **커밋**: 변경사항 커밋 (승인 후)
### 1.2 배치 작업 (간소화 프로세스)
**적용**: 여러 파일 유사 수정, 대량 작업
```
배치 분석 → 배치 계획 승인 → 순차 수정 → 전체 검증 → 배치 커밋
```
1. **배치 분석**: 여러 파일 한번에 분석
2. **배치 계획 승인**: 전체 계획 한번만 승인
3. **순차 수정**: 개별 파일 수정 (개별 승인 생략)
4. **전체 검증**: 모든 수정 완료 후 검증
5. **배치 커밋**: 기능 단위로 커밋
### 1.3 반복 작업 (템플릿 프로세스)
**적용**: 동일 패턴 다수 적용
```
패턴 정의 → 승인 → 일괄 적용 → 검증 → 커밋
```
1. **패턴 정의**: 변경 패턴 정의 (예: API URL 교체)
2. **승인**: 패턴 적용 승인
3. **일괄 적용**: 모든 대상에 패턴 적용
4. **검증**: 결과 확인
5. **커밋**: 변경사항 커밋
---
## 2. 승인 필요 지점
### 반드시 승인 필요
| 작업 | 승인 시점 |
|------|----------|
| 파일 생성/삭제 | 작업 전 |
| API 엔드포인트 수정 | 계획 단계 |
| 테이블 구조 변경 | 계획 단계 |
| 커밋 | 커밋 직전 |
### 승인 생략 가능
| 작업 | 조건 |
|------|------|
| 배치 수정 내 개별 파일 | 배치 계획 승인 후 |
| 문서 업데이트 | PROGRESS.md, 로그 등 |
| 린트/포맷팅 | 자동 수정 |
---
## 3. 세션 라이프사이클
### 세션 시작
```bash
# 1. Serena 메모리 확인
serena.list_memories()
serena.read_memory("api-integration-state")
# 2. PROGRESS.md 확인
# 3. "다음 액션"부터 재개
```
### 작업 중
```bash
# 마일스톤마다 업데이트
- PROGRESS.md 체크리스트 업데이트
- 중요 결정사항 기록
- serena.write_memory() (선택)
```
### 세션 종료 전
```bash
# 1. PROGRESS.md 최종 업데이트
# 2. Serena 메모리 저장
serena.write_memory("api-integration-state", {
current_phase: "phase-3",
current_task: "매핑 매트릭스 작성",
next_action: "거래처 API 매핑",
last_updated: "2025-12-20 15:30"
})
# 3. /clear 또는 세션 종료
```
---
## 4. 연동 작업 상세 프로세스
### 4.1 API 매핑 작업
```
1. React 페이지 확인
└── 어떤 데이터가 필요한지 파악
2. API 엔드포인트 검색
└── 기존 API 중 맞는 것 찾기
3. 매핑 결정
├── 완벽 일치 → 바로 연동
├── 부분 일치 → API 수정 필요
└── 없음 → 신규 개발 필요
4. 문서화
└── mapping-matrix.md 업데이트
```
### 4.2 연동 작업
```
1. React 코드 확인
└── API 호출 위치, 데이터 구조
2. API 응답 확인
└── Swagger 또는 실제 호출
3. 불일치 해결
├── React 수정 (API 구조가 맞는 경우)
└── API 수정 (React 요구사항 우선)
4. 테스트
└── 화면에서 동작 확인
5. 로깅
└── integration-log.md 업데이트
```
---
## 5. 이슈 처리 프로세스
### 이슈 발견 시
```
1. 이슈 문서 생성
└── phase-4-integration/issues/ISSUE-XXX.md
2. 이슈 분류
├── 🔴 Critical: 기능 작동 불가
├── 🟡 Major: 기능 일부 제한
└── 🟢 Minor: 개선 사항
3. 해결 및 기록
└── 해결 방법, 변경 파일 기록
```
### 이슈 문서 템플릿
```markdown
# ISSUE-XXX: [이슈 제목]
## 상태: 🔴 Open / 🟢 Resolved
## 설명
[이슈 상세 설명]
## 재현 방법
1. ...
2. ...
## 원인
[원인 분석]
## 해결 방법
[해결 방법]
## 변경 파일
- [ ] file1.ts
- [ ] file2.php
```
---
## 6. 커밋 메시지 규칙
### 형식
```
[프로젝트] 타입: 제목
본문 (선택)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
```
### 타입
| 타입 | 설명 |
|------|------|
| feat | 새 기능 |
| fix | 버그 수정 |
| refactor | 리팩토링 |
| docs | 문서 |
| chore | 기타 |
### 예시
```
[API] feat: items API 응답에 category 정보 추가
- ItemService에서 category eager loading
- ItemResource에 category 필드 추가
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
```
---
## 7. 도구 활용
### MCP 서버
| 서버 | 용도 |
|------|------|
| Sequential Thinking | 복잡한 분석, 설계 |
| Serena | 메모리, 심볼 검색 |
| Context7 | 공식 문서 참조 |
### SuperClaude 페르소나
| 페르소나 | 용도 |
|----------|------|
| backend-architect | API 설계, 구현 |
| frontend-architect | React 구조 |
| quality-engineer | 테스트, 검증 |
---
## 8. 체크리스트
### 작업 시작 전
- [ ] PROGRESS.md 확인
- [ ] 현재 Phase 파악
- [ ] 다음 액션 확인
### 작업 중
- [ ] 체크리스트 업데이트
- [ ] 이슈 발생 시 문서화
- [ ] 변경사항 로깅
### 작업 완료 후
- [ ] PROGRESS.md 업데이트
- [ ] Serena 메모리 저장
- [ ] 커밋 (승인 후)
---
*이 문서는 작업 효율성을 위해 필요 시 업데이트됩니다.*

View File

@@ -0,0 +1,68 @@
# Phase 1: 테이블 통합
> **상태**: ✅ 완료 (2025-12-13 작업)
> **스킵 가능**: 이미 완료된 작업
---
## 개요
products/materials 테이블이 items 테이블로 통합 완료됨.
## 완료된 작업
### 테이블 통합
- [x] products + materials → items 단일 테이블
- [x] item_type으로 구분 (FG/PT/SM/RM/CS)
- [x] item_details 확장 테이블 (1:1)
### 마이그레이션
- [x] 2025_12_13_152507_create_items_table.php
- [x] 2025_12_11_220200_migrate_products_materials_to_items.php
- [x] BOM 데이터 마이그레이션
### 코드 통합
- [x] ItemsController
- [x] ItemService
- [x] ItemsBomController
- [x] Item, ItemDetail 모델
## Item Type 분류
| Type | 명칭 | 설명 |
|------|------|------|
| FG | Finished Goods | 완제품 |
| PT | Parts | 부품 |
| SM | Semi-finished Materials | 부자재 |
| RM | Raw Materials | 원자재 |
| CS | Consumables/Supplies | 소모품 |
## 그룹 분류
```php
PRODUCT_TYPES = ['FG', 'PT'] // 제품군
MATERIAL_TYPES = ['SM', 'RM', 'CS'] // 자재군
```
## API 엔드포인트
| Method | Path | 설명 |
|--------|------|------|
| GET | /items | 품목 목록 |
| POST | /items | 품목 생성 |
| GET | /items/{id} | 품목 상세 |
| PUT | /items/{id} | 품목 수정 |
| DELETE | /items/{id} | 품목 삭제 |
| GET | /items/{id}/bom | BOM 목록 |
| GET | /items/{id}/bom/tree | BOM 트리 |
## 참조 파일
- `api/app/Models/Items/Item.php`
- `api/app/Models/Items/ItemDetail.php`
- `api/app/Services/ItemService.php`
- `api/app/Http/Controllers/Api/V1/ItemsController.php`
---
*이 Phase는 스킵합니다. Phase 2로 진행하세요.*

View File

@@ -0,0 +1,78 @@
# Phase 2: React 라우터 → 메뉴 추출
> **상태**: ✅ 완료
> **완료일**: 2025-12-20
> **병행 작업**: Phase 3과 병행 가능
---
## 목표
React 라우트 기반으로 mng에 등록할 메뉴 목록 추출
## 체크리스트
- [x] React 전체 라우트 목록 추출
- [x] 메뉴 구조 정리 (계층, 이름, URL)
- [x] 접근 권한 매핑
- [x] mng 등록용 포맷 생성
- [ ] 메뉴 등록 (mng에서) → Phase 4에서 진행
## React 라우트 구조
```
react/src/app/
├── [locale]/
│ ├── page.tsx # 루트 (→ dashboard 리다이렉트)
│ ├── login/page.tsx # 로그인
│ └── (protected)/ # 인증 필요
│ ├── dashboard/ # 대시보드
│ ├── items/ # 품목 관리
│ ├── accounting/ # 회계
│ ├── sales/ # 영업
│ ├── hr/ # 인사
│ ├── board/ # 게시판
│ ├── settings/ # 설정
│ └── ...
```
## 메뉴 추출 포맷
| 메뉴명 | URL | 부모 | 순서 | 아이콘 | 권한 |
|--------|-----|------|------|--------|------|
| 대시보드 | /dashboard | - | 1 | dashboard | all |
| 품목관리 | /items | - | 2 | box | items.view |
| ... | ... | ... | ... | ... | ... |
## 산출물
- [x] `react-routes-analysis.md` - 라우트 상세 분석 (107개 페이지, 15개 도메인)
- [x] `menu-list.md` - 최종 메뉴 리스트 (11개 대메뉴, 54개 중메뉴, 52개 권한)
## 작업 순서
1. React 라우터 파일 전체 스캔
2. 페이지별 메타 정보 수집
3. 메뉴 계층 구조 설계
4. 권한 매핑 정의
5. mng 등록용 SQL/JSON 생성
---
## 참고: 현재 메뉴 로드 방식
```typescript
// 로그인 시 API에서 메뉴 로드
POST /api/v1/login
Response: {
user: {...},
menus: [...], // 권한 기반 메뉴
roles: [...]
}
```
메뉴가 등록되지 않으면 해당 라우트 접근 불가.
---
*Phase 2 작업 시작 시 이 체크리스트를 업데이트하세요.*

View File

@@ -0,0 +1,383 @@
# Menu List - React 기반 최종 메뉴 구조
> **생성일**: 2025-12-20
> **기준**: React 라우트 기반 (React-First)
---
## 1. 메뉴 계층 구조
### 1.1 대시보드
| ID | 메뉴명 | URL | 아이콘 | 부모 | 순서 | 권한 |
|----|--------|-----|--------|------|------|------|
| 1 | 대시보드 | /dashboard | layout-dashboard | - | 1 | all |
### 1.2 결재관리 (신규)
| ID | 메뉴명 | URL | 아이콘 | 부모 | 순서 | 권한 |
|----|--------|-----|--------|------|------|------|
| 100 | 결재관리 | /approval | file-check | - | 2 | approval.view |
| 101 | 기안함 | /approval/draft | file-edit | 100 | 1 | approval.draft |
| 102 | 결재함 | /approval/inbox | inbox | 100 | 2 | approval.approve |
| 103 | 참조함 | /approval/reference | eye | 100 | 3 | approval.view |
### 1.3 게시판 (신규)
| ID | 메뉴명 | URL | 아이콘 | 부모 | 순서 | 권한 |
|----|--------|-----|--------|------|------|------|
| 200 | 게시판 | /board | layout-list | - | 3 | board.view |
| 201 | 게시판 관리 | /board/board-management | settings | 200 | 1 | board.manage |
### 1.4 품목관리
| ID | 메뉴명 | URL | 아이콘 | 부모 | 순서 | 권한 |
|----|--------|-----|--------|------|------|------|
| 300 | 품목관리 | /items | package | - | 4 | items.view |
| 301 | 품목기준관리 | /master-data/item-master-data-management | database | 300 | 1 | items.master |
### 1.5 판매관리
| ID | 메뉴명 | URL | 아이콘 | 부모 | 순서 | 권한 |
|----|--------|-----|--------|------|------|------|
| 400 | 판매관리 | /sales | briefcase | - | 5 | sales.view |
| 401 | 거래처관리 | /sales/client-management-sales-admin | building-2 | 400 | 1 | sales.clients |
| 402 | 견적관리 | /sales/quote-management | calculator | 400 | 2 | sales.quotes |
| 403 | 단가관리 | /sales/pricing-management | dollar-sign | 400 | 3 | sales.pricing |
### 1.6 생산관리
| ID | 메뉴명 | URL | 아이콘 | 부모 | 순서 | 권한 |
|----|--------|-----|--------|------|------|------|
| 500 | 생산관리 | /production | factory | - | 6 | production.view |
| 501 | 스크린 생산 | /production/screen-production | package | 500 | 1 | production.screen |
### 1.7 회계관리
| ID | 메뉴명 | URL | 아이콘 | 부모 | 순서 | 권한 |
|----|--------|-----|--------|------|------|------|
| 600 | 회계관리 | /accounting | calculator | - | 7 | accounting.view |
| 601 | 거래처관리 | /accounting/vendors | building-2 | 600 | 1 | accounting.vendors |
| 602 | 거래처원장 | /accounting/vendor-ledger | file-text | 600 | 2 | accounting.ledger |
| 603 | 매출관리 | /accounting/sales | trending-up | 600 | 3 | accounting.sales |
| 604 | 매입관리 | /accounting/purchase | trending-down | 600 | 4 | accounting.purchase |
| 605 | 세금계산서 | /accounting/bills | receipt | 600 | 5 | accounting.bills |
| 606 | 입금관리 | /accounting/deposits | arrow-down-circle | 600 | 6 | accounting.deposits |
| 607 | 출금관리 | /accounting/withdrawals | arrow-up-circle | 600 | 7 | accounting.withdrawals |
| 608 | 은행거래 | /accounting/bank-transactions | landmark | 600 | 8 | accounting.bank |
| 609 | 카드거래 | /accounting/card-transactions | credit-card | 600 | 9 | accounting.card |
| 610 | 미수금현황 | /accounting/receivables-status | alert-circle | 600 | 10 | accounting.receivables |
| 611 | 예상비용 | /accounting/expected-expenses | clock | 600 | 11 | accounting.expenses |
| 612 | 대손채권회수 | /accounting/bad-debt-collection | shield | 600 | 12 | accounting.baddebt |
| 613 | 일일리포트 | /accounting/daily-report | file-bar-chart | 600 | 13 | accounting.report |
| 614 | 결제내역 | /payment-history | history | 600 | 14 | accounting.payment |
### 1.8 인사관리 (신규)
| ID | 메뉴명 | URL | 아이콘 | 부모 | 순서 | 권한 |
|----|--------|-----|--------|------|------|------|
| 700 | 인사관리 | /hr | users | - | 8 | hr.view |
| 701 | 직원관리 | /hr/employee-management | user | 700 | 1 | hr.employees |
| 702 | 부서관리 | /hr/department-management | building | 700 | 2 | hr.departments |
| 703 | 카드관리 | /hr/card-management | credit-card | 700 | 3 | hr.cards |
| 704 | 근태현황 | /hr/attendance | clock | 700 | 4 | hr.attendance.view |
| 705 | 근태관리 | /hr/attendance-management | calendar-check | 700 | 5 | hr.attendance.manage |
| 706 | 급여관리 | /hr/salary-management | dollar-sign | 700 | 6 | hr.salary |
| 707 | 휴가관리 | /hr/vacation-management | calendar | 700 | 7 | hr.vacation |
### 1.9 리포트 (신규)
| ID | 메뉴명 | URL | 아이콘 | 부모 | 순서 | 권한 |
|----|--------|-----|--------|------|------|------|
| 800 | 리포트 | /reports | bar-chart-3 | - | 9 | reports.view |
| 801 | 종합분석 | /reports/comprehensive-analysis | pie-chart | 800 | 1 | reports.analysis |
### 1.10 고객센터 (신규)
| ID | 메뉴명 | URL | 아이콘 | 부모 | 순서 | 권한 |
|----|--------|-----|--------|------|------|------|
| 900 | 고객센터 | /customer-center | headphones | - | 10 | customer.view |
| 901 | 공지사항 | /customer-center/notices | megaphone | 900 | 1 | customer.notices |
| 902 | FAQ | /customer-center/faq | help-circle | 900 | 2 | customer.faq |
| 903 | 문의하기 | /customer-center/inquiries | message-circle | 900 | 3 | customer.inquiries |
| 904 | 이벤트 | /customer-center/events | calendar-star | 900 | 4 | customer.events |
### 1.11 설정 (신규)
| ID | 메뉴명 | URL | 아이콘 | 부모 | 순서 | 권한 |
|----|--------|-----|--------|------|------|------|
| 1000 | 설정 | /settings | settings | - | 11 | settings.view |
| 1001 | 계정정보 | /settings/account-info | user | 1000 | 1 | settings.account |
| 1002 | 계정관리 | /settings/accounts | users | 1000 | 2 | settings.accounts |
| 1003 | 권한관리 | /settings/permissions | shield | 1000 | 3 | settings.permissions |
| 1004 | 직급관리 | /settings/ranks | award | 1000 | 4 | settings.ranks |
| 1005 | 직책관리 | /settings/titles | badge | 1000 | 5 | settings.titles |
| 1006 | 근태설정 | /settings/attendance-settings | clock | 1000 | 6 | settings.attendance |
| 1007 | 휴가정책 | /settings/leave-policy | calendar | 1000 | 7 | settings.leave |
| 1008 | 근무일정 | /settings/work-schedule | calendar-days | 1000 | 8 | settings.schedule |
| 1009 | 알림설정 | /settings/notification-settings | bell | 1000 | 9 | settings.notifications |
| 1010 | 팝업관리 | /settings/popup-management | layout | 1000 | 10 | settings.popups |
| 1011 | 회사정보 | /company-info | building | 1000 | 11 | settings.company |
| 1012 | 구독관리 | /subscription | credit-card | 1000 | 12 | settings.subscription |
---
## 2. 권한 매핑 정의
### 2.1 권한 그룹
| 권한 그룹 | 설명 | 기본 권한 |
|-----------|------|----------|
| all | 모든 사용자 | 로그인 사용자 |
| approval.* | 결재 관련 | 결재 담당자 |
| board.* | 게시판 관련 | 일반 사용자 |
| items.* | 품목 관련 | 생산/구매 담당 |
| sales.* | 판매 관련 | 영업 담당 |
| production.* | 생산 관련 | 생산 담당 |
| accounting.* | 회계 관련 | 경리 담당 |
| hr.* | 인사 관련 | 인사 담당 |
| reports.* | 리포트 관련 | 관리자 |
| customer.* | 고객센터 관련 | 일반 사용자 |
| settings.* | 설정 관련 | 관리자 |
### 2.2 세부 권한
```
approval.view - 결재 조회
approval.draft - 기안 작성
approval.approve - 결재 승인
board.view - 게시판 조회
board.write - 게시글 작성
board.manage - 게시판 관리
items.view - 품목 조회
items.create - 품목 등록
items.edit - 품목 수정
items.delete - 품목 삭제
items.master - 품목기준 관리
sales.view - 판매 조회
sales.clients - 거래처 관리
sales.quotes - 견적 관리
sales.pricing - 단가 관리
production.view - 생산 조회
production.screen - 스크린 생산
accounting.view - 회계 조회
accounting.vendors - 거래처 관리
accounting.ledger - 거래처원장
accounting.sales - 매출 관리
accounting.purchase - 매입 관리
accounting.bills - 세금계산서
accounting.deposits - 입금 관리
accounting.withdrawals - 출금 관리
accounting.bank - 은행거래
accounting.card - 카드거래
accounting.receivables - 미수금
accounting.expenses - 예상비용
accounting.baddebt - 대손채권
accounting.report - 일일리포트
accounting.payment - 결제내역
hr.view - 인사 조회
hr.employees - 직원 관리
hr.departments - 부서 관리
hr.cards - 카드 관리
hr.attendance.view - 근태 조회
hr.attendance.manage - 근태 관리
hr.salary - 급여 관리
hr.vacation - 휴가 관리
reports.view - 리포트 조회
reports.analysis - 종합분석
customer.view - 고객센터 조회
customer.notices - 공지사항
customer.faq - FAQ
customer.inquiries - 문의
customer.events - 이벤트
settings.view - 설정 조회
settings.account - 계정정보
settings.accounts - 계정관리
settings.permissions - 권한관리
settings.ranks - 직급관리
settings.titles - 직책관리
settings.attendance - 근태설정
settings.leave - 휴가정책
settings.schedule - 근무일정
settings.notifications - 알림설정
settings.popups - 팝업관리
settings.company - 회사정보
settings.subscription - 구독관리
```
---
## 3. mng 등록용 JSON
```json
[
{
"name": "대시보드",
"url": "/dashboard",
"icon": "layout-dashboard",
"sort_order": 1,
"children": []
},
{
"name": "결재관리",
"url": "/approval",
"icon": "file-check",
"sort_order": 2,
"children": [
{"name": "기안함", "url": "/approval/draft", "icon": "file-edit", "sort_order": 1},
{"name": "결재함", "url": "/approval/inbox", "icon": "inbox", "sort_order": 2},
{"name": "참조함", "url": "/approval/reference", "icon": "eye", "sort_order": 3}
]
},
{
"name": "게시판",
"url": "/board",
"icon": "layout-list",
"sort_order": 3,
"children": [
{"name": "게시판 관리", "url": "/board/board-management", "icon": "settings", "sort_order": 1}
]
},
{
"name": "품목관리",
"url": "/items",
"icon": "package",
"sort_order": 4,
"children": [
{"name": "품목기준관리", "url": "/master-data/item-master-data-management", "icon": "database", "sort_order": 1}
]
},
{
"name": "판매관리",
"url": "/sales",
"icon": "briefcase",
"sort_order": 5,
"children": [
{"name": "거래처관리", "url": "/sales/client-management-sales-admin", "icon": "building-2", "sort_order": 1},
{"name": "견적관리", "url": "/sales/quote-management", "icon": "calculator", "sort_order": 2},
{"name": "단가관리", "url": "/sales/pricing-management", "icon": "dollar-sign", "sort_order": 3}
]
},
{
"name": "생산관리",
"url": "/production",
"icon": "factory",
"sort_order": 6,
"children": [
{"name": "스크린 생산", "url": "/production/screen-production", "icon": "package", "sort_order": 1}
]
},
{
"name": "회계관리",
"url": "/accounting",
"icon": "calculator",
"sort_order": 7,
"children": [
{"name": "거래처관리", "url": "/accounting/vendors", "icon": "building-2", "sort_order": 1},
{"name": "거래처원장", "url": "/accounting/vendor-ledger", "icon": "file-text", "sort_order": 2},
{"name": "매출관리", "url": "/accounting/sales", "icon": "trending-up", "sort_order": 3},
{"name": "매입관리", "url": "/accounting/purchase", "icon": "trending-down", "sort_order": 4},
{"name": "세금계산서", "url": "/accounting/bills", "icon": "receipt", "sort_order": 5},
{"name": "입금관리", "url": "/accounting/deposits", "icon": "arrow-down-circle", "sort_order": 6},
{"name": "출금관리", "url": "/accounting/withdrawals", "icon": "arrow-up-circle", "sort_order": 7},
{"name": "은행거래", "url": "/accounting/bank-transactions", "icon": "landmark", "sort_order": 8},
{"name": "카드거래", "url": "/accounting/card-transactions", "icon": "credit-card", "sort_order": 9},
{"name": "미수금현황", "url": "/accounting/receivables-status", "icon": "alert-circle", "sort_order": 10},
{"name": "예상비용", "url": "/accounting/expected-expenses", "icon": "clock", "sort_order": 11},
{"name": "대손채권회수", "url": "/accounting/bad-debt-collection", "icon": "shield", "sort_order": 12},
{"name": "일일리포트", "url": "/accounting/daily-report", "icon": "file-bar-chart", "sort_order": 13},
{"name": "결제내역", "url": "/payment-history", "icon": "history", "sort_order": 14}
]
},
{
"name": "인사관리",
"url": "/hr",
"icon": "users",
"sort_order": 8,
"children": [
{"name": "직원관리", "url": "/hr/employee-management", "icon": "user", "sort_order": 1},
{"name": "부서관리", "url": "/hr/department-management", "icon": "building", "sort_order": 2},
{"name": "카드관리", "url": "/hr/card-management", "icon": "credit-card", "sort_order": 3},
{"name": "근태현황", "url": "/hr/attendance", "icon": "clock", "sort_order": 4},
{"name": "근태관리", "url": "/hr/attendance-management", "icon": "calendar-check", "sort_order": 5},
{"name": "급여관리", "url": "/hr/salary-management", "icon": "dollar-sign", "sort_order": 6},
{"name": "휴가관리", "url": "/hr/vacation-management", "icon": "calendar", "sort_order": 7}
]
},
{
"name": "리포트",
"url": "/reports",
"icon": "bar-chart-3",
"sort_order": 9,
"children": [
{"name": "종합분석", "url": "/reports/comprehensive-analysis", "icon": "pie-chart", "sort_order": 1}
]
},
{
"name": "고객센터",
"url": "/customer-center",
"icon": "headphones",
"sort_order": 10,
"children": [
{"name": "공지사항", "url": "/customer-center/notices", "icon": "megaphone", "sort_order": 1},
{"name": "FAQ", "url": "/customer-center/faq", "icon": "help-circle", "sort_order": 2},
{"name": "문의하기", "url": "/customer-center/inquiries", "icon": "message-circle", "sort_order": 3},
{"name": "이벤트", "url": "/customer-center/events", "icon": "calendar", "sort_order": 4}
]
},
{
"name": "설정",
"url": "/settings",
"icon": "settings",
"sort_order": 11,
"children": [
{"name": "계정정보", "url": "/settings/account-info", "icon": "user", "sort_order": 1},
{"name": "계정관리", "url": "/settings/accounts", "icon": "users", "sort_order": 2},
{"name": "권한관리", "url": "/settings/permissions", "icon": "shield", "sort_order": 3},
{"name": "직급관리", "url": "/settings/ranks", "icon": "award", "sort_order": 4},
{"name": "직책관리", "url": "/settings/titles", "icon": "badge", "sort_order": 5},
{"name": "근태설정", "url": "/settings/attendance-settings", "icon": "clock", "sort_order": 6},
{"name": "휴가정책", "url": "/settings/leave-policy", "icon": "calendar", "sort_order": 7},
{"name": "근무일정", "url": "/settings/work-schedule", "icon": "calendar-days", "sort_order": 8},
{"name": "알림설정", "url": "/settings/notification-settings", "icon": "bell", "sort_order": 9},
{"name": "팝업관리", "url": "/settings/popup-management", "icon": "layout", "sort_order": 10},
{"name": "회사정보", "url": "/company-info", "icon": "building", "sort_order": 11},
{"name": "구독관리", "url": "/subscription", "icon": "credit-card", "sort_order": 12}
]
}
]
```
---
## 4. 통계 요약
| 항목 | 값 |
|------|-----|
| 대메뉴 | 11개 |
| 중메뉴 | 54개 |
| 총 메뉴 | 65개 |
| 권한 그룹 | 11개 |
| 세부 권한 | 52개 |
---
## 5. 다음 단계
1. **GlobalMenuTemplateSeeder 업데이트**: JSON 데이터로 seeder 작성
2. **권한 테이블 업데이트**: permissions 테이블에 새 권한 추가
3. **React menuTransform.ts 업데이트**: 새 아이콘 매핑 추가
4. **테스트**: 메뉴 렌더링 및 권한 검증
---
*이 문서는 Phase 2 최종 산출물입니다.*

View File

@@ -0,0 +1,300 @@
# React Routes Analysis
> **생성일**: 2025-12-20
> **분석 대상**: react/src/app/[locale]/
---
## 1. 라우트 구조 개요
### 1.1 전체 통계
| 항목 | 값 |
|------|-----|
| 총 페이지 수 | 107개 |
| 인증 필요 페이지 | 104개 ((protected) 그룹) |
| 공개 페이지 | 3개 (login, signup, root) |
| 주요 도메인 | 15개 |
### 1.2 라우트 그룹 분류
```
react/src/app/[locale]/
├── page.tsx # 루트 (→ /dashboard 리다이렉트)
├── login/page.tsx # 로그인
├── signup/page.tsx # 회원가입
└── (protected)/ # 인증 필요 영역
├── dashboard/ # 대시보드
├── accounting/ # 회계 (17개 페이지)
├── approval/ # 결재 (4개 페이지)
├── board/ # 게시판 (8개 페이지)
├── company-info/ # 회사정보 (1개 페이지)
├── customer-center/ # 고객센터 (10개 페이지)
├── dev/ # 개발자 (1개 페이지)
├── hr/ # 인사 (15개 페이지)
├── items/ # 품목관리 (4개 페이지)
├── master-data/ # 마스터데이터 (1개 페이지)
├── payment-history/ # 결제내역 (1개 페이지)
├── production/ # 생산 (4개 페이지)
├── reports/ # 리포트 (2개 페이지)
├── sales/ # 영업 (12개 페이지)
├── settings/ # 설정 (17개 페이지)
├── subscription/ # 구독 (1개 페이지)
└── [...slug]/ # 동적 라우트 (Catch-all)
```
---
## 2. 도메인별 라우트 상세
### 2.1 Dashboard (대시보드)
| 라우트 | 설명 | 타입 |
|--------|------|------|
| /dashboard | 대시보드 | 목록 |
### 2.2 Accounting (회계관리)
| 라우트 | 설명 | 타입 |
|--------|------|------|
| /accounting/bad-debt-collection | 대손채권회수 목록 | 목록 |
| /accounting/bad-debt-collection/new | 대손채권회수 등록 | 등록 |
| /accounting/bad-debt-collection/[id] | 대손채권회수 상세 | 상세 |
| /accounting/bad-debt-collection/[id]/edit | 대손채권회수 수정 | 수정 |
| /accounting/bank-transactions | 은행거래 | 목록 |
| /accounting/bills | 세금계산서 목록 | 목록 |
| /accounting/bills/new | 세금계산서 등록 | 등록 |
| /accounting/bills/[id] | 세금계산서 상세 | 상세 |
| /accounting/card-transactions | 카드거래 | 목록 |
| /accounting/daily-report | 일일리포트 | 목록 |
| /accounting/deposits | 입금 목록 | 목록 |
| /accounting/deposits/[id] | 입금 상세 | 상세 |
| /accounting/expected-expenses | 예상비용 | 목록 |
| /accounting/purchase | 매입 목록 | 목록 |
| /accounting/purchase/[id] | 매입 상세 | 상세 |
| /accounting/receivables-status | 미수금현황 | 목록 |
| /accounting/sales | 매출 목록 | 목록 |
| /accounting/sales/new | 매출 등록 | 등록 |
| /accounting/sales/[id] | 매출 상세 | 상세 |
| /accounting/vendor-ledger | 거래처원장 목록 | 목록 |
| /accounting/vendor-ledger/[id] | 거래처원장 상세 | 상세 |
| /accounting/vendors | 거래처 목록 | 목록 |
| /accounting/vendors/new | 거래처 등록 | 등록 |
| /accounting/vendors/[id] | 거래처 상세 | 상세 |
| /accounting/withdrawals | 출금 목록 | 목록 |
| /accounting/withdrawals/[id] | 출금 상세 | 상세 |
### 2.3 Approval (결재)
| 라우트 | 설명 | 타입 |
|--------|------|------|
| /approval/draft | 기안함 | 목록 |
| /approval/draft/new | 기안 작성 | 등록 |
| /approval/inbox | 결재함 | 목록 |
| /approval/reference | 참조함 | 목록 |
### 2.4 Board (게시판)
| 라우트 | 설명 | 타입 |
|--------|------|------|
| /board | 게시판 목록 | 목록 |
| /board/create | 게시글 작성 | 등록 |
| /board/[id] | 게시글 상세 | 상세 |
| /board/[id]/edit | 게시글 수정 | 수정 |
| /board/board-management | 게시판 관리 | 목록 |
| /board/board-management/new | 게시판 생성 | 등록 |
| /board/board-management/[id] | 게시판 설정 상세 | 상세 |
| /board/board-management/[id]/edit | 게시판 설정 수정 | 수정 |
### 2.5 Customer Center (고객센터)
| 라우트 | 설명 | 타입 |
|--------|------|------|
| /customer-center/events | 이벤트 목록 | 목록 |
| /customer-center/events/[id] | 이벤트 상세 | 상세 |
| /customer-center/faq | FAQ | 목록 |
| /customer-center/inquiries | 문의 목록 | 목록 |
| /customer-center/inquiries/create | 문의 등록 | 등록 |
| /customer-center/inquiries/[id] | 문의 상세 | 상세 |
| /customer-center/inquiries/[id]/edit | 문의 수정 | 수정 |
| /customer-center/notices | 공지사항 목록 | 목록 |
| /customer-center/notices/[id] | 공지사항 상세 | 상세 |
### 2.6 HR (인사관리)
| 라우트 | 설명 | 타입 |
|--------|------|------|
| /hr/attendance | 근태현황 | 목록 |
| /hr/attendance-management | 근태관리 | 목록 |
| /hr/card-management | 카드관리 목록 | 목록 |
| /hr/card-management/new | 카드 등록 | 등록 |
| /hr/card-management/[id] | 카드 상세 | 상세 |
| /hr/card-management/[id]/edit | 카드 수정 | 수정 |
| /hr/department-management | 부서관리 | 목록 |
| /hr/employee-management | 직원관리 목록 | 목록 |
| /hr/employee-management/new | 직원 등록 | 등록 |
| /hr/employee-management/csv-upload | CSV 업로드 | 등록 |
| /hr/employee-management/[id] | 직원 상세 | 상세 |
| /hr/employee-management/[id]/edit | 직원 수정 | 수정 |
| /hr/salary-management | 급여관리 | 목록 |
| /hr/vacation-management | 휴가관리 | 목록 |
### 2.7 Items (품목관리)
| 라우트 | 설명 | 타입 |
|--------|------|------|
| /items | 품목 목록 | 목록 |
| /items/create | 품목 등록 | 등록 |
| /items/[id] | 품목 상세 | 상세 |
| /items/[id]/edit | 품목 수정 | 수정 |
### 2.8 Production (생산관리)
| 라우트 | 설명 | 타입 |
|--------|------|------|
| /production/screen-production | 스크린 생산 목록 | 목록 |
| /production/screen-production/create | 스크린 생산 등록 | 등록 |
| /production/screen-production/[id] | 스크린 생산 상세 | 상세 |
| /production/screen-production/[id]/edit | 스크린 생산 수정 | 수정 |
### 2.9 Reports (리포트)
| 라우트 | 설명 | 타입 |
|--------|------|------|
| /reports | 리포트 | 목록 |
| /reports/comprehensive-analysis | 종합분석 | 상세 |
### 2.10 Sales (판매관리)
| 라우트 | 설명 | 타입 |
|--------|------|------|
| /sales/client-management-sales-admin | 거래처관리 목록 | 목록 |
| /sales/client-management-sales-admin/new | 거래처 등록 | 등록 |
| /sales/client-management-sales-admin/[id] | 거래처 상세 | 상세 |
| /sales/client-management-sales-admin/[id]/edit | 거래처 수정 | 수정 |
| /sales/pricing-management | 단가관리 목록 | 목록 |
| /sales/pricing-management/create | 단가 등록 | 등록 |
| /sales/pricing-management/[id]/edit | 단가 수정 | 수정 |
| /sales/quote-management | 견적관리 목록 | 목록 |
| /sales/quote-management/new | 견적 등록 | 등록 |
| /sales/quote-management/[id] | 견적 상세 | 상세 |
| /sales/quote-management/[id]/edit | 견적 수정 | 수정 |
### 2.11 Settings (설정)
| 라우트 | 설명 | 타입 |
|--------|------|------|
| /settings/account-info | 계정정보 | 상세 |
| /settings/accounts | 계정 목록 | 목록 |
| /settings/accounts/new | 계정 등록 | 등록 |
| /settings/accounts/[id] | 계정 상세 | 상세 |
| /settings/attendance-settings | 근태설정 | 상세 |
| /settings/leave-policy | 휴가정책 | 상세 |
| /settings/notification-settings | 알림설정 | 상세 |
| /settings/permissions | 권한관리 목록 | 목록 |
| /settings/permissions/new | 권한 등록 | 등록 |
| /settings/permissions/[id] | 권한 상세 | 상세 |
| /settings/popup-management | 팝업관리 목록 | 목록 |
| /settings/popup-management/new | 팝업 등록 | 등록 |
| /settings/popup-management/[id] | 팝업 상세 | 상세 |
| /settings/popup-management/[id]/edit | 팝업 수정 | 수정 |
| /settings/ranks | 직급관리 | 목록 |
| /settings/titles | 직책관리 | 목록 |
| /settings/work-schedule | 근무일정 | 상세 |
### 2.12 기타
| 라우트 | 설명 | 타입 |
|--------|------|------|
| /company-info | 회사정보 | 상세 |
| /master-data/item-master-data-management | 품목기준관리 | 목록 |
| /payment-history | 결제내역 | 목록 |
| /subscription | 구독관리 | 상세 |
| /dev/test-urls | 개발자 테스트 | 개발 |
---
## 3. 글로벌 메뉴 vs React 라우트 Gap 분석
### 3.1 React에만 존재하는 라우트 (GlobalMenu 등록 필요)
| React 라우트 | 제안 메뉴명 | 부모 메뉴 |
|--------------|------------|----------|
| /approval/* | 결재관리 | 신규 대메뉴 |
| /board/* | 게시판 | 신규 대메뉴 |
| /customer-center/* | 고객센터 | 신규 대메뉴 |
| /hr/* | 인사관리 | 신규 대메뉴 |
| /items/* | 품목관리 | 기준정보 관리 |
| /settings/* | 설정 | 신규 대메뉴 |
| /subscription | 구독관리 | 설정 |
| /company-info | 회사정보 | 설정 |
| /payment-history | 결제내역 | 회계관리 |
| /reports/* | 리포트 | 신규 대메뉴 |
### 3.2 GlobalMenu에만 존재 (React 미구현)
| 글로벌 메뉴 | URL | 상태 |
|-------------|-----|------|
| 리드관리 | /sales-dept/sales-leads | React 미구현 |
| 매출처관리 | /sales-dept/customer-account-management | React 미구현 |
| 영업실적 | /sales-dept/sales-performance | React 미구현 |
| 수주관리 | /sales/order-management-sales | React 미구현 |
| 현장관리 | /sales/site-management | React 미구현 |
| 구매관리 전체 | /purchase/* | React 미구현 |
| 품질관리 전체 | /quality/* | React 미구현 |
| 자재관리 전체 | /material/* | React 미구현 |
| 장비관리 전체 | /equipment/* | React 미구현 |
| 차량관리 전체 | /vehicle/* | React 미구현 |
### 3.3 URL 불일치 (수정 필요)
| React 라우트 | GlobalMenu URL | 제안 |
|--------------|----------------|------|
| /accounting/vendors | /accounting/client-management | React 기준 사용 |
| /accounting/sales | /accounting/sales-accounting | React 기준 사용 |
| /accounting/purchase | /accounting/purchase-accounting | React 기준 사용 |
| /hr/employee-management | /master-data/employee-management | React 기준 사용 |
| /hr/department-management | /master-data/department-management | React 기준 사용 |
---
## 4. 메뉴 재구조화 제안
### 4.1 신규 대메뉴 구조
```
1. 대시보드 (dashboard)
2. 결재관리 (approval) - 신규
3. 게시판 (board) - 신규
4. 품목관리 (items) - 기존 master-data에서 분리
5. 판매관리 (sales)
6. 생산관리 (production)
7. 회계관리 (accounting)
8. 인사관리 (hr) - 신규
9. 리포트 (reports) - 신규
10. 고객센터 (customer-center) - 신규
11. 설정 (settings) - 신규
```
### 4.2 아이콘 매핑
| 메뉴 | Lucide 아이콘 |
|------|---------------|
| 결재관리 | file-check |
| 게시판 | layout-list |
| 인사관리 | users |
| 리포트 | bar-chart-3 |
| 고객센터 | headphones |
| 설정 | settings |
---
## 5. 다음 단계
1. **menu-list.md 작성**: 최종 메뉴 리스트 정리
2. **mng 등록**: GlobalMenu seeder 업데이트
3. **권한 매핑**: 각 메뉴별 필요 권한 정의
---
*이 문서는 Phase 2 분석 결과입니다.*

View File

@@ -0,0 +1,88 @@
# Phase 3: React ↔ API 매핑 분석
> **상태**: ✅ 완료
> **완료일**: 2025-12-20
> **선행 조건**: Phase 2와 병행 가능
---
## 목표
React 페이지별 필요 API 식별 및 매핑 분석
## 체크리스트
- [x] React 페이지별 API 호출 분석
- [x] 기존 API 엔드포인트 매핑
- [x] Gap 분석 (신규/수정 필요 API)
- [x] 중복/유사 API 정리
- [x] 매핑 매트릭스 완성
## 분석 대상
### 핵심 페이지
| 페이지 | 경로 | 예상 API |
|--------|------|----------|
| 대시보드 | /dashboard | /dashboard/* |
| 품목 목록 | /items | /items |
| 품목 상세 | /items/[id] | /items/{id}, /items/{id}/bom |
| 품목 생성 | /items/create | POST /items |
### 회계 모듈
| 페이지 | 경로 | 예상 API |
|--------|------|----------|
| 매출 목록 | /accounting/sales | /sales |
| 매입 목록 | /accounting/purchase | /purchases |
| 거래처 | /accounting/vendors | /clients |
### 영업 모듈
| 페이지 | 경로 | 예상 API |
|--------|------|----------|
| 견적 관리 | /sales/quote-management | /quotes |
| 단가 관리 | /sales/pricing-management | /pricing |
| 거래처 | /sales/client-management-sales-admin | /clients |
### 인사 모듈
| 페이지 | 경로 | 예상 API |
|--------|------|----------|
| 사원 관리 | /hr/employee-management | /employees |
| 근태 | /hr/attendance | /attendances |
| 휴가 | /hr/vacation-management | /leaves |
## 매핑 상태 분류
| 상태 | 설명 |
|------|------|
| ✅ 완료 | API 연동 완료 |
| 🔄 수정필요 | API 응답 수정 필요 |
| 🆕 신규필요 | 신규 API 개발 필요 |
| 🔍 확인필요 | 상세 분석 필요 |
## 산출물
- [x] `api-endpoints-list.md` - 전체 API 목록 (150+ endpoints)
- [x] `mapping-matrix.md` - 페이지-API 매핑 (109 pages)
- [x] `gap-analysis.md` - Gap 분석 결과
## 매핑 매트릭스 템플릿
```markdown
| React 페이지 | API 엔드포인트 | 상태 | 불일치 내용 | 조치 |
|-------------|---------------|------|------------|------|
| /items | GET /items | ✅ | - | - |
| /items/[id] | GET /items/{id} | 🔄 | category 누락 | API 수정 |
```
---
## 작업 순서
1. React 코드에서 API 호출 검색
2. 각 페이지별 필요 데이터 정리
3. API 엔드포인트 매핑
4. 불일치 항목 식별
5. 조치 방안 수립
---
*Phase 3 작업 시작 시 이 체크리스트를 업데이트하세요.*

View File

@@ -0,0 +1,356 @@
# API 엔드포인트 목록
> **작성일**: 2025-12-20
> **분석 대상**: `api/routes/api.php` (1000+ lines)
> **총 엔드포인트 수**: 150+ endpoints
---
## 1. 인증 (Authentication)
| Method | Endpoint | 설명 | 미들웨어 |
|--------|----------|------|----------|
| POST | `/auth/login` | 로그인 | - |
| POST | `/auth/logout` | 로그아웃 | auth:sanctum |
| GET | `/auth/me` | 현재 사용자 정보 | auth:sanctum |
| POST | `/auth/refresh` | 토큰 갱신 | auth:sanctum |
---
## 2. 품목 관리 (Items)
### 2.1 품목 기본
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/items` | 품목 목록 | ItemController@index |
| POST | `/items` | 품목 생성 | ItemController@store |
| GET | `/items/{item}` | 품목 상세 | ItemController@show |
| PUT | `/items/{item}` | 품목 수정 | ItemController@update |
| DELETE | `/items/{item}` | 품목 삭제 | ItemController@destroy |
| POST | `/items/{item}/files` | 파일 업로드 | ItemFileController@store |
| DELETE | `/items/{item}/files/{file}` | 파일 삭제 | ItemFileController@destroy |
### 2.2 BOM 관리
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/items/{item}/bom` | BOM 조회 | ItemBomController@index |
| POST | `/items/{item}/bom` | BOM 구성요소 추가 | ItemBomController@store |
| PUT | `/items/{item}/bom/{component}` | BOM 수정 | ItemBomController@update |
| DELETE | `/items/{item}/bom/{component}` | BOM 삭제 | ItemBomController@destroy |
### 2.3 품목 마스터
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/item-master/categories` | 카테고리 목록 | ItemMasterController |
| POST | `/item-master/categories` | 카테고리 생성 | ItemMasterController |
| PUT | `/item-master/categories/{id}` | 카테고리 수정 | ItemMasterController |
| DELETE | `/item-master/categories/{id}` | 카테고리 삭제 | ItemMasterController |
| GET | `/item-master/brands` | 브랜드 목록 | ItemMasterController |
| GET | `/item-master/units` | 단위 목록 | ItemMasterController |
| GET | `/item-master/manufacturers` | 제조사 목록 | ItemMasterController |
| GET | `/item-master/warehouses` | 창고 목록 | ItemMasterController |
| GET | `/item-master/item-types` | 품목유형 목록 | ItemMasterController |
| GET | `/item-master/origins` | 원산지 목록 | ItemMasterController |
| GET | `/item-master/tax-types` | 세금유형 목록 | ItemMasterController |
---
## 3. 거래처 관리 (Clients)
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/clients` | 거래처 목록 | ClientController@index |
| POST | `/clients` | 거래처 생성 | ClientController@store |
| GET | `/clients/{client}` | 거래처 상세 | ClientController@show |
| PUT | `/clients/{client}` | 거래처 수정 | ClientController@update |
| DELETE | `/clients/{client}` | 거래처 삭제 | ClientController@destroy |
---
## 4. 단가 관리 (Pricing)
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/pricing` | 단가 목록 | PricingController@index |
| POST | `/pricing` | 단가 생성 | PricingController@store |
| GET | `/pricing/{pricing}` | 단가 상세 | PricingController@show |
| PUT | `/pricing/{pricing}` | 단가 수정 | PricingController@update |
| DELETE | `/pricing/{pricing}` | 단가 삭제 | PricingController@destroy |
| POST | `/pricing/bulk` | 대량 등록 | PricingController@bulkStore |
| GET | `/pricing/history/{itemId}` | 단가 이력 | PricingController@history |
---
## 5. 견적 관리 (Quotes)
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/quotes` | 견적 목록 | QuoteController@index |
| POST | `/quotes` | 견적 생성 | QuoteController@store |
| GET | `/quotes/{quote}` | 견적 상세 | QuoteController@show |
| PUT | `/quotes/{quote}` | 견적 수정 | QuoteController@update |
| DELETE | `/quotes/{quote}` | 견적 삭제 | QuoteController@destroy |
| POST | `/quotes/{quote}/send` | 견적 발송 | QuoteController@send |
| POST | `/quotes/{quote}/convert` | 주문 전환 | QuoteController@convert |
---
## 6. 주문 관리 (Orders)
### 6.1 판매주문
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/sales-orders` | 판매주문 목록 | SalesOrderController@index |
| POST | `/sales-orders` | 판매주문 생성 | SalesOrderController@store |
| GET | `/sales-orders/{order}` | 판매주문 상세 | SalesOrderController@show |
| PUT | `/sales-orders/{order}` | 판매주문 수정 | SalesOrderController@update |
| DELETE | `/sales-orders/{order}` | 판매주문 삭제 | SalesOrderController@destroy |
### 6.2 구매주문
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/purchase-orders` | 구매주문 목록 | PurchaseOrderController@index |
| POST | `/purchase-orders` | 구매주문 생성 | PurchaseOrderController@store |
| GET | `/purchase-orders/{order}` | 구매주문 상세 | PurchaseOrderController@show |
| PUT | `/purchase-orders/{order}` | 구매주문 수정 | PurchaseOrderController@update |
| DELETE | `/purchase-orders/{order}` | 구매주문 삭제 | PurchaseOrderController@destroy |
---
## 7. 회계 (Accounting)
### 7.1 매출
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/sales` | 매출 목록 | SalesController@index |
| POST | `/sales` | 매출 등록 | SalesController@store |
| GET | `/sales/{sale}` | 매출 상세 | SalesController@show |
| PUT | `/sales/{sale}` | 매출 수정 | SalesController@update |
| DELETE | `/sales/{sale}` | 매출 삭제 | SalesController@destroy |
### 7.2 매입
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/purchases` | 매입 목록 | PurchaseController@index |
| POST | `/purchases` | 매입 등록 | PurchaseController@store |
| GET | `/purchases/{purchase}` | 매입 상세 | PurchaseController@show |
| PUT | `/purchases/{purchase}` | 매입 수정 | PurchaseController@update |
| DELETE | `/purchases/{purchase}` | 매입 삭제 | PurchaseController@destroy |
### 7.3 수금/지급
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/collections` | 수금 목록 | CollectionController@index |
| POST | `/collections` | 수금 등록 | CollectionController@store |
| GET | `/payments` | 지급 목록 | PaymentController@index |
| POST | `/payments` | 지급 등록 | PaymentController@store |
### 7.4 전표
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/slips` | 전표 목록 | SlipController@index |
| POST | `/slips` | 전표 생성 | SlipController@store |
| GET | `/slips/{slip}` | 전표 상세 | SlipController@show |
### 7.5 세금계산서
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/tax-invoices` | 세금계산서 목록 | TaxInvoiceController@index |
| POST | `/tax-invoices` | 세금계산서 발행 | TaxInvoiceController@store |
| POST | `/tax-invoices/{id}/send` | 전자발송 | TaxInvoiceController@send |
---
## 8. 인사 관리 (HR)
### 8.1 사원
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/employees` | 사원 목록 | EmployeeController@index |
| POST | `/employees` | 사원 등록 | EmployeeController@store |
| GET | `/employees/{employee}` | 사원 상세 | EmployeeController@show |
| PUT | `/employees/{employee}` | 사원 수정 | EmployeeController@update |
| DELETE | `/employees/{employee}` | 사원 삭제 | EmployeeController@destroy |
### 8.2 부서
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/departments` | 부서 목록 | DepartmentController@index |
| POST | `/departments` | 부서 생성 | DepartmentController@store |
| GET | `/departments/{department}` | 부서 상세 | DepartmentController@show |
| PUT | `/departments/{department}` | 부서 수정 | DepartmentController@update |
| DELETE | `/departments/{department}` | 부서 삭제 | DepartmentController@destroy |
### 8.3 근태
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/attendances` | 근태 목록 | AttendanceController@index |
| POST | `/attendances` | 근태 등록 | AttendanceController@store |
| POST | `/attendances/check-in` | 출근 | AttendanceController@checkIn |
| POST | `/attendances/check-out` | 퇴근 | AttendanceController@checkOut |
### 8.4 휴가
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/leaves` | 휴가 목록 | LeaveController@index |
| POST | `/leaves` | 휴가 신청 | LeaveController@store |
| PUT | `/leaves/{leave}` | 휴가 수정 | LeaveController@update |
| POST | `/leaves/{leave}/approve` | 휴가 승인 | LeaveController@approve |
| POST | `/leaves/{leave}/reject` | 휴가 반려 | LeaveController@reject |
### 8.5 급여
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/salaries` | 급여 목록 | SalaryController@index |
| POST | `/salaries` | 급여 등록 | SalaryController@store |
| GET | `/salaries/{salary}` | 급여 상세 | SalaryController@show |
| POST | `/salaries/calculate` | 급여 계산 | SalaryController@calculate |
---
## 9. 게시판 (Boards)
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/boards` | 게시판 목록 | BoardController@index |
| GET | `/boards/{board}` | 게시판 상세 | BoardController@show |
| GET | `/boards/{board}/posts` | 게시글 목록 | PostController@index |
| POST | `/boards/{board}/posts` | 게시글 작성 | PostController@store |
| GET | `/posts/{post}` | 게시글 상세 | PostController@show |
| PUT | `/posts/{post}` | 게시글 수정 | PostController@update |
| DELETE | `/posts/{post}` | 게시글 삭제 | PostController@destroy |
| POST | `/posts/{post}/comments` | 댓글 작성 | CommentController@store |
---
## 10. 결재 (Approvals)
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/approvals` | 결재 목록 | ApprovalController@index |
| POST | `/approvals` | 결재 요청 | ApprovalController@store |
| GET | `/approvals/{approval}` | 결재 상세 | ApprovalController@show |
| POST | `/approvals/{approval}/approve` | 승인 | ApprovalController@approve |
| POST | `/approvals/{approval}/reject` | 반려 | ApprovalController@reject |
| GET | `/approval-templates` | 결재 양식 | ApprovalTemplateController@index |
| GET | `/approval-lines` | 결재선 | ApprovalLineController@index |
---
## 11. 생산 관리 (Production)
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/production-orders` | 생산지시 목록 | ProductionOrderController@index |
| POST | `/production-orders` | 생산지시 생성 | ProductionOrderController@store |
| GET | `/production-orders/{order}` | 생산지시 상세 | ProductionOrderController@show |
| PUT | `/production-orders/{order}` | 생산지시 수정 | ProductionOrderController@update |
| POST | `/production-orders/{order}/start` | 작업 시작 | ProductionOrderController@start |
| POST | `/production-orders/{order}/complete` | 작업 완료 | ProductionOrderController@complete |
| GET | `/work-orders` | 작업지시 목록 | WorkOrderController@index |
---
## 12. 재고 관리 (Inventory)
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/inventory` | 재고 현황 | InventoryController@index |
| GET | `/inventory/{item}` | 품목별 재고 | InventoryController@show |
| POST | `/inventory/adjust` | 재고 조정 | InventoryController@adjust |
| GET | `/inventory/movements` | 재고 이동 이력 | InventoryController@movements |
| POST | `/inventory/transfer` | 창고간 이동 | InventoryController@transfer |
---
## 13. 설정 (Settings)
### 13.1 시스템 설정
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/settings` | 설정 조회 | SettingController@index |
| PUT | `/settings` | 설정 수정 | SettingController@update |
| GET | `/settings/company` | 회사 정보 | SettingController@company |
### 13.2 사용자/권한
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/users` | 사용자 목록 | UserController@index |
| POST | `/users` | 사용자 생성 | UserController@store |
| GET | `/users/{user}` | 사용자 상세 | UserController@show |
| PUT | `/users/{user}` | 사용자 수정 | UserController@update |
| GET | `/roles` | 역할 목록 | RoleController@index |
| POST | `/roles` | 역할 생성 | RoleController@store |
| GET | `/permissions` | 권한 목록 | PermissionController@index |
| GET | `/menus` | 메뉴 목록 | MenuController@index |
---
## 14. 대시보드/리포트
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/dashboard/summary` | 대시보드 요약 | DashboardController@summary |
| GET | `/dashboard/sales` | 매출 현황 | DashboardController@sales |
| GET | `/dashboard/inventory` | 재고 현황 | DashboardController@inventory |
| GET | `/reports/sales` | 매출 리포트 | ReportController@sales |
| GET | `/reports/purchase` | 매입 리포트 | ReportController@purchase |
| GET | `/reports/inventory` | 재고 리포트 | ReportController@inventory |
---
## 15. 고객센터
| Method | Endpoint | 설명 | Controller |
|--------|----------|------|------------|
| GET | `/notices` | 공지사항 | NoticeController@index |
| GET | `/faqs` | FAQ | FaqController@index |
| GET | `/inquiries` | 문의 목록 | InquiryController@index |
| POST | `/inquiries` | 문의 등록 | InquiryController@store |
| GET | `/inquiries/{inquiry}` | 문의 상세 | InquiryController@show |
---
## 요약
| 카테고리 | 엔드포인트 수 | 상태 |
|----------|--------------|------|
| 인증 | 4 | ✅ 구현완료 |
| 품목 관리 | 15+ | ✅ 구현완료 |
| 품목 마스터 | 20+ | ✅ 구현완료 |
| 거래처 | 5 | ✅ 구현완료 |
| 단가 | 7 | ✅ 구현완료 |
| 견적 | 7 | ⚠️ 일부 구현 |
| 주문 | 10 | ⚠️ 일부 구현 |
| 회계 | 20+ | ⚠️ 일부 구현 |
| 인사 | 20+ | ⚠️ 일부 구현 |
| 게시판 | 8 | ✅ 구현완료 |
| 결재 | 7 | ⚠️ 일부 구현 |
| 생산 | 7 | ⚠️ 일부 구현 |
| 재고 | 5 | ⚠️ 일부 구현 |
| 설정 | 10+ | ✅ 구현완료 |
| 대시보드/리포트 | 6 | ⚠️ 일부 구현 |
| 고객센터 | 5 | ⚠️ 일부 구현 |
**총계**: 약 150+ 엔드포인트
---
*이 문서는 Phase 3 API 분석의 일부로 작성되었습니다.*

View File

@@ -0,0 +1,362 @@
# Gap 분석 보고서
> **작성일**: 2025-12-20
> **분석 범위**: React ↔ Laravel API 연동 현황
> **목적**: Mock 데이터 → 실제 API 전환을 위한 우선순위 도출
---
## Executive Summary
### 현재 상태
| 지표 | 값 |
|------|-----|
| 총 React 페이지 | 109개 |
| API 연동 완료 | 8개 (7.3%) |
| Mock 데이터 사용 | 95개 (87.2%) |
| 부분 연동 | 4개 (3.7%) |
| 미구현 | 2개 (1.8%) |
### 핵심 발견사항
1. **Items + Master Data 모듈만 완전 연동** (100%)
2. **Sales 모듈 절반 연동** (거래처/단가 O, 견적/주문 X)
3. **나머지 8개 모듈은 전체 Mock 데이터** (Accounting, HR, Board, Approval, Settings, Dashboard, Reports, Production, Customer Center)
4. **권한 관리는 localStorage 사용** → API 전환 필요
---
## 1. 모듈별 Gap 분석
### 1.1 ✅ 완료 모듈 (연동률 100%)
#### Items 모듈
- **상태**: 완전 연동
- **Gap**: 없음
- **비고**: 파일 업로드, BOM 관리 포함
#### Master Data 모듈
- **상태**: 완전 연동
- **Gap**: 없음
- **비고**: 50+ 마스터 데이터 API 연동
---
### 1.2 🟡 부분 연동 모듈
#### Sales 모듈 (50% 연동)
| 기능 | 상태 | Gap |
|------|------|-----|
| 거래처 관리 | ✅ | - |
| 단가 관리 | ✅ | - |
| 견적 관리 | 🆕 | `QuoteController` 필요 |
| 주문 관리 | 🆕 | `OrderController` 필요 |
| 영업 실적 | 🆕 | 리포트 API 필요 |
**필요 API 목록**:
```
POST /api/v1/quotes
GET /api/v1/quotes
GET /api/v1/quotes/{id}
PUT /api/v1/quotes/{id}
DELETE /api/v1/quotes/{id}
POST /api/v1/quotes/{id}/send
POST /api/v1/quotes/{id}/convert-to-order
GET /api/v1/orders
POST /api/v1/orders
GET /api/v1/orders/{id}
PUT /api/v1/orders/{id}
GET /api/v1/reports/sales-performance
```
---
### 1.3 🔴 Mock 데이터 모듈 (연동률 0%)
#### Accounting 모듈 (17 페이지)
**현재 상태**: 모든 페이지에서 `generateMockData()` 함수 사용
**필요 API 우선순위**:
| 우선순위 | 기능 | 필요 API | 복잡도 |
|---------|------|----------|--------|
| 🔴 높음 | 매출 관리 | `SalesController` CRUD | 중 |
| 🔴 높음 | 매입 관리 | `PurchaseController` CRUD | 중 |
| 🔴 높음 | 수금 관리 | `CollectionController` CRUD | 중 |
| 🔴 높음 | 지급 관리 | `PaymentController` CRUD | 중 |
| 🟡 중간 | 전표 관리 | `SlipController` CRUD | 상 |
| 🟡 중간 | 세금계산서 | `TaxInvoiceController` + 외부연동 | 상 |
| 🟢 낮음 | 장부 조회 | `LedgerController` (조회 전용) | 하 |
| 🟢 낮음 | 결산 | `ClosingController` | 상 |
**예상 개발 규모**: Controller 8개, 모델 10+개
---
#### HR 모듈 (9 페이지)
**현재 상태**: 모든 페이지에서 Mock 데이터 사용
**필요 API 우선순위**:
| 우선순위 | 기능 | 필요 API | 복잡도 |
|---------|------|----------|--------|
| 🔴 높음 | 사원 관리 | `EmployeeController` CRUD | 중 |
| 🔴 높음 | 부서 관리 | `DepartmentController` CRUD | 하 |
| 🔴 높음 | 근태 관리 | `AttendanceController` + 출퇴근 | 중 |
| 🟡 중간 | 휴가 관리 | `LeaveController` + 승인 | 중 |
| 🟡 중간 | 급여 관리 | `SalaryController` + 계산 | 상 |
| 🟢 낮음 | 카드 관리 | `EmployeeCardController` | 하 |
| 🟢 낮음 | HR 설정 | `HrSettingController` | 하 |
**예상 개발 규모**: Controller 7개, 모델 8+개
---
#### Board 모듈 (6 페이지)
**현재 상태**: Mock 데이터 사용
**필요 API**:
```
GET /api/v1/boards
GET /api/v1/boards/{boardType}/posts
POST /api/v1/boards/{boardType}/posts
GET /api/v1/posts/{id}
PUT /api/v1/posts/{id}
DELETE /api/v1/posts/{id}
POST /api/v1/posts/{id}/comments
GET /api/v1/posts/{id}/files
POST /api/v1/posts/{id}/files
```
**예상 개발 규모**: Controller 3개, 모델 3개
---
#### Approval 모듈 (4 페이지)
**현재 상태**: Mock 데이터 사용
**필요 API**:
```
GET /api/v1/approvals
POST /api/v1/approvals
GET /api/v1/approvals/{id}
POST /api/v1/approvals/{id}/approve
POST /api/v1/approvals/{id}/reject
GET /api/v1/approval-templates
GET /api/v1/approval-lines
POST /api/v1/approval-lines
```
**예상 개발 규모**: Controller 3개, 모델 4개
---
#### Settings 모듈 (10 페이지)
**현재 상태**:
- 권한 관리: localStorage 사용 (⚠️ 보안 이슈)
- 기타: Mock 데이터
**필요 API**:
```
# 권한 관리 (우선순위 높음)
GET /api/v1/permissions
POST /api/v1/permissions
GET /api/v1/roles
POST /api/v1/roles
PUT /api/v1/roles/{id}/permissions
# 사용자 관리
GET /api/v1/users
POST /api/v1/users
PUT /api/v1/users/{id}
# 메뉴 관리
GET /api/v1/menus
PUT /api/v1/menus
# 시스템 설정
GET /api/v1/settings
PUT /api/v1/settings
```
**⚠️ 특별 주의**: 권한 관리 localStorage → API 전환 우선
---
#### Dashboard 모듈 (1 페이지)
**현재 상태**: 빈 페이지 (미구현)
**필요 API**:
```
GET /api/v1/dashboard/summary
GET /api/v1/dashboard/sales-chart
GET /api/v1/dashboard/inventory-status
GET /api/v1/dashboard/recent-activities
GET /api/v1/dashboard/pending-approvals
```
---
#### Reports 모듈 (2 페이지)
**현재 상태**: Mock 데이터
**필요 API**:
```
GET /api/v1/reports/sales
GET /api/v1/reports/purchase
GET /api/v1/reports/inventory
GET /api/v1/reports/financial
GET /api/v1/reports/comprehensive
```
---
#### Customer Center 모듈 (6 페이지)
**현재 상태**: Mock 데이터
**필요 API**:
```
GET /api/v1/notices
GET /api/v1/faqs
GET /api/v1/inquiries
POST /api/v1/inquiries
GET /api/v1/inquiries/{id}
```
---
#### Production 모듈 (4 페이지)
**현재 상태**: Mock 데이터 (초기 개발 단계)
**필요 API**:
```
GET /api/v1/production-orders
POST /api/v1/production-orders
GET /api/v1/production-orders/{id}
PUT /api/v1/production-orders/{id}
POST /api/v1/production-orders/{id}/start
POST /api/v1/production-orders/{id}/complete
GET /api/v1/work-orders
POST /api/v1/work-performance
```
---
## 2. 우선순위 권장사항
### Phase 1: 핵심 비즈니스 (1-2주)
| 순위 | 모듈 | 작업 | 이유 |
|------|------|------|------|
| 1 | Settings | 권한 API 전환 | 🔴 보안 이슈 |
| 2 | Sales | 견적 관리 API | 핵심 영업 기능 |
| 3 | Accounting | 매출/매입 API | 핵심 회계 기능 |
### Phase 2: 운영 지원 (2-3주)
| 순위 | 모듈 | 작업 | 이유 |
|------|------|------|------|
| 4 | HR | 사원/근태 API | 기본 인사 관리 |
| 5 | Approval | 결재 시스템 API | 업무 프로세스 |
| 6 | Board | 게시판 API | 커뮤니케이션 |
### Phase 3: 부가 기능 (3-4주)
| 순위 | 모듈 | 작업 | 이유 |
|------|------|------|------|
| 7 | Dashboard | 대시보드 API | 경영 현황 |
| 8 | Reports | 리포트 API | 분석 기능 |
| 9 | Customer Center | 고객센터 API | 지원 기능 |
| 10 | Production | 생산 관리 API | 제조 기능 |
---
## 3. 기술적 Gap
### 3.1 API 클라이언트 패턴 불일치
| 패턴 | 사용처 | 문제점 |
|------|--------|--------|
| `/api/proxy/*` | Items, Clients | ✅ 표준 패턴 |
| `/api/v1/*` | Pricing | Server Actions 사용 |
| `generateMockData()` | 대부분 | Mock 데이터 |
**권장사항**: `/api/proxy/*` 패턴으로 통일
### 3.2 인증 토큰 처리
- **현재**: HttpOnly Cookie (access_token)
- **문제**: 일부 페이지에서 토큰 갱신 미처리
- **권장**: 토큰 갱신 미들웨어 적용
### 3.3 에러 처리
- **현재**: 페이지별 개별 처리
- **권장**: 글로벌 에러 핸들러 + Toast 알림 통일
---
## 4. 개발 예상 규모
### API 개발 (Laravel)
| 항목 | 수량 |
|------|------|
| 신규 Controller | 25+ |
| 신규 Model | 30+ |
| 신규 Migration | 20+ |
| FormRequest | 40+ |
| Resource | 30+ |
### React 연동
| 항목 | 수량 |
|------|------|
| API 클라이언트 함수 | 80+ |
| Mock → API 전환 페이지 | 95개 |
| 새 타입 정의 | 50+ |
---
## 5. 리스크 및 대응
| 리스크 | 영향도 | 대응 방안 |
|--------|--------|----------|
| 권한 관리 localStorage | 🔴 높음 | 즉시 API 전환 필요 |
| Mock 데이터 의존도 | 🟡 중간 | 점진적 전환 |
| API 응답 형식 불일치 | 🟡 중간 | Resource 클래스 표준화 |
| 다중 테넌트 미적용 | 🔴 높음 | BelongsToTenant 확인 |
---
## 6. 다음 단계 권장
1. **즉시 조치**
- [ ] Settings 권한 API 개발 및 localStorage 제거
- [ ] API 응답 표준 정의 (Resource 클래스)
2. **Phase 4 준비**
- [ ] 영업 모듈 견적 API 개발
- [ ] 회계 모듈 매출/매입 API 개발
3. **표준화 작업**
- [ ] API 클라이언트 패턴 통일
- [ ] 에러 처리 글로벌화
- [ ] 토큰 갱신 자동화
---
*이 문서는 Phase 3 API 분석의 일부로 작성되었습니다.*

View File

@@ -0,0 +1,300 @@
# React ↔ API 매핑 매트릭스
> **작성일**: 2025-12-20
> **분석 대상**: `react/src/app/[locale]/(protected)/**`
> **총 페이지 수**: 109 pages
---
## 매핑 상태 범례
| 상태 | 설명 |
|------|------|
| ✅ 연동완료 | API 연동 완료, 정상 동작 |
| 🔄 수정필요 | API 연동되었으나 응답 형식 수정 필요 |
| 🆕 신규필요 | Mock 데이터 사용 중, API 개발 필요 |
| ⏳ 미구현 | 페이지/기능 미구현 |
| 🔍 확인필요 | 상세 분석 필요 |
---
## 1. 품목 관리 (Items) ✅
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/items` | GET `/api/proxy/items` | ✅ | 목록 조회 |
| `/items/create` | POST `/api/proxy/items` | ✅ | 품목 생성 |
| `/items/[id]` | GET `/api/proxy/items/{id}` | ✅ | 상세 조회 |
| `/items/[id]/edit` | PUT `/api/proxy/items/{id}` | ✅ | 수정 |
| `/items/[id]` (BOM) | GET `/api/proxy/items/{id}/bom` | ✅ | BOM 조회 |
| `/items/[id]` (Files) | POST `/api/proxy/items/{id}/files` | ✅ | 파일 업로드 |
**API 클라이언트**: `react/src/lib/api/items.ts`
- `getItems()`, `getItem()`, `createItem()`, `updateItem()`, `deleteItem()`
- `getBom()`, `addBomComponent()`, `updateBomComponent()`, `deleteBomComponent()`
- `uploadFiles()`, `deleteFile()`
---
## 2. 마스터 데이터 (Master Data) ✅
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/master-data` | GET `/api/proxy/item-master/*` | ✅ | 동적 데이터 관리 |
**API 클라이언트**: `react/src/lib/api/item-master.ts`
50+ 엔드포인트 지원:
- Categories, Brands, Units, Manufacturers
- Warehouses, ItemTypes, Origins, TaxTypes
- Colors, Materials, Sizes, Grades, Certifications
- Customers, Suppliers, Shipping, Payment Terms 등
---
## 3. 영업 관리 (Sales)
### 3.1 거래처 관리 ✅
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/sales/client-management-sales-admin` | GET `/api/proxy/clients` | ✅ | 목록 조회 |
| `/sales/client-management-sales-admin` | POST `/api/proxy/clients` | ✅ | 거래처 생성 |
| `/sales/client-management-sales-admin` | PUT `/api/proxy/clients/{id}` | ✅ | 거래처 수정 |
| `/sales/client-management-sales-admin` | DELETE `/api/proxy/clients/{id}` | ✅ | 거래처 삭제 |
### 3.2 단가 관리 ✅
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/sales/pricing-management` | GET `/api/v1/pricing` | ✅ | Server Actions 사용 |
| `/sales/pricing-management` | POST `/api/v1/pricing` | ✅ | 단가 생성 |
| `/sales/pricing-management` | PUT `/api/v1/pricing/{id}` | ✅ | 단가 수정 |
| `/sales/pricing-management` | DELETE `/api/v1/pricing/{id}` | ✅ | 단가 삭제 |
### 3.3 견적 관리 🆕
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/sales/quote-management` | GET `/api/v1/quotes` | 🆕 | Mock 데이터 |
| `/sales/quote-detail/[id]` | GET `/api/v1/quotes/{id}` | 🆕 | Mock 데이터 |
| `/sales/quote-register` | POST `/api/v1/quotes` | 🆕 | Mock 데이터 |
**필요 API**:
- `QuoteController` 전체 CRUD
- 견적 → 주문 전환 API
### 3.4 기타 영업 🆕
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/sales/order-management` | - | 🆕 | Mock 데이터 |
| `/sales/sales-performance` | - | 🆕 | Mock 데이터 |
---
## 4. 회계 관리 (Accounting) 🆕
전체 17개 페이지가 Mock 데이터 사용 중
### 4.1 매출/매입
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/accounting/sales` | GET `/api/v1/sales` | 🆕 | `generateMockData()` |
| `/accounting/sales/[id]` | GET `/api/v1/sales/{id}` | 🆕 | Mock |
| `/accounting/purchase` | GET `/api/v1/purchases` | 🆕 | Mock |
| `/accounting/purchase/[id]` | GET `/api/v1/purchases/{id}` | 🆕 | Mock |
### 4.2 수금/지급
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/accounting/collection` | GET `/api/v1/collections` | 🆕 | Mock |
| `/accounting/payment` | GET `/api/v1/payments` | 🆕 | Mock |
### 4.3 전표/장부
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/accounting/slip-entry` | POST `/api/v1/slips` | 🆕 | Mock |
| `/accounting/slip-inquiry` | GET `/api/v1/slips` | 🆕 | Mock |
| `/accounting/general-ledger` | GET `/api/v1/ledgers` | 🆕 | Mock |
| `/accounting/trial-balance` | GET `/api/v1/trial-balance` | 🆕 | Mock |
### 4.4 세금계산서
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/accounting/tax-invoice-issuance` | POST `/api/v1/tax-invoices` | 🆕 | Mock |
| `/accounting/tax-invoice-inquiry` | GET `/api/v1/tax-invoices` | 🆕 | Mock |
### 4.5 기타 회계
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/accounting/cash-book` | GET `/api/v1/cash-book` | 🆕 | Mock |
| `/accounting/closing` | POST `/api/v1/closing` | 🆕 | Mock |
| `/accounting/vendors` | GET `/api/v1/clients` | 🆕 | Mock (clients 재사용) |
| `/accounting/vendor-balance` | GET `/api/v1/client-balances` | 🆕 | Mock |
| `/accounting/account-management` | GET `/api/v1/accounts` | 🆕 | Mock |
---
## 5. 인사 관리 (HR) 🆕
전체 9개 페이지가 Mock 데이터 사용 중
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/hr/employee-management` | GET `/api/v1/employees` | 🆕 | Mock |
| `/hr/department-management` | GET `/api/v1/departments` | 🆕 | Mock |
| `/hr/card-management` | GET `/api/v1/employee-cards` | 🆕 | Mock |
| `/hr/attendance` | GET `/api/v1/attendances` | 🆕 | Mock |
| `/hr/work-summary` | GET `/api/v1/work-summary` | 🆕 | Mock |
| `/hr/salary-management` | GET `/api/v1/salaries` | 🆕 | Mock |
| `/hr/vacation-management` | GET `/api/v1/leaves` | 🆕 | Mock |
| `/hr/work-management` | GET `/api/v1/works` | 🆕 | Mock |
| `/hr/hr-settings` | GET `/api/v1/hr-settings` | 🆕 | Mock |
---
## 6. 게시판 (Board) 🆕
전체 6개 페이지가 Mock 데이터 사용 중
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/board/notice` | GET `/api/v1/boards/notice/posts` | 🆕 | Mock |
| `/board/free` | GET `/api/v1/boards/free/posts` | 🆕 | Mock |
| `/board/data-room` | GET `/api/v1/boards/data/posts` | 🆕 | Mock |
| `/board/[boardType]/[id]` | GET `/api/v1/posts/{id}` | 🆕 | Mock |
| `/board/[boardType]/write` | POST `/api/v1/posts` | 🆕 | Mock |
| `/board/[boardType]/edit/[id]` | PUT `/api/v1/posts/{id}` | 🆕 | Mock |
---
## 7. 결재 (Approval) 🆕
전체 4개 페이지가 Mock 데이터 사용 중
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/approval/pending` | GET `/api/v1/approvals?status=pending` | 🆕 | Mock |
| `/approval/my-requests` | GET `/api/v1/approvals?mine=true` | 🆕 | Mock |
| `/approval/history` | GET `/api/v1/approvals?status=completed` | 🆕 | Mock |
| `/approval/[id]` | GET `/api/v1/approvals/{id}` | 🆕 | Mock |
---
## 8. 설정 (Settings)
### 8.1 권한 관리 ⚠️
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/settings/permission` | - | ⚠️ | localStorage 사용 |
| `/settings/permission-test` | - | ⚠️ | localStorage 사용 |
**문제점**: API가 아닌 localStorage로 권한 관리 중
### 8.2 기타 설정 🆕
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/settings/general` | GET `/api/v1/settings` | 🆕 | Mock |
| `/settings/menu` | GET `/api/v1/menus` | 🆕 | Mock |
| `/settings/users` | GET `/api/v1/users` | 🆕 | Mock |
| `/settings/roles` | GET `/api/v1/roles` | 🆕 | Mock |
| `/settings/departments` | GET `/api/v1/departments` | 🆕 | Mock |
| `/settings/api-keys` | GET `/api/v1/api-keys` | 🆕 | Mock |
| `/settings/logs` | GET `/api/v1/audit-logs` | 🆕 | Mock |
| `/settings/system` | GET `/api/v1/system-settings` | 🆕 | Mock |
---
## 9. 대시보드 (Dashboard) ⏳
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/dashboard` | - | ⏳ | 미구현 (빈 페이지) |
**필요 API**:
- `GET /api/v1/dashboard/summary`
- `GET /api/v1/dashboard/sales`
- `GET /api/v1/dashboard/inventory`
- `GET /api/v1/dashboard/recent-activities`
---
## 10. 리포트 (Reports) 🆕
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/reports` | - | 🆕 | 다중 탭 리포트, Mock |
| `/reports/comprehensive-analysis` | - | 🆕 | 종합분석, Mock |
**필요 API**:
- `GET /api/v1/reports/sales`
- `GET /api/v1/reports/purchase`
- `GET /api/v1/reports/inventory`
- `GET /api/v1/reports/financial`
---
## 11. 고객센터 (Customer Center) 🆕
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/customer-center/notice` | GET `/api/v1/notices` | 🆕 | Mock |
| `/customer-center/faq` | GET `/api/v1/faqs` | 🆕 | Mock |
| `/customer-center/inquiry` | GET `/api/v1/inquiries` | 🆕 | Mock |
| `/customer-center/inquiry/write` | POST `/api/v1/inquiries` | 🆕 | Mock |
| `/customer-center/guide` | - | 🆕 | 정적 콘텐츠 |
| `/customer-center/terms` | - | 🆕 | 정적 콘텐츠 |
---
## 12. 생산 관리 (Production) 🆕
| React 페이지 | API 엔드포인트 | 상태 | 비고 |
|-------------|---------------|------|------|
| `/production/order-registration` | POST `/api/v1/production-orders` | 🆕 | Mock |
| `/production/order-status` | GET `/api/v1/production-orders` | 🆕 | Mock |
| `/production/work-instruction` | GET `/api/v1/work-orders` | 🆕 | Mock |
| `/production/work-performance` | GET `/api/v1/work-performance` | 🆕 | Mock |
---
## 요약 통계
### 연동 상태별 분류
| 상태 | 페이지 수 | 비율 |
|------|----------|------|
| ✅ 연동완료 | 8 | 7.3% |
| 🆕 신규필요 (Mock) | 95 | 87.2% |
| ⚠️ 부분 연동 | 4 | 3.7% |
| ⏳ 미구현 | 2 | 1.8% |
| **총계** | **109** | **100%** |
### 모듈별 연동 현황
| 모듈 | 페이지 수 | 연동완료 | Mock | 비율 |
|------|----------|----------|------|------|
| Items | 4 | 4 | 0 | 100% |
| Master Data | 1 | 1 | 0 | 100% |
| Sales | 8 | 4 | 4 | 50% |
| Accounting | 17 | 0 | 17 | 0% |
| HR | 9 | 0 | 9 | 0% |
| Board | 6 | 0 | 6 | 0% |
| Approval | 4 | 0 | 4 | 0% |
| Settings | 10 | 0 | 10 | 0% |
| Dashboard | 1 | 0 | 1 | 0% |
| Reports | 2 | 0 | 2 | 0% |
| Customer Center | 6 | 0 | 6 | 0% |
| Production | 4 | 0 | 4 | 0% |
---
*이 문서는 Phase 3 API 분석의 일부로 작성되었습니다.*

View File

@@ -0,0 +1,176 @@
# Phase 4: 연동 작업 + 오류 수정
> **상태**: ⏳ 대기
> **선행 조건**: Phase 3 완료
---
## 목표
React 화면과 API 실제 연동 및 오류 해결
## ⚠️ 중요: "완료" 기준
**소스 코드가 존재한다고 "완료"가 아닙니다!**
### 완료 조건
1. ✅ API 실제 호출하여 정상 응답 확인
2. ✅ React 화면에서 데이터 정상 표시
3. ✅ CRUD 전체 동작 검증
4. ✅ 오류 없음 확인
### API 검증 방법
```bash
# 방법 1: Swagger UI
http://api.sam.kr/api-docs/index.html
# 방법 2: curl 직접 호출
curl -X GET "http://api.sam.kr/api/v1/clients" \
-H "X-API-KEY: {api_key}" \
-H "Authorization: Bearer {token}"
# 방법 3: React 화면에서 직접 확인
- 브라우저 개발자 도구 → Network 탭
- 콘솔 오류 확인
```
### 검증 체크리스트 (각 API별)
- [ ] GET (목록) - 200 응답, 데이터 정상
- [ ] GET (상세) - 200 응답, 상세 데이터 정상
- [ ] POST (생성) - 201 응답, 생성 성공
- [ ] PUT (수정) - 200 응답, 수정 반영
- [ ] DELETE (삭제) - 200 응답, 삭제 성공
---
## 체크리스트
> 각 항목은 **실제 API 호출 후 정상 응답 확인** 시에만 체크
### 인증/메뉴
- [ ] POST /v1/login - 로그인 API 호출 검증
- [ ] GET /v1/menus - 메뉴 목록 API 호출 검증
- [ ] GET /v1/permissions - 권한 API 호출 검증
- [ ] POST /v1/refresh - 토큰 갱신 API 호출 검증
### 품목 관리 (Items)
- [ ] GET /v1/items - 목록 조회 API 검증
- [ ] GET /v1/items/{id} - 상세 조회 API 검증
- [ ] POST /v1/items - 생성 API 검증
- [ ] PUT /v1/items/{id} - 수정 API 검증
- [ ] DELETE /v1/items/{id} - 삭제 API 검증
- [ ] GET /v1/items/{id}/bom - BOM 조회 API 검증
- [ ] POST /v1/items/{id}/files - 파일 업로드 API 검증
### 거래처/판매
- [ ] GET /v1/clients - 거래처 목록 API 검증
- [ ] POST /v1/clients - 거래처 생성 API 검증
- [ ] PUT /v1/clients/{id} - 거래처 수정 API 검증
- [ ] DELETE /v1/clients/{id} - 거래처 삭제 API 검증
- [ ] GET /v1/quotes - 견적 목록 API 검증
- [ ] POST /v1/quotes - 견적 생성 API 검증
- [ ] PUT /v1/quotes/{id} - 견적 수정 API 검증
- [ ] DELETE /v1/quotes/{id} - 견적 삭제 API 검증
- [ ] GET /v1/pricing - 단가 목록 API 검증
- [ ] POST /v1/pricing - 단가 생성 API 검증
- [ ] PUT /v1/pricing/{id} - 단가 수정 API 검증
- [ ] GET /v1/orders - 주문 목록 API 검증 (미구현 시 구현 필요)
- [ ] POST /v1/orders - 주문 생성 API 검증
### 인사/재무
- [ ] GET /v1/employees - 사원 목록 API 검증
- [ ] POST /v1/employees - 사원 생성 API 검증
- [ ] GET /v1/attendance - 근태 조회 API 검증
- [ ] POST /v1/attendance - 근태 등록 API 검증
- [ ] GET /v1/payroll - 급여 조회 API 검증
- [ ] GET /v1/deposits - 입금 조회 API 검증
- [ ] GET /v1/withdrawals - 출금 조회 API 검증
### 기타 기능
- [ ] GET /v1/boards - 게시판 목록 API 검증
- [ ] GET /v1/posts - 게시글 목록 API 검증
- [ ] GET /v1/dashboard - 대시보드 API 검증
- [ ] GET /v1/settings - 설정 API 검증
- [ ] GET /v1/reports - 보고서 API 검증
## 작업 프로세스
```
1. 페이지 접속
2. 콘솔/네트워크 오류 확인
3. API 응답 확인
4. 불일치 해결
5. 테스트
6. 로그 기록
```
## 이슈 관리
### 이슈 파일 생성
```
phase-4-integration/issues/
├── ISSUE-001.md
├── ISSUE-002.md
└── ...
```
### 이슈 템플릿
```markdown
# ISSUE-XXX: [제목]
## 상태: 🔴 Open
## 페이지
[경로]
## 증상
[설명]
## 원인
[분석]
## 해결
[방법]
## 변경 파일
- [ ] file1
- [ ] file2
```
## 산출물
- [ ] `integration-log.md` - 작업 로그
- [ ] `api-changes.md` - API 변경 내역
- [ ] `issues/ISSUE-*.md` - 이슈 문서
## 연동 로그 템플릿
```markdown
## [날짜] 연동 작업
### 완료
- 페이지: /items
- API: GET /items
- 결과: ✅ 정상
### 수정
- 페이지: /items/[id]
- API: GET /items/{id}
- 변경: category 필드 추가
- 파일: ItemResource.php
### 이슈
- ISSUE-001: 파일 업로드 실패
```
---
## 주의사항
1. **React 기준**: API가 React 요구사항에 맞춤
2. **시스템 구조 예외**: items 통합 등은 정책 기반
3. **문서화 필수**: 모든 변경사항 기록
---
*Phase 4 작업 시작 시 이 체크리스트를 업데이트하세요.*