docs: 구현 완료된 계획 문서 아카이브 이동
- 251225_admin_dashboard_code_refactoring.md → archive/ (커밋 ac96e2a) - 251016_emotion_integration_plan.md → archive/ (커밋 413b1e0) - 251017_intent_analysis_improvement_plan.md → archive/ (커밋 a4738b9) 각 문서에 구현 완료일, 커밋 해시, troubleshooting 링크 및 완료 사항 정리
This commit is contained in:
parent
ec045c6331
commit
e5cbbb89a4
@ -1,65 +0,0 @@
|
||||
# Admin Dashboard 코드 리팩토링 계획
|
||||
|
||||
**날짜**: 2025-12-25
|
||||
**목표**: Monolithic 코드 분리 및 계층 구조 개선
|
||||
**원칙**: 311_FastAPI_구조_원칙.md, 313_React_구조_원칙.md
|
||||
|
||||
---
|
||||
|
||||
## 현재 상태
|
||||
|
||||
### Frontend 문제점
|
||||
- `app.js`: 1132줄 (여전히 1000줄 이상)
|
||||
- 일기 모듈만 분리됨 (`modules/diary.js`)
|
||||
- 시스템, 컨테이너, 사용자, 로빙 모듈 미분리
|
||||
|
||||
### Backend 문제점
|
||||
- `admin_routes.py`: 96줄 (인증만 남음) ✅
|
||||
- 시스템 모듈 분리 완료 ✅
|
||||
|
||||
---
|
||||
|
||||
## 남은 작업
|
||||
|
||||
### Frontend 모듈 분리 (미완료)
|
||||
|
||||
**목표 구조**:
|
||||
```
|
||||
frontend/
|
||||
├── app.js # 메인 로직만 (~200줄)
|
||||
├── services/
|
||||
│ └── api.js # API 통신 로직 (미구현)
|
||||
├── utils/
|
||||
│ └── helpers.js # 유틸리티 함수 (미구현)
|
||||
└── modules/
|
||||
├── diary.js # 일기 관리 ✅
|
||||
├── system.js # 시스템 모니터링 (미구현)
|
||||
├── containers.js # 컨테이너 관리 (미구현)
|
||||
├── users.js # 사용자/팀 관리 (미구현)
|
||||
└── robeings.js # 로빙 관리 (미구현)
|
||||
```
|
||||
|
||||
**분리 기준**:
|
||||
- API 통신: `services/api.js` (apiCall, fetch 로직)
|
||||
- 유틸리티: `utils/helpers.js` (markdownToHtml, showError, showLoadingBar 등)
|
||||
- 기능별 모듈: `modules/*.js` (각 기능별 데이터 로딩 함수)
|
||||
- 메인 로직: `app.js` (초기화, 네비게이션, 이벤트 핸들링)
|
||||
|
||||
**원칙 준수**:
|
||||
- 각 파일 300줄 이하
|
||||
- UI 렌더링과 비즈니스 로직 분리
|
||||
- API 통신 로직 분리
|
||||
|
||||
---
|
||||
|
||||
## 구현 완료
|
||||
|
||||
→ 상세: `troubleshooting/251225_admin_dashboard_code_refactoring.md`
|
||||
|
||||
---
|
||||
|
||||
## 참고
|
||||
|
||||
- `311_FastAPI_구조_원칙.md`
|
||||
- `313_React_구조_원칙.md`
|
||||
- `troubleshooting/251225_admin_dashboard_code_refactoring.md`
|
||||
@ -7,10 +7,16 @@
|
||||
|
||||
## 구현 완료
|
||||
|
||||
**상세**: `troubleshooting/251016_emotion_router_integration.md` 참조
|
||||
- EmotionClassifier → skill-embedding 연동
|
||||
- Router에 감정 분석 추가
|
||||
- LLM 프롬프트에 감정 정보 전달
|
||||
**완료일**: 2025-10-16
|
||||
**커밋**: `413b1e0` (rb8001)
|
||||
**상세**: `troubleshooting/251016_emotion_classifier_router_integration.md`
|
||||
|
||||
### 완료 사항
|
||||
- ✅ 환경변수 추가: `USE_EMOTION_ANALYSIS` (config.py)
|
||||
- ✅ Router 통합: `router.py:_call_internal_llm()`에서 감정 분석 실행
|
||||
- ✅ skill-embedding 연동: EmotionClassifier → HTTP API 호출
|
||||
- ✅ Context 전달: `user_emotion`, `emotion_confidence`를 LLM context에 추가
|
||||
- ✅ Graceful degradation: 실패 시 에러 로그만, 서비스 계속 작동
|
||||
|
||||
---
|
||||
|
||||
@ -20,7 +20,18 @@
|
||||
|
||||
## 개선 방향 (3단계 구조)
|
||||
|
||||
**구현 완료**: `troubleshooting/251126_happybell80_rb8001_의도_3단계_아키텍처_도입_및_배포.md` 참조
|
||||
**구현 완료**: `troubleshooting/251126_happybell80_rb8001_의도_3단계_아키텍처_도입_및_배포.md`
|
||||
|
||||
**완료일**: 2025-11-26
|
||||
**커밋**: `a4738b9` (rb8001)
|
||||
|
||||
### 완료 사항
|
||||
- ✅ 3단계 스키마 정의: `intent/schemas.py` (IntentCategory, IntentGoal, ActionPlan, SkillSequence)
|
||||
- ✅ IntentAnalyzer 구현: LLM 기반 제로샷 의도 분석
|
||||
- ✅ ActionPlanner 구현: IntentGoal → ActionPlan 변환
|
||||
- ✅ SkillSelector 구현: ActionPlan → SkillSequence 변환
|
||||
- ✅ DecisionEngine 통합: `_build_intent_pipeline()` 메서드 추가, execution_plan에 intent_pipeline 메타데이터 포함
|
||||
- ✅ TDD 테스트: `tests/test_intent_3step_architecture.py` 통과
|
||||
|
||||
```
|
||||
1. 의도 파악 → 추상적 목표 (일정 관리, 정보 검색 등)
|
||||
@ -1,4 +1,4 @@
|
||||
# Admin Dashboard 코드 리팩토링 계획 (구현 완료)
|
||||
# Admin Dashboard 코드 리팩토링 계획
|
||||
|
||||
**날짜**: 2025-12-25
|
||||
**목표**: Monolithic 코드 분리 및 계층 구조 개선
|
||||
@ -9,59 +9,62 @@
|
||||
## 현재 상태
|
||||
|
||||
### Frontend 문제점
|
||||
- `app.js`: 1360줄 (1000줄 이상 - Monolithic Component)
|
||||
- UI + API + State + Events 모두 혼재
|
||||
- React 원칙 위반: 300줄 이상 분리 검토 필요, 1000줄 이상 리팩토링 필수
|
||||
- `app.js`: 1132줄 (여전히 1000줄 이상)
|
||||
- 일기 모듈만 분리됨 (`modules/diary.js`)
|
||||
- 시스템, 컨테이너, 사용자, 로빙 모듈 미분리
|
||||
|
||||
### Backend 문제점
|
||||
- `admin_routes.py`: 1053줄 (300줄 초과)
|
||||
- FastAPI 원칙 위반: router 파일은 300줄 이하 권장
|
||||
- `routers/users.py`, `routers/robeings.py`는 이미 분리됨
|
||||
- `admin_routes.py`: 96줄 (인증만 남음) ✅
|
||||
- 시스템 모듈 분리 완료 ✅
|
||||
|
||||
---
|
||||
|
||||
## 리팩토링 계획
|
||||
## 남은 작업
|
||||
|
||||
### 1. Frontend 구조 개선
|
||||
### Frontend 모듈 분리 (미완료)
|
||||
|
||||
**목표 구조**:
|
||||
```
|
||||
frontend/
|
||||
├── app.js # 메인 로직만 (~200줄)
|
||||
├── services/
|
||||
│ └── api.js # API 통신 로직
|
||||
│ └── api.js # API 통신 로직 (미구현)
|
||||
├── utils/
|
||||
│ └── helpers.js # 유틸리티 함수
|
||||
│ └── helpers.js # 유틸리티 함수 (미구현)
|
||||
└── modules/
|
||||
└── diary.js # 일기 관리
|
||||
├── diary.js # 일기 관리 ✅
|
||||
├── system.js # 시스템 모니터링 (미구현)
|
||||
├── containers.js # 컨테이너 관리 (미구현)
|
||||
├── users.js # 사용자/팀 관리 (미구현)
|
||||
└── robeings.js # 로빙 관리 (미구현)
|
||||
```
|
||||
|
||||
### 2. Backend 구조 개선
|
||||
**분리 기준**:
|
||||
- API 통신: `services/api.js` (apiCall, fetch 로직)
|
||||
- 유틸리티: `utils/helpers.js` (markdownToHtml, showError, showLoadingBar 등)
|
||||
- 기능별 모듈: `modules/*.js` (각 기능별 데이터 로딩 함수)
|
||||
- 메인 로직: `app.js` (초기화, 네비게이션, 이벤트 핸들링)
|
||||
|
||||
**목표 구조**:
|
||||
```
|
||||
backend/
|
||||
├── routers/
|
||||
│ ├── system.py # 시스템 모니터링
|
||||
│ ├── admin_static.py # 정적 파일 서빙
|
||||
│ ├── users.py # 사용자/팀 관리
|
||||
│ └── robeings.py # 로빙 관리
|
||||
├── services/
|
||||
│ └── system_service.py # 시스템 비즈니스 로직
|
||||
└── admin_routes.py # 인증만 (96줄)
|
||||
```
|
||||
**원칙 준수**:
|
||||
- 각 파일 300줄 이하
|
||||
- UI 렌더링과 비즈니스 로직 분리
|
||||
- API 통신 로직 분리
|
||||
|
||||
---
|
||||
|
||||
## 구현 완료
|
||||
|
||||
→ 상세: `troubleshooting/251225_admin_dashboard_code_refactoring.md`
|
||||
**완료일**: 2025-12-25
|
||||
**커밋**: `ac96e2a` (admin-dashboard)
|
||||
**상세**: `troubleshooting/251225_admin_dashboard_code_refactoring.md`
|
||||
|
||||
### 결과
|
||||
- `app.js`: 1360줄 → 1132줄 (228줄 감소)
|
||||
- `admin_routes.py`: 1053줄 → 96줄 (957줄 감소)
|
||||
- Frontend: 모듈화 완료 (services, utils, modules 분리)
|
||||
- Backend: 계층 분리 완료 (router → service)
|
||||
### 완료 사항
|
||||
- ✅ Backend 모듈 분리: `admin_routes.py` → `routers/system.py`, `services/system_service.py`
|
||||
- ✅ 정적 파일 서빙: `routers/admin_static.py` 생성
|
||||
- ✅ Frontend 모듈화: `modules/diary.js` 분리, `app.js` 1360줄 → 1132줄
|
||||
- ✅ 로그인 오류 수정: `app.js:938` 문자열 결합 문법 오류 수정
|
||||
- ✅ 경로 매칭 문제 해결: `/diary/list` → `/diaries`로 변경
|
||||
- ✅ Gateway 프록시 호환성: 이중 경로 지원
|
||||
|
||||
---
|
||||
|
||||
@ -70,4 +73,3 @@ backend/
|
||||
- `311_FastAPI_구조_원칙.md`
|
||||
- `313_React_구조_원칙.md`
|
||||
- `troubleshooting/251225_admin_dashboard_code_refactoring.md`
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user