From 96785eae61fff33d020b4f86429d3b7eebe4daac Mon Sep 17 00:00:00 2001 From: Claude-51124 Date: Fri, 16 Jan 2026 09:24:45 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20Admin=20Dashboard=20=EC=BD=94=EB=93=9C?= =?UTF-8?q?=20=EB=A6=AC=ED=8C=A9=ED=86=A0=EB=A7=81=20=EC=A0=84=EC=B2=B4=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C=20=E2=86=92=20archive=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...251225_admin_dashboard_code_refactoring.md | 59 ------------------ ...251225_admin_dashboard_code_refactoring.md | 60 +------------------ 2 files changed, 3 insertions(+), 116 deletions(-) delete mode 100644 journey/plans/251225_admin_dashboard_code_refactoring.md diff --git a/journey/plans/251225_admin_dashboard_code_refactoring.md b/journey/plans/251225_admin_dashboard_code_refactoring.md deleted file mode 100644 index 6967c2d..0000000 --- a/journey/plans/251225_admin_dashboard_code_refactoring.md +++ /dev/null @@ -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` diff --git a/journey/plans/archive/251225_admin_dashboard_code_refactoring.md b/journey/plans/archive/251225_admin_dashboard_code_refactoring.md index 613c8f1..007edf8 100644 --- a/journey/plans/archive/251225_admin_dashboard_code_refactoring.md +++ b/journey/plans/archive/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`