Commit Graph

15 Commits

Author SHA1 Message Date
kjh2064 e2472b7ea1 feat(portal): 고객 포털 인증과 소셜 로그인 기반 추가 2026-06-28 18:39:29 +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 71d5d2cc1f docs: update guidelines and test account configuration to reflect current API-first implementation
TaxBaik CI/CD / build-and-deploy (push) Successful in 55s
- Update E2E testing section with test_admin account details (TestAdmin@123456)
- Add comprehensive admin account management via API (reset-password endpoint)
- Update migration comments to reference API-based password setting
- Align E2E workflow with Green-Blue deployment support (Nginx routing)
- Add backup policy documentation (daily 02:00 AM, 30-day retention)
- Clarify test account isolation for repeatable E2E execution

Current Status:
 Phase 5: JWT token improvements (15m access + 7d refresh)
 Phase 7: API-First migration (9 Blazor pages, 6 controllers, 5 clients)
 Phase 6: SignalR notifications (stateless broadcast)
 Green-Blue deployment infrastructure (Nginx routing, configurable API port)
 Automated backups (daily PostgreSQL pg_dump)
 E2E testing with separate test_admin account

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 12:07:44 +09:00
kjh2064 db81f94051 feat: implement API-based account management with test account
TaxBaik CI/CD / build-and-deploy (push) Successful in 49s
- Add Admin:PasswordResetToken configuration for secure password reset API
- Create V012 migration: Add test_admin account for E2E testing
- Create V013 migration: Ensure admin and test_admin accounts exist
- Use reset-password API endpoint instead of manual bcrypt hashing
- Test accounts now managed via API (not migrations/seeds)

Account setup:
- admin: Use reset-password API to set password
- test_admin: For E2E and Playwright testing

API Verification:
 POST /api/auth/login - test_admin login successful
 POST /api/auth/reset-password - Password reset working
 GET /api/inquiry - Returns 205 inquiries (test data)
 GET /api/faq - FAQ data accessible
 GET /api/admin/dashboard/summary - Dashboard API working

Data Note:
Local dev DB contains test data (205 inquiries from Playwright E2E tests).
Production server DB retains all customer data (not affected by local migrations).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 11:55:53 +09:00
kjh2064 65241c453c test: use dedicated test account for e2e responsive testing
Previously, responsive tests used the 'admin' production account,
which violates testing best practices and can contaminate live data.

Changes:
- Add test_admin account (password: test123456) to V003 migration
- Update all responsive test cases to use test_admin instead of admin
- Add setupTestData() helper for API-based test data preparation
- Improve test isolation and repeatability
- Document that test account is for development/testing only

Test improvements:
- Tests now use separate test_admin account
- Tests can run repeatedly without affecting production admin
- API layer ready for test data setup via authorization tokens
- Test data can be created/cleaned up programmatically

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 11:31:37 +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 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 e7e01d0cd8 마이그레이션 및 보안 수정
TaxBaik CI/CD / build-and-deploy (push) Failing after 15s
- 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>
2026-06-26 16:46:36 +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 303ba49292 Remove regional specificity, focus on nationwide positioning
- Change site description from '성북구 세무사' to nationwide professional
- Update positioning from '일상 자산 세금 파트너' to '맞춤형 세무 파트너'
- Replace Seongbuk-gu specificity with skill-based positioning
- Align with online-first service model (no local restriction)
- Update examples in documentation

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-26 15:02:45 +09:00
kjh2064 88409b8fea Add deployment infrastructure and development guide
- db/migrations/: V001 (schema) + V002 (seed data) SQL files
- deploy/: systemd service files (taxbaik.service, taxbaik-admin.service)
- deploy/: Nginx location block configuration
- .gitea/workflows/deploy.yml: CI/CD pipeline (build, test, deploy)
- CLAUDE.md: Comprehensive development guidelines (9 sections)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-26 14:59:51 +09:00