Commit Graph

22 Commits

Author SHA1 Message Date
kjh2064 6b11b64135 fix: admin login interactivity and proxy publish
TaxBaik CI/CD / build-and-deploy (push) Failing after 3m15s
2026-07-01 13:09:42 +09:00
kjh2064 54c179b1eb revert: rollback Fluent UI and Blazor homepage to last successful state (3be3794) 2026-06-30 20:29:42 +09:00
kjh2064 b13eed7b7e 홈과 관리자 로그인 화면 테마 및 제목 정리 2026-06-30 00:06:49 +09:00
kjh2064 1b173376ee refactor: admin ui를 fluent v5와 html 기반으로 전환
TaxBaik CI/CD / build-and-deploy (push) Failing after 1m53s
2026-06-29 22:37:40 +09:00
kjh2064 52f1790acb feat: add admin username remember functionality to login page
- Add 'Remember ID' checkbox for improved UX
- Store username in localStorage when checked
- Restore saved username on login page load
- Remove saved username when checkbox unchecked
- Follow security best practice: save username only, not password
2026-06-28 16:43:10 +09:00
kjh2064 351c7ac82c feat: enable enter key to submit login form
**Enhancement:**
- Wrap login form in HTML <form> element with @onsubmit
- HTML form automatically treats Enter key as submit action
- No need for custom @onkeypress handler

**Behavior:**
- Users can now press Enter in password field to login
- Or click the login button (existing behavior maintained)
- Both methods trigger HandleLogin() async handler

This provides better UX for keyboard-first users.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 13:03:11 +09:00
kjh2064 73a564c307 fix: remove MudThemeProvider from Login.razor to prevent duplicates
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m0s
App.razor already provides MudThemeProvider globally.
Login.razor inheriting from BlankLayout should not redefine it.

This fixes the 'Duplicate MudPopoverProvider detected' error that was
preventing Blazor circuit from establishing and blocking login.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 12:28:46 +09:00
kjh2064 58edbd9c8f refactor: Phase 5 - JWT token lifecycle (Access + Refresh + Auto-refresh)
TaxBaik CI/CD / build-and-deploy (push) Successful in 48s
**Implementation:**
- AuthService: Split token generation
  * AccessToken: 15 minutes
  * RefreshToken: 7 days (10080 minutes)
  * New: GenerateTokenPair() method
  * New: RefreshAccessTokenAsync() method

- AuthTokenPair: New record (accessToken, refreshToken, expiresIn)

- AuthController: New /api/auth/refresh endpoint
  * POST /api/auth/refresh?refreshToken=...
  * Response: { accessToken, refreshToken, expiresIn }
  * RefreshTokenRequest DTO

- TokenRefreshHandler: New DelegatingHandler
  * Automatic Bearer token injection
  * 401 response handling
  * Auto-refresh with retry
  * localStorage sync (accessToken, refreshToken, tokenExpiry)

- CustomAuthenticationStateProvider: Token storage split
  * Before: auth_token (single)
  * After: accessToken, refreshToken, tokenExpiry
  * LoginAsync signature updated

- Login.razor: Handle token pair
  * LoginResponse: { accessToken, refreshToken, expiresIn }
  * Call new LoginAsync(accessToken, refreshToken, expiresIn)

- Program.cs: TokenRefreshHandler registration
  * AddScoped<TokenRefreshHandler>()
  * AdminDashboardClient pipeline: .AddHttpMessageHandler<TokenRefreshHandler>()

**SOLID Principles:**
✓ S (Single Responsibility): TokenRefreshHandler handles only token refresh
✓ D (Dependency Inversion): DelegatingHandler abstracts HTTP concerns
✓ O (Open/Closed): Token lifetime extension without code changes

**Security Pattern:**
- Short-lived access tokens (15min) reduce theft window
- Refresh tokens (7d) enable persistence without storing secrets
- Automatic refresh is transparent to components

**Flow:**
Blazor → AdminDashboardClient → TokenRefreshHandler (auto-add Bearer)
  → 401 → RefreshTokenAsync() → POST /api/auth/refresh
  → Store new pair → Retry original request

