-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 엔티티 기반 아키텍처 #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- remark-frontmatter: MDX frontmatter 파싱 지원 - remark-mdx-frontmatter: MDX 컴포넌트에서 frontmatter 사용 가능 - next.config.ts에 remarkPlugins 설정 추가 - package.json에 필요한 의존성 추가 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- src/entities/posts/ 엔티티 추가 - index.ts: 게시물 관련 비즈니스 로직 - types.ts: 게시물 타입 정의 - src/api/posts.ts 삭제하여 도메인 로직 분리 - 블로그 페이지에서 새로운 엔티티 import 경로 적용 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- 도메인 엔티티 기반 아키텍처 - 컨텐츠 관리 섹션 수정 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Vitest 테스트 프레임워크 추가 - @vitest/ui 및 @vitest/coverage-v8 커버리지 도구 설정 - 엔티티 테스트를 위한 테스트 스크립트 추가 - src/entities/** 파일 커버리지 타겟 설정 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- getAllPosts, getPostBySlug, getPostsByTag 함수 테스트 - 파일 시스템 mocking 및 gray-matter 파싱 테스트 - 에러 처리 및 엣지 케이스 테스트 포함 - 빈 디렉토리, 잘못된 날짜 형식 등 예외 상황 검증 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- getAllTags, getTagByName, getTagGraph, getTagRelationships 함수 테스트 - graphology 기반 그래프 구조 검증 - 태그 공동 출현 분석 및 관계 계산 테스트 - 클러스터링 알고리즘 및 중심성 계산 테스트 - 통계 분석 및 에지 케이스 검증 포함 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Posts와 Tags 엔티티 간의 통합 테스트 구현 - 실제 블로그 데이터 시뮬레이션 시나리오 테스트 - 타입 인터페이스 구조 검증 테스트 - 테스트 환경 설정 파일 추가 - 엔티티 간 상호작용 및 데이터 흐름 검증 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- graphology 라이브러리를 이용한 태그 그래프 구조 구현 - 태그 공동 출현 관계 분석 및 유사도 계산 - 중심성 기반 태그 클러스터링 알고리즘 - 태그 통계 분석 기능 (most used, least used, average) - TypeScript 타입 정의 및 인터페이스 구현 - UndirectedGraph 타입을 활용한 태그 그래프 정의 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- 프로젝트 VSCode 설정에서 eslint 동작 방지 - CLAUDE.md에 개발 중 불필요한 개벌서버 실행 방지 지침 추가 - types.ts 파일 테스트 방지 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Posts 엔티티 로직 분리 및 테스트 개선 - parsePostData, sortPostsByDate, filterPostsByTag, filterMdxFiles 함수 추출 - 외부 의존성 없는 순수 함수로 분리하여 테스트 용이성 향상 - PostGrayMatter 타입 정의 개선 - Tags 엔티티 로직 분리 및 테스트 완성 - extractTagsFromPosts, createTagGraph, analyzeTagRelationships 등 모든 로직 분리 - 100% 테스트 커버리지 달성 (22개 테스트 케이스) - undefined tags 처리, 강한/약한 관계 임계값 등 edge case 테스트 추가 - 통합 테스트 파일 제거 - 기존 entities.integration.test.ts 제거 - 각 엔티티별 독립적인 단위 테스트로 전환 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- entities.integration.test.ts 삭제 - 각 엔티티별 독립적인 단위 테스트로 대체됨 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
feat/entities 브랜치에서 진행한 전체 작업으로 엔티티 기반 아키텍처 구축과 테스트 환경 완성
📋 전체 변경사항
🏗️ 프로젝트 설정 및 환경 구성
🎯 엔티티 아키텍처 구축
Posts Entity 구현
src/entities/posts/디렉토리 생성Post,PostFrontMatter,PostGrayMatter타입 구축parsePostData: MDX 파싱 로직sortPostsByDate: 날짜 기반 정렬filterPostsByTag: 태그별 필터링filterMdxFiles: MDX 파일 필터링getAllPosts,getPostByFileName,getPostsByTag등Tags Entity 구현
src/entities/tags/디렉토리 생성Tag,TagRelationship,TagCluster,TagGraph등 완성된 타입 시스템extractTagsFromPosts: 포스트에서 태그 추출 및 집계createTagGraph: 태그 간 동시 출현 관계 그래프 생성analyzeTagRelationships: 태그 간 유사도 및 관계 분석createTagClusters: 중심성 기반 태그 클러스터링calculateTagStats: 태그 통계 계산getAllTags,getTagByName,getTagGraph등🧪 테스트 환경 및 품질 보장
🔧 기존 코드 개선
src/api/posts.ts삭제하고 엔티티로 통합📄 문서화
🎯 주요 성과
Architecture Benefits
Technical Excellence
Developer Experience
📊 통계
🚀 향후 계획
이 아키텍처를 기반으로 다음과 같은 확장이 가능합니다:
🤖 Generated with Claude Code