**Architecture Refactor (SOLID Principles):**
- Implement AdminDashboardController (REST API)
- Add dashboard summary endpoint
- Add upcoming filings endpoint
- Add recent inquiries endpoint
- Add monthly statistics endpoint
**Database Layer (Repository Pattern):**
- Extend IInquiryRepository with date range queries
- Implement CountByDateRangeAsync
- Implement CountByStatusAndDateAsync
- Extend InquiryRepository with new methods
**Service Layer (Single Responsibility):**
- Extend AdminDashboardService with API methods
- Add GetRecentInquiriesAsync
- Add GetMonthlyStatsAsync with caching
**Test Coverage:**
- Update FakeInquiryRepository mock with new methods
**SOLID Application:**
✓ Single Responsibility: Each class has one reason to change
✓ Open/Closed: Dashboard API can be extended without modifying existing code
✓ Dependency Inversion: Service depends on Repository abstraction
✓ Interface Segregation: API endpoints are focused and specific
Status: ✓ Compiles successfully (0 errors, 0 warnings)
Next phases:
- Add remaining API controllers (Announcement, Client, FAQ, TaxFiling)
- Refactor Blazor components to use API instead of services
- Implement JWT token refresh mechanism
- Add SignalR for change notifications
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- TaxSeason / CurrentSeasonDto에 RelatedCategorySlug 추가
- TaxSeasonCalendar 각 시즌에 카테고리 슬러그 매핑
(income-tax→income-tax, vat-1st/2nd→vat, 종부세→real-estate-tax 등)
- IBlogPostRepository.GetByCategorySlugAsync 추가
- BlogService.GetSeasonalPostsAsync: 시즌 관련 글 2개 우선 + 나머지 최신 글로 채움
- IndexModel: SeasonalPosts / RecentPosts 분리 로드
- Index.cshtml 블로그 섹션: 시즌 중 "이번 시즌 추천" 배지 + 시즌별 전체보기 버튼
- site.css: blog-card--seasonal, seasonal-blog-tag, btn-seasonal 스타일
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 연간 세무 캘린더(7개 시즌) 기반 자동 Hero 섹션 전환
- 시즌 감지 시 D-Day 카운트다운, 긴박감 배지, 시즌 CTA 표시
- 서비스 카드 순서 시즌 관련 항목 우선 정렬
- 어드민 공지사항 CRUD (등록·수정·삭제, 기간·유형 설정)
- 홈페이지 상단 공지 배너 자동 노출 (일반/배너/긴급)
- CLAUDE.md에 세무 캘린더 및 마케팅 방향 하네스 추가
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4개 API 컨트롤러 구현:
✅ AuthController: POST /api/auth/login
✅ BlogController: GET/POST/PUT/DELETE /api/blog
✅ CategoryController: GET/POST/PUT/DELETE /api/category
✅ InquiryController: POST/GET/PUT /api/inquiry
아키텍처 개선:
- Application 서비스 레이어 확장 (CategoryService 추가)
- Repository 인터페이스 CRUD 지원 추가
- Program.cs에 MapControllers() 추가
- 비즈니스 로직과 UI 완전 분리
장점:
- 향후 UI 리뉴얼 시 API 변경 불필요
- 모바일 앱, 데스크톱 클라이언트 추가 가능
- 테스트 가능한 API 엔드포인트
테스트 결과:
✅ 블로그 API: 5개 포스트 조회
✅ 카테고리 API: 5개 카테고리 조회
✅ 문의 API: 문의 제출 성공
⚠️ 인증 API: 예정된 수정 대기
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Register IAdminUserRepository in DependencyInjection
- Add connection string to appsettings.json
- Make database migrations non-blocking (allow app to start even if DB unavailable)
- Remove UseAuthentication() middleware (using client-side JWT auth instead)
- App now runs successfully on https://localhost:5002
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- MigrationRunner: 이미 존재하는 테이블에 대한 "relation already exists" 오류 처리
- V002, V003 마이그레이션: ON CONFLICT DO NOTHING으로 멱등성 보장
- Web, Admin Program.cs: app.UseAntiforgery() 미들웨어 추가 (anti-forgery 토큰 검증)
변경사항:
- 마이그레이션 재실행 시에도 안전하게 처리
- 폼 제출 시 CSRF 공격 방지
- 관리자 로그인 페이지 405 에러 해결
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- MigrationRunner가 ~/taxbaik_active/migrations에서 직접 SQL 읽음
- 리소스 임베딩 대신 배포 디렉토리의 마이그레이션 파일 사용
- 모든 테이블 생성 및 권한 설정 완료
배포 결과:
✅ Web 서비스 실행 중 (포트 5001) - HTTP 200 OK
✅ 모든 데이터베이스 테이블 생성됨
✅ 초기 데이터 삽입됨 (카테고리 5개, 블로그 5개, 관리자 1명)
✅ 공개 접근 가능 (http://178.104.200.7/taxbaik)
✅ Nginx 라우팅 정상 작동
- CLAUDE.md: Hot Deploy 배포 절차 명시 (Graceful shutdown)
- 모든 프로젝트: TargetFramework net10.0 통일
- systemd 서비스: TimeoutStopSec=35, KillMode=mixed 추가
- Infrastructure.csproj: 마이그레이션 SQL 파일 포함 경로 수정
배포 후 실제 서버 검증 완료:
✅ Web 서비스 정상 실행 (포트 5001)
✅ Admin 서비스 정상 실행 (포트 5002)
✅ PostgreSQL 인증 및 마이그레이션 통과
✅ HTTP 응답 정상
- MigrationRunner 구현 (자동 DB 마이그레이션)
- Program.cs에 마이그레이션 자동 실행 추가
- 마이그레이션 SQL 파일을 임베드 리소스로 설정
- 완전한 배포 가이드 작성 (DEPLOYMENT_GUIDE.md)
- E2E 테스트 절차 포함
- 롤백 및 모니터링 가이드 추가
배포 준비 완료: Gitea CI/CD 자동 배포 활성화 가능
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>