docs: Admin Dashboard 코드 리팩토링 전체 완료 → archive 이동
This commit is contained in:
parent
b9089577f7
commit
96785eae61
@ -1,59 +0,0 @@
|
||||
# Admin Dashboard 코드 리팩토링 계획
|
||||
|
||||
**날짜**: 2025-12-25
|
||||
**목표**: Monolithic 코드 분리 및 계층 구조 개선
|
||||
**원칙**: 311_FastAPI_구조_원칙.md, 313_React_구조_원칙.md
|
||||
|
||||
---
|
||||
|
||||
## 남은 작업
|
||||
|
||||
### Frontend 모듈 분리 (⏳ 부분 완료)
|
||||
|
||||
**완료된 작업**:
|
||||
- `services/api.js` ✅ (66줄)
|
||||
- `utils/helpers.js` ✅ (113줄)
|
||||
- `modules/system.js` ✅ (493줄, 추가 분리 필요)
|
||||
|
||||
**남은 작업**:
|
||||
|
||||
**목표 구조**:
|
||||
```
|
||||
frontend/
|
||||
├── app.js # 메인 로직만 (~200줄)
|
||||
├── services/
|
||||
│ └── api.js # API 통신 로직 ✅
|
||||
├── utils/
|
||||
│ └── helpers.js # 유틸리티 함수 ✅
|
||||
└── modules/
|
||||
├── diary.js # 일기 관리 ✅
|
||||
├── system.js # 시스템 모니터링 ✅ (493줄, 추가 분리 필요)
|
||||
├── 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`
|
||||
@ -6,65 +6,10 @@
|
||||
|
||||
---
|
||||
|
||||
## 현재 상태
|
||||
|
||||
### 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 통신 로직 분리
|
||||
|
||||
---
|
||||
|
||||
## 구현 완료
|
||||
|
||||
**완료일**: 2025-12-25
|
||||
**커밋**: `ac96e2a` (admin-dashboard)
|
||||
**상세**: `troubleshooting/251225_admin_dashboard_code_refactoring.md`
|
||||
|
||||
### 완료 사항
|
||||
- ✅ 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 프록시 호환성: 이중 경로 지원
|
||||
→ 상세: `troubleshooting/251225_admin_dashboard_code_refactoring.md`
|
||||
→ Frontend 모듈 분리 완료: `troubleshooting/260116_admin_dashboard_frontend_module_separation.md`
|
||||
|
||||
---
|
||||
|
||||
@ -73,3 +18,4 @@ frontend/
|
||||
- `311_FastAPI_구조_원칙.md`
|
||||
- `313_React_구조_원칙.md`
|
||||
- `troubleshooting/251225_admin_dashboard_code_refactoring.md`
|
||||
- `troubleshooting/260116_admin_dashboard_frontend_module_separation.md`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user