refactor(db,frontend): Improve queries and modularize frontend

- Replaced SELECT* queries in 8 models with explicit columns.
- Began modularizing work-report-calendar.js by creating CalendarAPI.js, CalendarState.js, and CalendarView.js.
- Refactored manage-project.js to use global API helpers.
- Fixed API container crash by adding missing volume mounts to docker-compose.yml.
- Added new migration for missing columns in the projects table.
- Documented current DB schema and deployment notes.
This commit is contained in:
Hyungi Ahn
2025-12-19 12:42:24 +09:00
parent 8a8307edfc
commit 05843da1c4
19 changed files with 826 additions and 381 deletions

29
DEV_LOG.md Normal file
View File

@@ -0,0 +1,29 @@
# 개발 진행 로그
## 📅 Recent Updates (2025-12-19)
### WorkAnalysis 리팩토링 완료
**내용**: 복잡한 통계 로직을 포함하던 `workAnalysisController.js`를 리팩토링함.
- **[NEW] Service Layer**: `services/workAnalysisService.js` 생성. 비즈니스 로직 이관.
- **[UPDATE] Model Layer**: Raw SQL 쿼리를 Controller에서 Model(`models/WorkAnalysis.js`)로 이동. `getProjectWorkTypeRawData` 메서드 추가.
- **[CLEANUP] Controller**: `getProjectWorkTypeAnalysis` 메서드가 Service를 호출하도록 단순화.
---
## 🛡보안 및 검토 리포트 (History)
### 2025-07-29 보안 취약점 분석
`api.hyungi.net` 백엔드 서버 취약점 점검 결과.
| 라이브러리 | 심각도 | 상태 | 조치사항 |
|---|---|---|---|
| `tar-fs` | **High** | 해결가능 | `npm audit fix` 권장 (완료됨) |
| `brace-expansion` | Low | 해결가능 | `npm audit fix` 권장 (완료됨) |
| `pm2` | Low | 미해결 | 업데이트 대기 필요 |
---
## 📋 향후 계획
1. **테스트 커버리지 확보**: 리팩토링된 Service Layer에 대한 Unit Test 보강.
2. **Knex 마이그레이션**: 남은 Raw SQL(Model Layer)을 Knex 쿼리빌더로 점진적 전환.
3. **API 문서화**: Swagger/OpenAPI 도입 검토.