Commit Graph

20 Commits

Author SHA1 Message Date
kjh2064 f2ab78dea2 수익 추적 조회 API 복원 2026-06-29 23:13:46 +09:00
kjh2064 46cb508bdf fix: Contract, TaxProfile, TaxFilingSchedule에 대해 선제적으로 GetAllAsync API 및 구현체 추가
TaxBaik CI/CD / build-and-deploy (push) Successful in 53s
2026-06-29 15:16:08 +09:00
kjh2064 ecabe8d9cc fix: ConsultingActivity 전체 조회 API 및 리포지토리/서비스 구현체 구현
TaxBaik CI/CD / build-and-deploy (push) Successful in 56s
2026-06-29 15:12:23 +09:00
kjh2064 55c65810c1 fix: RevenueTracking 전체 조회 API 및 리포지토리/서비스 구현체 구현
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m3s
2026-06-29 15:09:21 +09:00
kjh2064 e2472b7ea1 feat(portal): 고객 포털 인증과 소셜 로그인 기반 추가 2026-06-28 18:39:29 +09:00
kjh2064 033883aac5 feat(ops): 배포 알림과 텔레그램 리포트 추가 2026-06-28 18:39:28 +09:00
kjh2064 ea40e5c002 feat: foundation for CRM and tax accounting specialized features
TaxBaik CI/CD / build-and-deploy (push) Successful in 50s
Domain Layer (SOLID Foundation):
- 5 New Entities: TaxProfile, TaxFilingSchedule, ConsultingActivity, Contract, RevenueTracking
- Client entity extended with tax-specific fields
- Multi-tenant support (company_id)

Database Migration (V015):
- Create tax_profiles table for detailed tax info
- Create tax_filing_schedules for deadline tracking
- Create consulting_activities for CRM (activity history)
- Create contracts for contract management
- Create revenue_tracking for invoice and payment tracking
- Add indexes for performance optimization

Repository Interfaces:
- ITaxProfileRepository (tax profile CRUD + risk analysis)
- ITaxFilingScheduleRepository (schedule management + deadline tracking)
- IConsultingActivityRepository (CRM activity tracking)
- IContractRepository (contract lifecycle + MRR calculation)
- IRevenueTrackingRepository (invoice + payment tracking + revenue analysis)

Architecture:
- Follows Repository Pattern with clear separation of concerns
- SOLID principles: each repo = one responsibility
- Extensible design for multi-tenant support
- Supports specialized tax accounting and CRM workflows
2026-06-28 16:55:14 +09:00
kjh2064 7dd51a1169 feat: implement multi-tenant company management system
TaxBaik CI/CD / build-and-deploy (push) Successful in 48s
Architecture:
- Create companies table with company_code as unique identifier
- Add company_id foreign key to admin_users for multi-tenant support
- Implement backward compatibility with DEFAULT company for existing users

Core Components:
- Company entity with full CRUD operations
- ICompanyRepository interface following Repository pattern
- CompanyRepository with Dapper implementation
- CompanyService with business logic and validation
- CompanyController with REST API endpoints

Admin UI:
- CompanyForm reusable component (Create/Edit pattern)
- CompanyList.razor with pagination and company overview
- CompanyCreate.razor for registering new companies
- CompanyEdit.razor for managing existing companies with delete
- All pages follow admin-page-hero pattern for consistency

SOLID Principles:
- Single Responsibility: Each component has one reason to change
- Open/Closed: Extensible without modifying existing code
- Interface Segregation: Clean repository and service contracts
- Dependency Inversion: All layers depend on abstractions

Database Migration (V014):
- Creates companies table with active/inactive status
- Assigns existing admin users to DEFAULT company
- Provides foundation for role-based access control

Future Enhancement:
- Admin users can belong to specific companies
- Data filtering based on company_id (multi-tenant isolation)
- Company-based permission model
2026-06-28 16:52:22 +09:00
kjh2064 c65742a0c7 feat: implement admin inquiry create/edit/delete functionality
TaxBaik CI/CD / build-and-deploy (push) Successful in 48s
Core Components:
- Create reusable InquiryForm.razor component following SOLID principles
- Implement InquiryCreate.razor for registering new inquiries (offline, phone)
- Implement InquiryEdit.razor for modifying existing inquiries with delete
- Add DeleteAsync method to InquiryRepository and InquiryService
- Update InquiryList with 'Create' button and Edit link in table

Architecture:
- InquiryForm: Encapsulates form logic, can be reused for create/edit
- Service Layer: All operations go through InquiryService for cache invalidation
- Repository Pattern: Database operations isolated in InquiryRepository
- UI Consistency: Both pages follow admin-page-hero pattern

Features:
- Admin can create inquiries from phone/offline consultations
- Admin can modify inquiry details (name, phone, email, message, status, memo)
- Admin can delete inquiries with confirmation dialog
- All operations update dashboard cache
- Status validation and error handling throughout

Testing:
- Updated FakeInquiryRepository in tests to implement DeleteAsync
2026-06-28 16:45:29 +09:00
kjh2064 5053245575 feat: implement API-first architecture Phase 1 - Dashboard API
**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>
2026-06-28 10:41:33 +09:00
kjh2064 79492184d0 feat: CRM Phase 1-2 완성 + 시즌 시뮬레이터 + 개인정보처리방침/이용약관
TaxBaik CI/CD / build-and-deploy (push) Successful in 55s
TaxBaik Browser E2E / browser-e2e (push) Failing after 1m53s
- WBS-CRM-02: 상담 이력 (consultations 테이블 V008, ClientDetail.razor)
- WBS-CRM-03: 문의→고객 전환 (V009 client_id FK, InquiryDetail 고객등록 버튼)
- WBS-CRM-04: 신고 일정 캘린더 (tax_filings 테이블 V010, TaxFilingList.razor)
- WBS-CRM-05: 문의 상태 5단계 확장 (V011, InquiryStatus enum, InquiryList 탭)
- WBS-MKT-04: 시즌 시뮬레이터 어드민 페이지 (SeasonSimulator.razor)
- WBS-UX-04: 개인정보처리방침 /taxbaik/privacy, 이용약관 /taxbaik/terms
- Dashboard.razor 마감 임박 신고 위젯 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 00:01:16 +09:00
kjh2064 ccba017e3e feat: WBS-UX-03 FAQ 관리 기능 구현 — 어드민 CRUD + 홈페이지 DB 연동
DB:
- V007__CreateFaqs.sql: faqs 테이블 (question, answer, category,
  sort_order, is_active) + 기본 FAQ 4개 시드

