# Admin Dashboard 코드 리팩토링 계획 **날짜**: 2025-12-25 **목표**: Monolithic 코드 분리 및 계층 구조 개선 **원칙**: 311_FastAPI_구조_원칙.md, 313_React_구조_원칙.md --- ## 남은 작업 ### 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`