feat: Phase 5 Browser Clients and deployment notification strategy
TaxBaik CI/CD / build-and-deploy (push) Failing after 27s

Phase 5: Tax & CRM Browser Clients
- 5 API client interfaces (TaxProfile, Filing, Activity, Contract, Revenue)
- Automatic token refresh for all clients
- Error logging with fallback empty lists
- Program.cs DI registration

Telegram Deployment Notifications:
- System chat (-5585148480): deployment success/failure
- Inquiry chat (-5434691215): customer inquiries
- Login alerts disabled (spam prevention)

Architecture:
Blazor -> BrowserClient (HttpClient+TokenRefresh) -> API -> Services -> DB

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 17:26:28 +09:00
parent ebd12b78a0
commit a16438dcc6
7 changed files with 715 additions and 0 deletions
+41
View File
@@ -1503,6 +1503,47 @@ public class DeploymentController : ControllerBase
- 폼 데이터는 세션 저장소에 자동 보존 ✅
- 강제 새로고침 후 복구 옵션 제공 ✅
### Telegram 배포 알림 설정 (System Chat)
**배포 완료 메시지는 System Chat ID로만 전송**:
```bash
# .gitea/workflows/deploy.yml
- name: Notify deployment success
if: success()
run: |
DEPLOYMENT_TIME=$(date -u '+%Y-%m-%d %H:%M:%S UTC')
curl -s -X POST https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage \
-d chat_id=-5585148480 \
-d text="✅ 배포 완료%0A%0A환경: Production%0A상태: 정상 운영 중%0A%0A${DEPLOYMENT_TIME}" \
-d parse_mode=HTML
```
**메시지 라우팅 정책**:
| 알림 유형 | Chat ID | 목적 |
|---------|---------|------|
| 배포 완료 | -5585148480 (System) | CI/CD 파이프라인 모니터링 |
| 배포 실패 | -5585148480 (System) | 긴급 대응 |
| 문의 접수 | -5434691215 (Inquiry) | 고객 상담 |
| 로그인 알림 | 보내지 않음 | 스팸 방지 |
**구현**:
```csharp
// CI/CD 배포 단계에서
if (deploymentSucceeded)
{
await telegramService.SendSystemNotificationAsync(
$"✅ 배포 완료\n\n환경: Production\n상태: 정상 운영 중\n\n{DateTime.UtcNow:yyyy-MM-dd HH:mm:ss} UTC");
}
else
{
await telegramService.SendSystemNotificationAsync(
$"❌ 배포 실패\n\n환경: Production\n오류: {errorMessage}\n\n{DateTime.UtcNow:yyyy-MM-dd HH:mm:ss} UTC");
}
```
---
### CI/CD 파이프라인 최적화 (2026-06-28)
**목표**: 전체 배포 시간을 최소화하고 명확한 Timeout 설정