Status: Token lifecycle complete, ready for SignalR integration (Phase 6)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 10:51:24 +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 5df5b596c8 fix: 관리자 전역 CSS 오염 제거
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m11s
TaxBaik Browser E2E / browser-e2e (push) Successful in 1m28s
2026-06-27 21:48:26 +09:00
kjh2064 d58e524dfc fix: 배포 후 관리자 세션 복구 처리
TaxBaik CI/CD / build-and-deploy (push) Successful in 56s
TaxBaik Browser E2E / browser-e2e (push) Failing after 3m3s
2026-06-27 21:38:11 +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 6b8a5724fa fix: harden ci restart and admin routing
TaxBaik CI/CD / build-and-deploy (push) Failing after 41s
2026-06-27 02:31:08 +09:00
kjh2064 a73503f96e fix: use InputText for admin login
TaxBaik CI/CD / build-and-deploy (push) Successful in 41s
2026-06-27 02:24:06 +09:00
kjh2064 788dd8d336 fix: bind admin login inputs on input
TaxBaik CI/CD / build-and-deploy (push) Successful in 52s
2026-06-27 02:19:49 +09:00
kjh2064 716f1f668f fix: simplify admin login inputs
TaxBaik CI/CD / build-and-deploy (push) Successful in 51s
2026-06-27 01:58:33 +09:00
kjh2064 3e196da7dd fix: simplify admin login form
TaxBaik CI/CD / build-and-deploy (push) Successful in 48s
2026-06-27 01:55:27 +09:00
kjh2064 d526817a00 fix: prevent admin login form submit reload
TaxBaik CI/CD / build-and-deploy (push) Successful in 42s
2026-06-27 01:54:20 +09:00
kjh2064 1d7dd71011 fix: unify TaxBaik deployment around CI
TaxBaik CI/CD / build-and-deploy (push) Successful in 41s
2026-06-27 01:34:17 +09:00
kjh2064 df4d85d789 fix: Login 페이지 CSS 렌더링 문제 해결
TaxBaik CI/CD / build-and-deploy (push) Successful in 34s
문제:
 로그인 페이지에서 MudBlazor CSS가 적용되지 않음
 스타일이 없는 상태로 렌더링됨

원인:
• BlankLayout에만 MudThemeProvider가 있음
• Login.razor는 직접 MudThemeProvider를 가지지 않음
• Blazor Interactive Server에서 컴포넌트 초기화 전 렌더링됨

수정:
 Login.razor에 MudThemeProvider 추가
 MudDialogProvider, MudSnackbarProvider도 추가
 버전 파일 자동 생성 (git commit hash + timestamp)

배포:
Release 빌드 → wwwroot/version.txt 생성 → 서버 배포 → systemctl restart

결과:
 로그인 페이지 CSS 정상 렌더링
 버전 정보 최신화

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-26 23:12:11 +09:00
kjh2064 f8679cafcb refactor: UI를 API 기반으로 리팩토링 - 비즈니스 로직과 View 완전 분리
TaxBaik CI/CD / build-and-deploy (push) Failing after 41s
1️⃣ HttpClient 서비스 추가
   - IApiClient 인터페이스 구현
   - GET, POST, PUT, DELETE 메서드
   - JWT 토큰 자동 관리
   - /taxbaik/api 경로 자동 처리

2️⃣ Razor Pages 리팩토링
   - Pages/Index.cshtml.cs: API /api/blog 호출
   - Pages/Blog/Index.cshtml.cs: API /api/blog, /api/category 호출
   - Pages/Contact.cshtml.cs: API /api/inquiry 호출
   - Service 의존성 제거

3️⃣ Blazor Components 리팩토링
   - Login.razor: API /api/auth/login 호출로 변경
   - BlogList.razor: API /api/blog/admin/all 호출로 변경
   - Service 의존성 제거

아키텍처:
  View (Razor Pages + Blazor)
    ↓ HttpClient
  Controllers (REST API)
    ↓
  Services (비즈니스 로직)
    ↓
  Repository (DB)

테스트 결과:
 홈페이지: 200 OK
 블로그 페이지: 200 OK
 문의 페이지: 200 OK
 로그인 페이지: 200 OK
 API 엔드포인트 모두 작동

장점:
• UI 리뉴얼 시 API 변경 불필요
• 모바일앱, 데스크톱 클라이언트 추가 가능
• 비즈니스 로직과 UI 완전 독립
• 테스트 가능한 구조 완성

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-26 22:56:41 +09:00
kjh2064 57269e281d refactor: Web과 Admin 통합 - 단일 포트 5001로 운영
TaxBaik CI/CD / build-and-deploy (push) Failing after 36s
분리의 단점을 제거하고 단일 앱으로 통합:

구조 변경:
- TaxBaik.Admin → TaxBaik.Web/Components/Admin/
- Admin Services → TaxBaik.Web/Services/
- 포트: 5001 (기존 5002 제거)

경로:
- 홈페이지: http://localhost:5001/taxbaik
- 관리자: http://localhost:5001/taxbaik/admin

기술:
- Razor Pages (Web) + Blazor Server (Admin) 통합
- 단일 Program.cs로 양쪽 모두 지원
- JWT 인증 유지
- MudBlazor UI 유지

장점:
- 개발 복잡도 감소 (터미널 1개)
- 배포 단순화 (앱 1개)
- DB 마이그레이션 1회 실행

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