Domain:
- Faq 엔티티
- IFaqRepository (GetActiveAsync, GetAllAsync, CRUD)

Infrastructure:
- FaqRepository: sort_order 정렬, CRUD

Application:
- FaqService: Categories 상수, Validate (질문·답변 필수)

Admin UI (Blazor):
- FaqList.razor: 전체 목록, 활성/비활성 상태 칩, 삭제 확인
- FaqEdit.razor: 질문/답변/카테고리/순서/활성 토글 폼
- MainLayout: 홈페이지 그룹 하위에 FAQ 관리 메뉴 추가

홈페이지:
- Index.cshtml 하드코딩 FAQ → ActiveFaqs DB 루프로 교체
- FAQ 없으면 섹션 전체 숨김 (빈 DB에 안전)
- IndexModel: FaqService 주입, Task.WhenAll 병렬 로드

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 23:39:59 +09:00
kjh2064 0e98e68532 feat: WBS-CRM-01 고객 카드 (Client Card) Phase 1 구현
DB:
- V006__CreateClients.sql: clients 테이블 (name, company_name, phone,
  email, service_type, tax_type, status, source, memo)

Domain:
- Client 엔티티
- IClientRepository (GetPagedAsync 이름/연락처/회사명 검색 + 상태 필터)

Infrastructure:
- ClientRepository: ILIKE 검색, 페이징, CRUD

Application:
- ClientService: ServiceTypes/TaxTypes/Sources 상수 정의
- CreateClientDto

Admin UI:
- ClientList.razor: 검색바 + 상태 필터 + 페이징 테이블
- ClientEdit.razor: 기본정보/세무정보/관리정보 섹션 폼
- MainLayout: 고객 관리 NavGroup 추가, 홈페이지 메뉴 그룹화

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 23:28:27 +09:00
kjh2064 46951d871a feat: 블로그 시즌 연동 — 홈페이지 세무 정보 섹션 시즌화
- 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>
2026-06-27 23:11:45 +09:00
kjh2064 cc72a67355 feat: 시즌별 마케팅 + 공지사항 관리 기능 추가
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m15s
TaxBaik Browser E2E / browser-e2e (push) Successful in 1m31s
- 연간 세무 캘린더(7개 시즌) 기반 자동 Hero 섹션 전환
- 시즌 감지 시 D-Day 카운트다운, 긴박감 배지, 시즌 CTA 표시
- 서비스 카드 순서 시즌 관련 항목 우선 정렬
- 어드민 공지사항 CRUD (등록·수정·삭제, 기간·유형 설정)
- 홈페이지 상단 공지 배너 자동 노출 (일반/배너/긴급)
- CLAUDE.md에 세무 캘린더 및 마케팅 방향 하네스 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 22:45:55 +09:00
kjh2064 f29f2c3cff 개선: 배포 검증과 관리자 UX 안정화
TaxBaik Browser E2E / browser-e2e (push) Failing after 1m3s
TaxBaik CI/CD / build-and-deploy (push) Failing after 2m46s
2026-06-27 20:57:09 +09:00
kjh2064 28060b71be feat: harden auth ops and deployment baseline 2026-06-27 10:53:53 +09:00
kjh2064 e22cfb1ac5 feat: REST API 계층 추가 - 완벽한 MVC/API 분리
TaxBaik CI/CD / build-and-deploy (push) Failing after 43s
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>
2026-06-26 22:52:48 +09:00
kjh2064 f4eeeb9ec0 추가: 초기 관리자 계정 및 블로그 포스트 5개
- 초기 관리자: admin / admin123
- 블로그 포스트 5개 자동 생성
- AdminUserRepository 구현
- CreateBlogPostDto 추가

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-26 15:18:01 +09:00
kjh2064 d5918c562c 구현: W2 도메인·인프라·서비스 레이어
Domain 레이어:
- Enums: InquiryStatus (New/Contacted/Contracted/Closed)
- Enums: ServiceType (기장/종소세/부가세/양도세/증여상속/기타)
- Entities: Category, BlogPost, Inquiry, AdminUser (DB 매핑)
- Interfaces: IBlogPostRepository, ICategoryRepository, IInquiryRepository, IDbConnectionFactory

Infrastructure 레이어:
- DbConnectionFactory: PostgreSQL 연결 팩토리 (Npgsql)
- BlogPostRepository: GetBySlug, GetPublishedPaged, Create, Update, Delete, IncrementViewCount
- CategoryRepository: GetAll, GetBySlug
- InquiryRepository: Create, GetPaged, UpdateStatus
- NuGet 의존성: Dapper 2.1.15, Npgsql 8.0.1, Configuration, DependencyInjection
- DependencyInjection: AddInfrastructure() 확장 메서드

기술 결정:
- Dapper로 SQL 완전 제어
- PostgreSQL 다중 쿼리 (QueryMultiple) 페이징 최적화
- 한국어 파라미터 처리 (::int, ::text 타입 명시)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-26 15:06:22 +09:00