Compare commits

..

2 Commits

341 changed files with 6183 additions and 16345 deletions
+2 -20
View File
@@ -49,13 +49,12 @@ jobs:
# Suppress stderr and allow failures to handle transition/down periods cleanly
VERSION_BODY="$(curl -fsS "http://${DEPLOY_HOST}/taxbaik/version.json" 2>/dev/null || true)"
BLOG_STATUS="$(curl -s -o /dev/null -w '%{http_code}' "http://${DEPLOY_HOST}/taxbaik/blog/accountant-mistakes-5" || true)"
LOGIN_STATUS="$(curl -s -o /dev/null -w '%{http_code}' "http://${DEPLOY_HOST}/taxbaik/admin/login" || true)"
if echo "$VERSION_BODY" | grep -q "\"version\": \"${SHORT_VERSION}\"" && [ "$BLOG_STATUS" = "200" ] && [ "$LOGIN_STATUS" = "200" ]; then
if echo "$VERSION_BODY" | grep -q "\"version\": \"${SHORT_VERSION}\"" && [ "$BLOG_STATUS" = "200" ]; then
echo "✓ Deployment ready for ${SHORT_VERSION} (attempt $i/20)"
exit 0
fi
if [ $i -lt 20 ]; then
echo " Attempt $i/20: waiting for deployment... (blog=${BLOG_STATUS:-?}, login=${LOGIN_STATUS:-?}, version=${VERSION_BODY:0:30}...)"
echo " Attempt $i/20: waiting for deployment... (blog=${BLOG_STATUS:-?}, version=${VERSION_BODY:0:30}...)"
sleep 3
fi
done
@@ -73,23 +72,6 @@ jobs:
echo "Running E2E tests on Desktop Chrome (production verification)"
npx playwright test --project="Desktop Chrome" --reporter=html --reporter=list
- name: API smoke verification
env:
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
E2E_ADMIN_USERNAME: test_admin
E2E_ADMIN_PASSWORD: TestAdmin@123456
run: |
set -e
TOKEN="$(curl -s -X POST "http://${DEPLOY_HOST}/taxbaik/api/auth/login" -H "Content-Type: application/json" -d "{\"username\":\"${E2E_ADMIN_USERNAME}\",\"password\":\"${E2E_ADMIN_PASSWORD}\"}" | python3 -c 'import sys, json; print(json.load(sys.stdin)["accessToken"])')"
test -n "$TOKEN"
curl -fsS -H "Authorization: Bearer $TOKEN" "http://${DEPLOY_HOST}/taxbaik/api/blog/admin?page=1&pageSize=1" >/dev/null
curl -fsS -H "Authorization: Bearer $TOKEN" "http://${DEPLOY_HOST}/taxbaik/api/faq" >/dev/null
curl -fsS -H "Authorization: Bearer $TOKEN" "http://${DEPLOY_HOST}/taxbaik/api/announcement" >/dev/null
curl -fsS -H "Authorization: Bearer $TOKEN" "http://${DEPLOY_HOST}/taxbaik/api/inquiry?page=1&pageSize=1" >/dev/null
curl -fsS "http://${DEPLOY_HOST}/taxbaik/favicon.svg" >/dev/null
curl -fsS "http://${DEPLOY_HOST}/taxbaik/favicon.ico" >/dev/null
curl -fsS "http://${DEPLOY_HOST}/taxbaik/robots.txt" >/dev/null
- name: Browser E2E summary
if: always()
run: |
+9 -26
View File
@@ -33,9 +33,6 @@ jobs:
- name: Publish Web
run: dotnet publish TaxBaik.Web/ -c Release -o ./publish --no-restore
- name: Publish Proxy
run: dotnet publish TaxBaik.Proxy/ -c Release -o ./publish/proxy
- name: Write production secrets
run: |
set -e
@@ -70,13 +67,8 @@ jobs:
)'
test -s ./publish/appsettings.Production.json || { echo "appsettings.Production.json is empty" >&2; exit 1; }
- name: Verify proxy artifact
run: |
test -s ./publish/proxy/TaxBaik.Proxy.dll || { echo "TaxBaik.Proxy.dll missing" >&2; exit 1; }
test -s ./publish/proxy/TaxBaik.Proxy.runtimeconfig.json || { echo "TaxBaik.Proxy.runtimeconfig.json missing" >&2; exit 1; }
- name: Copy migrations
run: mkdir -p ./publish/db && cp -r db/migrations ./publish/db/ || true
run: cp -r db/migrations ./publish/migrations || true
- name: Generate build info
run: |
@@ -108,14 +100,12 @@ jobs:
- name: Package artifact
run: |
cp deploy_gb.sh ./publish/deploy_gb.sh
tar -czf taxbaik_deploy.tgz -C ./publish .
echo "✓ Package: $(du -sh taxbaik_deploy.tgz | cut -f1)"
- name: Deploy & verify on server
run: |
set -e
export TAXBAIK_DEPLOY_FROM_CI=1
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
COMMIT=$(git rev-parse --short HEAD)
DEPLOY_HOST="${{ secrets.DEPLOY_HOST }}"
@@ -158,7 +148,7 @@ jobs:
# 2. 서버에서 배포 + 헬스 체크 (SSH 1회 연결로 처리, Green-Blue 지원)
ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes \
-o ServerAliveInterval=10 \
"$DEPLOY_USER@$DEPLOY_HOST" TAXBAIK_DEPLOY_FROM_CI=1 bash << REMOTE
"$DEPLOY_USER@$DEPLOY_HOST" bash << REMOTE
set -e
DEPLOY_HOME="/home/kjh2064"
DEPLOY_DIR="\$DEPLOY_HOME/deployments/taxbaik_${TIMESTAMP}"
@@ -172,12 +162,12 @@ jobs:
echo "--- [2/5] 운영 설정 검증 ---"
test -s "\$DEPLOY_DIR/appsettings.Production.json" \
|| { echo "FATAL: appsettings.Production.json 없음" >&2; exit 1; }
test -s "\$DEPLOY_DIR/proxy/TaxBaik.Proxy.dll" \
|| { echo "FATAL: TaxBaik.Proxy.dll 없음" >&2; exit 1; }
echo "--- [3/4] Green-Blue 배포 실행 ---"
chmod +x "\$DEPLOY_DIR/deploy_gb.sh"
"\$DEPLOY_DIR/deploy_gb.sh" "\$DEPLOY_DIR"
echo "--- [3/5] 심볼릭 링크 전환 ---"
ln -sfn "\$DEPLOY_DIR" "\$DEPLOY_HOME/taxbaik_active"
echo "--- [4/5] 서비스 재시작 ---"
sudo /usr/bin/systemctl restart taxbaik
echo "--- [5/5] 헬스 체크 (최대 60초) ---"
ATTEMPTS=20
@@ -201,20 +191,13 @@ jobs:
fi
echo "✓ [3/4] 버전 정보 확인 완료"
# 검증 4: 5001 프록시 확인
if ! ss -tlnp | grep -q ':5001 '; then
echo "❌ 5001 프록시가 실행 중이 아님" >&2
exit 1
fi
echo "✓ [4/5] 5001 프록시 확인 완료"
# 검증 5: 관리자 로그인 페이지
# 검증 3: 관리자 로그인 페이지
LOGIN_STATUS=\$(curl -sf -o /dev/null -w '%{http_code}' http://127.0.0.1:5001/taxbaik/admin/login 2>/dev/null || echo "000")
if [ "\$LOGIN_STATUS" != "200" ]; then
echo "❌ 관리자 로그인 페이지 로드 실패 (상태: \$LOGIN_STATUS)" >&2
exit 1
fi
echo "✓ [5/5] 관리자 페이지 로드 완료"
echo "✓ [4/4] 관리자 페이지 로드 완료"
echo "✓ 서비스 정상 (시도 \$i/\$ATTEMPTS)"
# 구 배포 디렉토리 정리 (최근 5개 보존)
-777
View File
@@ -1,777 +0,0 @@
# 블로그 포스트 작성 템플릿
## 정확성 원칙 (법적 책임 수반)
블로그는 **사실 기반, 세법 기반, 데이터 기반**이어야 합니다. 추측이나 예상은 법적 문제를 일으킬 수 있습니다.
### 절대 금지 표현
- "아마도", "할 것 같다", "추측된다" (추측)
- "대략", "정도일 거다", "보통" (예상)
- "좋을 것 같다", "나쁠 것 같다" (의견)
- 증거 없는 "모두", "항상", "누구나" (일반화)
- 출처 없는 통계 ("80% 고객이", "평균 X만 원")
### 필수 요소
**1. 세법 기반**:
- 모든 주장에 세법/시행령/고시 인용
- 조항 명시: "소득세법 제XX조에 따르면"
- 최신 기준 명시: "2025년 기준"
- 변경사항 반영: "전년도와 다르게..."
**2. 사실 기반**:
- 실제 일어난 고객 사례만 사용
- 가정일 경우 명시: "예를 들어, 만약 이렇다면"
- 가상 사례는 "예시 사례"라고 명확히
- 개인정보는 익명화 (이름, 나이는 일반적인 표현)
**3. 데이터 기반**:
- 객관적 수치만 사용 (국세청 통계, 협회 자료)
- 출처 명시: "2025년 세무청 통계에 따르면"
- 구체적 금액: "약 50만 원" (범위 표현)
- 비교 데이터: "작년 대비 X% 증가"
**4. 사례 제시 시 확인 사항**:
```
✅ 실제 고객인가? (공개 가능한 정보만)
✅ 세법을 정확하게 적용했는가?
✅ 금액 계산이 정확한가?
✅ 이 사례가 대표적인가? (극단적 사례면 명시)
✅ 다른 고객에게도 적용 가능한가?
```
---
## 카테고리 필수 규칙
**모든 블로그 포스트는 반드시 하나의 카테고리에 할당되어야 합니다. (NOT NULL)**
### 카테고리별 포스트 배치
| 카테고리 | 최소 포스트 | 주제 범위 |
|---------|-----------|---------|
| 사업자 세무 | 3개 | 기장, 세무신고, 부가세, 종합소득세 |
| 부동산 세금 | 3개 | 월세, 양도세, 상속세(부동산) |
| 종합소득세 | 3개 | 프리랜서, 부업, 경비 처리 |
| 부가가치세 | 3개 | 신고, 기한, 간이과세 vs 일반과세 |
| 가족자산·증여 | 3개 | 자녀 증여, 상속, 자산 이전 |
### 카테고리 할당 규칙
1. **명확한 주제 분류**: 포스트 내용이 카테고리 범위에 명확하게 해당
2. **중복 금지**: 한 포스트는 정확히 하나의 카테고리에만 할당
3. **균형 배치**: 각 카테고리당 최소 3개씩 (고객 검색 UX)
4. **검색 최적화**: 고객이 카테고리로 찾을 때 관련 포스트 3개 이상 노출
### 카테고리 미할당 시 (오류)
- ❌ category_id = NULL (데이터베이스 제약 위반)
- ❌ SQL 실행 실패 (NOT NULL 제약)
- ❌ 블로그 페이지 노출 불가
**이 규칙은 모든 포스트 생성/수정 시 필수 준수사항입니다.**
---
## 핵심 철학: 고객이 느끼는 여정
### 1️⃣ 기초: "이 정도는 할 수 있어요"
- 고객이 배울 수 있는 기본 개념
- 실제 사례로 구체화
- 단계별 설명
### 2️⃣ 현실: "하지만 복잡하네요"
- 겹겹이 쌓인 세부사항들
- 매년 바뀌는 세법
- "이거 일일이 다 챙기기 어렵다"는 느낌
### 3️⃣ 해결: "세무사와 함께면 괜찮아요"
- 디테일 자동 관리
- 세법 변화 자동 반영
- 고객은 사업에만 집중
---
**고객이 글을 읽은 후 느끼는 것**:
1️⃣ 읽고 나서: "아, 이 정도는 내가 할 수 있겠네"
2️⃣ 생각해보니: "근데 이 모든 걸 매년 챙기기는... 힘들겠는데?"
3️⃣ 결론: "그럼 전문가 도움을 받는 게 낫겠다"
→ 자연스럽게 세무사의 필요성을 깨달음 (강요 아님)
---
## 템플릿 (복사해서 사용)
### Step 1: 도입부 (공감)
```markdown
# [제목]
"[구체적 상황]?"
"많은 [직업]들이 이 상황을 겪습니다."
→ 독자가 자신의 상황을 발견하도록
```
**예시**:
```markdown
# 동네 카페 월세 낼 때 세금이 안 나와요 - 정말 그럴까?
"사업을 시작했는데 세금을 낸 적이 없어요"
"많은 소규모 사업자들이 이렇게 생각합니다."
```
---
### Step 2: 실제 사례 (구체적 페르소나)
**필수 정보**:
- 이름, 나이, 직업, 사업 경력
- 월/연간 매출 (현실적 수치)
- 실제 겪은 문제/성공 사례
```markdown
### 상황: [지역] [카테고리]를 운영하는 [이름]님 ([나이]세, 사업 [년]차)
**기본 정보**:
- 위치: [구체적 위치]
- 월 매출: [금액]
- 월 경비: [주요 항목들]
### 원래는 이렇게 했어요 (실패 사례)
→ [실제 실수 1]
→ [실제 실수 2]
**결과**: 세금을 [X만 원] 더 내게 됨 (또는 세무조사 대상)
### 바뀐 후 (성공 사례)
→ [해결책 1]
→ [해결책 2]
**결과**: 세금을 [X만 원] 절약함 (또는 안정적인 운영)
```
**예시**:
```markdown
### 상황: 강남 역삼동에서 카페를 운영하는 김민수님 (34세, 사업 3년차)
**기본 정보**:
- 위치: 강남역 3번 출구 근처
- 월 매출: 약 600만 원 (평일 200만, 주말 400만)
- 월 경비: 월세 150만, 재료비 180만, 직원급여 100만 원
### 원래는 이렇게 했어요
→ "세금은 큰 회사나 내는 거라고 생각했어요"
→ 영수증도 대충 정리하고
**결과**: 세무청에서 3년치를 추징받고 가산세까지...손해 70만 원
### 바뀐 후
→ 매달 영수증을 정리해서
→ 세무사와 년 1회 기장 상담
**결과**: 세금도 명확하고, 추징도 없음. 심플하고 안전
```
---
### Step 3: 계산 & 설명
**구조**:
1. **기본 정보 확인** (위에서 제시한 사례 요약)
2. **단계별 계산** (Step 1, Step 2, ... 명확히)
3. **표로 시각화**
```markdown
## 계산 방법
### Step 1️⃣: 매출 정리
월 600만 원 × 12개월 = 연 7,200만 원
### Step 2️⃣: 경비 계산
월 경비 구성:
- 월세: 150만 원 (연 1,800만 원)
- 재료비: 180만 원 (연 2,160만 원)
- 직원급여: 100만 원 (연 1,200만 원)
- 기타: 20만 원 (연 240만 원)
- **월 합계: 450만 원**
- **연 합계: 5,400만 원**
### Step 3️⃣: 순이익
7,200만 - 5,400만 = **1,800만 원**
### Step 4️⃣: 세금
1,800만 원 × 약 6% = **약 108만 원/년**
```
---
### 🎭 Step 3.5: 악마는 디테일이다 (선택사항이지만 강력함)
**구조**: "간단해 보이지만, 실제로는..."
```markdown
## 겉으로는 간단해 보여요... 하지만
### 📄 "영수증을 정리하세요"라고 했는데
**겉으로는**:
→ 영수증을 모으기만 하면 돼
**현실의 디테일**:
→ 이 영수증은 인정되고, 이건 안 됨 (세법)
→ 이건 개인비? 사업비? (판단)
→ 카드값이랑 현금값이랑 다르면? (대사)
→ 3년 지났는데 영수증을 못 찾으면? (소송)
→ 세무청이 불인정하면? (항의 절차)
**세무사가 처리하는 것**:
✅ 어떤 영수증이 인정될지 사전에 판단
✅ 개인비와 사업비의 경계 명확히
✅ 세법 변경사항 적용
✅ 세무청 부인시 대응 준비
---
### 📊 "매출과 경비를 기록하세요"라고 했는데
**겉으로는**:
→ 엑셀에 숫자만 입력하면 돼
**현실의 디테일**:
→ 카드 명세서와 입금액이 안 맞음 (환불? 수수료?)
→ 한 달간 매출을 빼먹음 (추가 계산)
→ 같은 카테고리인데 세법상 다르게 분류돼야 함 (부가세/소득세 다름)
→ 작년에 잘못 입력한 게 발견됨 (수정신고)
→ 월별로 편차가 커서 세무청이 의심함 (설명 준비)
**세무사가 처리하는 것**:
✅ 카드명세서 vs 입금액 정산
✅ 누락된 부분 찾아서 추가
✅ 세법상 올바른 분류
✅ 이전년도 오류 수정신고
✅ 세무청 질의에 대한 근거 제시
---
### ✅ "정확하게 기장하면 세금이 확정돼요"라고 했는데
**겉으로는**:
→ 기장만 잘하면 세금 끝
**현실의 디테일**:
→ 같은 사업도 절세 방법이 다양함 (어떤 게 맞나?)
→ 올해는 이렇게, 내년은 저렇게? (일관성)
→ 부가세와 소득세 둘 다 고려해야 함 (연계 계산)
→ 세무조사가 오면 3년치를 모두 봄 (소급 처리)
→ 이의신청/항소하려면? (법적 절차)
**세무사가 처리하는 것**:
✅ 최적의 절세 전략 제시
✅ 연도별 일관된 기장 방식 유지
✅ 부가세/소득세 동시 최적화
✅ 세무조사 대비 사전 정리
✅ 이의신청/항소 등 법적 대응
```
**💡 핵심**:
- 기초는 누구나 배울 수 있어요
- **하지만 디테일을 모두 처리하려면?**
- **그 디테일들이 바로 세무사가 하는 일**
- **디테일 하나 놓쳤다가 가산세 50만 원... 이래서 세무사 비용이 아깝지 않음**
---
### 🔄 Step 3.6: 세법은 계속 바뀐다 (매년 업데이트)
**구조**: "올해의 세법 변화"를 포스트 작성 시점에 맞춰 갱신
```markdown
## 그런데 세법은 해마다 바뀝니다
### 📋 [연도] 변경사항들 (꼭 알아야 할 것들)
**✅ 2025년 부가세 변화**:
- 신고 기한이 [날짜]로 변경됨
- 영세사업자 기준이 [금액]로 상향조정됨
- 새로운 공제 항목이 추가됨: [항목들]
**✅ 2025년 소득세 변화**:
- 기본공제가 [금액]에서 [금액]로 증가
- 자녀 공제 조건이 변경됨
- 월급 원천징수 기준이 조정됨
**✅ 2025년 새로운 제도**:
- 소상공인 세금 감면 확대
- 청년사업자 지원 강화
- 부가가치세 간편신청 범위 확대
---
**혼자서 할 때의 문제**:
❌ "작년 기준으로 기장했는데 올해 기준이 바뀐 거야?"
❌ "이 공제가 되는 건지 안 되는 건지 모르겠어"
❌ "새로운 제도가 나왔다는 것도 몰랐어"
❌ "처음 다시 계산해야 하나?"
**세무사가 처리하는 것**:
✅ 매년 변경사항 자동 추적
✅ 당신의 상황에 맞는 새로운 공제 적용
✅ 이전년도 재계산 필요시 수정신고
✅ 연중 세법 개정 소식 안내
✅ 새로운 지원 정책 놓치지 않게 관리
---
## 결과 비교: 혼자 할 때 vs 세무사와 함께
**세법 변화 추적**
- 혼자: "어? 규칙이 바뀌었네?"
- 세무사: 자동으로 적용됨
**새로운 공제**
- 혼자: 놓치기 쉬움
- 세무사: 모두 적용됨
**매년 재계산**
- 혼자: 직접 해야 함
- 세무사: 자동 갱신
**마음 편함**
- 혼자: 불안감 ("맞나?")
- 세무사: 확신 ("전문가가 관리")
**투자 시간**
- 혼자: 당신의 시간
- 세무사: 포함 (전문가 비용)
---
## 요약: 왜 세무사가 필요한가
**기초는 배울 수 있지만**:
- 세법은 매년 바뀌고
- 당신은 본업이 있어서 추적이 어렵고
- 실수 하나가 가산세 50만 원...
**그래서 세무사가 있으면**:
- 변화를 자동으로 적용해주고
- 새 제도도 놓치지 않아주고
- 당신은 사업에만 집중
**결국 시간, 돈, 스트레스 모두 절약**
---
### 💡 Step 4: 실무 팁 (3~5개)
**구조**: ✅ 이렇게 하세요 / ❌ 이렇게 하면 안 돼요
```markdown
## 이렇게 하면 세금이 명확해요
### ✅ 해야 할 것
1. **영수증 정리** - 매달 봉투에 모아두기
2. **기본 기록** - 엑셀에 간단히 기입
3. **연 1회 점검** - 세무사와 기본 상담
4. **투명성** - 세무청 신고는 정확하게
### ❌ 하면 안 되는 것
1. **영수증 버리기** - 나중에 증거 없음
2. **개인비와 섞기** - 기장 혼란
3. **신고 늦추기** - 가산세 발생
4. **과하게 깎기** - 세무조사 리스크
```
---
### 📝 Step 5: 결론
고객이 읽은 후 자연스럽게 결론을 내리도록:
**구조**:
1. 기초는 할 수 있다 (긍정)
2. 근데 복잡하네요 (현실 직시)
3. 그래서 세무사가 필요하구나 (자연스러운 깨달음)
**고객이 느끼는 여정**:
- 처음: "아, 이 정도는 내가 할 수 있겠네"
- 중간: "근데 이 모든 걸 매년 챙기기는..."
- 결론: "전문가 도움이 낫겠다"
```markdown
## 기초는 누구나 할 수 있어요
**이 정도면 자신이 충분히 가능합니다**:
- 소규모 사업 (월 500만~1,000만 원)
- 단순 경비 (재료, 임차료 등)
- 월 1회 정도 기본 정리
→ 영수증 정리 + 기본 엑셀 기입면 충분
---
## 하지만 이렇게 복잡하면 전문가 도움이 효율적입니다
**세무사 상담을 권하는 경우**:
- 📊 월 매출이 2,000만 원을 넘어갈 때
- 💼 여러 사업을 동시에 운영할 때
- 🏠 부동산 등 추가 수입이 있을 때
- 📈 직원을 여러 명 두고 있을 때
- 🌍 해외 거래나 수입이 있을 때
### 실제 효과: 숫자로 본 세무사의 가치
**절세액**
- 혼자: X만 원
- 세무사: X + 200만 원
- 차이: +200만 원 절약
**세무조사 스트레스**
- 혼자: 매년 불안
- 세무사: 안정적 대응
- 차이: 심리적 안정
**시간 투자**
- 혼자: 월 10시간
- 세무사: 월 1시간
- 차이: 월 9시간 자유
**세무사 비용**
- 혼자: 0원
- 세무사: 약 100만 원/년
- 차이: -100만 원
**실제 이익**
- 혼자: 순이익
- 세무사: 순이익 + 100만 원
- 차이: +100만 원 순이익
**돈을 쓰는 이유**:
- 세금 절약: 절세 200만 원 - 비용 100만 원 = 순 100만 원 이득
- 시간 절약: 월 9시간(연 108시간) = 사업에 집중
- 스트레스 감소: 세무조사 불안 제거
- 리스크 관리: 실수로 인한 가산세 방지
---
## 요약
**기본 개념을 아는 것만으로도**:
- 실수를 줄이고
- 세금을 절약하고
- 세무사와의 상담이 훨씬 효율적
당신의 상황이 어느 정도인지 판단하고,
필요할 때 전문가와 함께 하세요.
```
---
## ✅ 작성 체크리스트
### 내용
- [ ] **실제 사례**: 동네 카페/편의점/학원 같은 주변 상황
- [ ] **구체적 페르소나**: 이름, 나이, 직업, 사업 경력
- [ ] **실제 금액**: 매출, 경비, 세금 (현실적 수치)
- [ ] **Before/After**: 실패 사례 → 성공 사례
- [ ] **절세 효과**: "X만 원 절약" 또는 "손해를 막음"
- [ ] **계산**: Step별로 명확, 표 포함
- [ ] **악마는 디테일**: "겉으로는 간단해 보이지만 실제로는..." (세무사가 처리하는 디테일들)
- [ ] **세법 변화**: 해당 연도의 세법 변경사항과 그 영향 설명
### 톤
- [ ] **교육적**: 개념을 이해하도록
- [ ] **격려적**: 경고/협박 없음
- [ ] **현실적**: 복잡할 수 있다는 인정
- [ ] **세무사 자연스러운 유도**: "필요할 때 도움되는 선택"
- [ ] **임파워먼트**: "기초는 누구나 할 수 있어요"
### 표현
- [ ] **중학교 수준**: 어려운 용어는 () 설명
- [ ] **이모지**: 🏠💰✅❌📊 등으로 시각화
- [ ] **짧은 문장**: 한 문장에 한 개념
- [ ] **표와 리스트**: 수치는 표로, 항목은 리스트로
---
## 🚫 피해야 할 표현 (한국세무사협회 광고 규칙 준수)
### ❌ **절대 금지 표현** (법적 위반 위험)
**1. 과도한 절세 약속 & 절대 표현**:
- ❌ "50만 원 절약 가능"
- ❌ "최대한 경비를 깎아줍니다"
- ❌ "세금을 반으로 줄여드립니다"
- ❌ "세금을 덜 냅니다" (보장으로 해석)
- ❌ "가장 많이 절세해드립니다"
- ✅ "이 사례에서는 약 50만 원 절약되었습니다" (과거 사례만)
- ✅ "정확한 경비 처리로 세법에 따른 정당한 공제를 받을 수 있습니다" (법적 근거)
- ✅ "경비를 빠짐없이 처리합니다" (객관적 프로세스)
**2. 보장 표현 (불가능한 결과 약속)**:
- ❌ "반드시 세금을 줄입니다"
- ❌ "세무조사 안 받게 해드립니다"
- ❌ "100% 절세를 보장합니다"
- ❌ "세금을 보장합니다"
- ✅ "정확한 신고로 세무조사 리스크를 최소화합니다"
- ✅ "세법에 따른 정당한 공제를 받을 수 있습니다"
**3. 무료 & 가격 표현**:
- ❌ "무료로 세금 절약해드립니다"
- ❌ "최저가 신고료"
- ❌ "가장 저렴한 가격"
- ✅ "합리적인 비용으로 전문 서비스를 제공합니다"
**4. 절대/최상급 표현**:
- ❌ "반드시", "무조건", "반듯이", "항상", "절대"
- ❌ "최고", "최우수", "1등", "유일"
- ❌ "모든", "완벽하게"
- ✅ "일반적으로", "대부분의 경우", "보통"
**5. 과도한 단순화 표현**:
- ❌ "매우 편합니다", "너무 쉽습니다"
- ❌ "아무도 실수할 수 없습니다"
- ❌ "5분이면 끝납니다"
- ✅ "기초 개념을 배울 수 있습니다"
- ✅ "복잡한 부분은 전문가가 관리합니다"
**6. 객관적 증거 없는 수치**:
- ❌ "평균 170만 원 절약" (근거 없으면)
- ❌ "고객의 80%가 만족" (통계 없으면)
- ❌ "보통 2배의 환급" (데이터 없으면)
- ✅ "이 사례에서는 약 170만 원 절약되었습니다"
- ✅ "많은 고객들이 정확한 기장의 필요성을 느낍니다"
---
### ✅ **안전한 표현 (권장)**
| 대신 이렇게 | 이유 |
|----------|------|
| "정확한 기장으로 세법에 따른 공제를 받을 수 있습니다" | 법적 근거 (보장 아님) |
| "경비를 빠짐없이 처리합니다" | 객관적 프로세스 |
| "이 사례에서는 약 50만 원 절약되었습니다" | 과거 사례 (보장 아님) |
| "경비를 빠짐없이 처리합니다" | 객관적 프로세스 |
| "세무조사 대비 근거를 정리합니다" | 예방적 표현 |
| "당신의 상황에 맞는 최선의 방법을 제시합니다" | 개별 맞춤형 |
| "세법이 자주 바뀌므로 전문가 도움이 효율적입니다" | 필요성 설명 |
| "이 정도는 자신이 충분히 가능합니다" | 존중과 임파워먼트 |
| "복잡한 경우는 전문가와 상담하세요" | 선택지 제시 |
| "정확하게 하면 나중에 편합니다" | 미래 가치 (현재 보장 아님) |
---
### 📋 블로그 작성 시 광고 규칙 체크리스트
- [ ] **절세 약속 제거**: "최대한", "반드시", "보장", "무조건" 단어 없음
- [ ] **보장 표현 제거**: "세무조사 안 받게", "100% 절세", "확실" 제거
- [ ] **무료/가격 표현 제거**: "무료", "최저가", "가장 저렴" 제거
- [ ] **절대 표현 제거**: "항상", "절대", "모두", "완벽" 제거
- [ ] **최상급 제거**: "최고", "최우수", "1등" (객관적 증거 있으면 가능)
- [ ] **과도한 단순화 제거**: "매우 쉽습니다", "아무도 실수할 수 없음" 제거
- [ ] **수치는 사례로**: "절약 가능" → "이 사례에서는 약 X만 원 절약"
- [ ] **객관성 유지**: 구체적 사례 + 과거형 표현 사용
- [ ] **필요성 설명**: "왜 필요한가" → 이해와 선택 유도
- [ ] **세무사협회 규정 준수**: 법적 문제 없음
---
## 시즌별 주제 예시
| 월 | 추천 주제 | 톤 |
|----|---------|-----|
| 1월 | 부가세 2기 신고 기한 | "이 정도면 자신이 가능" |
| 5월 | 종소세 신고 방법 | "핵심 개념 + 전문가 도움 타이밍" |
| 7월 | 부가세 1기 신고 | "기초 정리 방법" |
| 11월 | 다음해 준비 | "계획하면 편해요" |
---
## ⚠️ 실수 방지 체크리스트 (과거 오류 기록)
**이전에 반복된 실수들을 기록하여, 같은 실수를 하지 않도록 합니다.**
### 1️⃣ 카테고리 할당 실수 ❌
**과거 오류**: 포스트를 만들 때 category_id를 NULL로 두었음
**문제점**:
- DB NOT NULL 제약 위반
- 블로그 페이지에 노출 안 됨
- 고객이 카테고리로 검색 불가
**예방책**:
-**SQL INSERT 시 반드시 category_id 명시**
-**포스트 작성 전에 카테고리 결정**
-**DB 적용 후 category_id NOT NULL 확인**
-**각 카테고리별 최소 3개 이상 포스트 유지**
**SQL 예시** (권장):
```sql
INSERT INTO blog_posts (title, slug, content, category_id, is_published, ...)
VALUES ('제목', 'slug', $$$$, 1, true, ...);
-- category_id 절대 생략 금지!
```
---
### 2️⃣ 내용 길이 부족 ❌
**과거 오류**: 에이전트가 지침(1,500~2,500자)을 무시하고 간단한 버전(500자)으로 생성
**문제점**:
- 고객 설득력 부족
- 계산 예시 없음
- 3단계 구조 불완전
- 세법 인용 부족
**예방책**:
-**각 포스트 최소 1,500자 이상 (추천 2,000~2,500자)**
-**포스트 작성 후 글자 수 확인: `LENGTH(content) >= 1500`**
-**항상 실제 사례 포함** (이름, 나이, 직업, 구체적 상황)
-**항상 계산 과정 포함** (절세액 수치화)
-**3단계 구조 필수** (1️⃣ 기초 → 2️⃣ 현실 → 3️⃣ 해결책)
**확인 쿼리**:
```sql
SELECT id, title, LENGTH(content) as length FROM blog_posts
WHERE LENGTH(content) < 1500; -- 부족한 포스트 검출
```
---
### 3️⃣ 테이블 사용 금지 ❌
**과거 오류**: 마크다운 테이블(`| |---|---|`) 사용
**문제점**:
- 지침 위반 (리스트만 사용)
- 모바일에서 가독성 저하
- 유지보수 어려움
**예방책**:
-**테이블 금지, 리스트만 사용** (- 또는 숫자 목록)
-**작성 후 `| |` 패턴 검색으로 테이블 확인**
-**수치/계산은 리스트 형식**:
**❌ 금지 (테이블)**:
```markdown
| 항목 | 월 | 연간 |
|------|-----|------|
| 월세 | 150만 | 1,800만 |
```
**✅ 권장 (리스트)**:
```markdown
월 경비 구성:
- 월세: 150만 원 (연 1,800만 원)
- 재료비: 180만 원 (연 2,160만 원)
- 직원급여: 100만 원 (연 1,200만 원)
```
---
### 4️⃣ 계산 예시 누락 ❌
**과거 오류**: 포스트에 개념만 있고 실제 계산 예시 부족
**문제점**:
- 고객이 "내 상황에 얼마나 해당하나" 판단 어려움
- 추상적 설명으로 설득력 감소
- 세무사 필요성 전달 미흡
**예방책**:
-**모든 포스트에 구체적 계산 예시 필수**
-**절세액을 수치로 제시** ("약 50만 원 절약")
-**단계별 계산 과정 포함** (Step 1️⃣, 2️⃣, 3️⃣, 4️⃣)
-**실제 사례로 숫자 구체화**:
**예시**:
```markdown
### Step 1️⃣: 매출 정리
월 600만 원 × 12개월 = 연 7,200만 원
### Step 2️⃣: 경비 계산
- 월세: 150만 원 → 연 1,800만 원
- 재료비: 180만 원 → 연 2,160만 원
합계: 5,400만 원
### Step 3️⃣: 순이익
7,200만 - 5,400만 = 1,800만 원
### Step 4️⃣: 세금
1,800만 원 × 약 6% = **약 108만 원/년**
```
---
### 5️⃣ 카테고리 주제 불일치 ❌
**과거 오류**: 포스트 주제와 카테고리가 맞지 않음
**문제점**:
- 고객이 원하는 정보 검색 불가
- 카테고리 신뢰도 저하
- UX 혼란
**예방책**:
-**포스트 작성 전 카테고리 명확히 결정**
-**포스트 주제와 카테고리 일관성 검증**:
| 포스트 | 카테고리 | 확인 |
|--------|---------|------|
| 프리랜서 경비 | 종합소득세 (3) | ✅ 맞음 |
| 월세 신고 | 부동산 세금 (2) | ✅ 맞음 |
| 자녀 증여세 | 가족자산·증여 (5) | ✅ 맞음 |
| 사업자 기장 | 사업자 세무 (1) | ✅ 맞음 |
| 부가세 신고 | 부가가치세 (4) | ✅ 맞음 |
---
### 6️⃣ 정확한 세법 인용 누락 ❌
**과거 오류**: 일부 포스트에서 법조 명시 부족
**문제점**:
- 정확성 원칙 위반
- 법적 책임 불명확
- 고객 신뢰도 저하
**예방책**:
-**모든 주요 내용에 세법 조항 인용 필수**
-**형식**: "소득세법 제XX조에 따르면"
-**연도 기준 명시**: "2025년 기준"
-**포스트 끝에 "법적 근거" 섹션 필수**:
```markdown
**법적 근거**:
- 소득세법 제29조 (수입금액의 계산)
- 국세기본법 제47조 (가산세)
- 소득세법 제160조 (증빙 보관)
```
---
## ✅ 포스트 최종 체크리스트
모든 포스트를 DB에 등록하기 전에 다음을 확인하세요:
- [ ] **카테고리 할당**: `category_id NOT NULL` (필수)
- [ ] **내용 길이**: `LENGTH(content) >= 1500` (최소 1,500자)
- [ ] **테이블 확인**: `| |` 패턴 없음 (리스트만)
- [ ] **계산 예시**: Step 1️⃣~4️⃣ 포함 (절세액 수치)
- [ ] **세법 인용**: 모든 주요 내용에 법조 명시
- [ ] **카테고리 일치**: 포스트 주제 ↔ 카테고리 일관성
- [ ] **3단계 구조**: 1️⃣ 기초 → 2️⃣ 현실 → 3️⃣ 해결책
- [ ] **광고 규칙**: 금지 표현(보장, 최저가, 무료) 없음
- [ ] **사례 포함**: 실제 상황 + 이름/나이/직업 구체화
- [ ] **정확성**: 추측/예상/의견 표현 없음
**체크 쿼리**:
```sql
-- DB 적용 후 확인
SELECT id, title, LENGTH(content), category_id
FROM blog_posts
WHERE LENGTH(content) < 1500 OR category_id IS NULL
ORDER BY id;
-- 결과 없음이 정상!
```
+26 -33
View File
@@ -564,24 +564,33 @@ ssh kjh2064@178.104.200.7
배포는 수동 실행이 아니라 **Gitea Actions CI/CD**만 사용한다.
**무중단 Green-Blue 배포 아키텍처 (2026-06-30 적용 완료)**:
1. **프록시 레이어**: 포트 `5001`에서 영구 가동되는 초경량 .NET TCP 프록시([TaxBaik.Proxy])가 수신 대기합니다. Nginx는 `/taxbaik` 트래픽을 기존과 같이 `5001`로 중계합니다.
2. **동적 포트 스위칭**: 프록시는 요청이 들어올 때마다 `/home/kjh2064/taxbaik_port` 파일을 읽어 active 포트(5003 또는 5004)를 판단하고 트래픽을 포워딩합니다.
3. **배포 흐름 (`deploy_gb.sh`)**:
- Gitea Actions가 코드를 build/publish 후 압축하여 서버에 업로드합니다.
- 서버의 배포 스크립트([deploy_gb.sh])가 실행되어 현재 미사용 중인 예비 포트(Target Port: 5003 또는 5004)를 파악합니다.
- 예비 포트에서 새 .NET 웹 앱을 실행하고 `http://127.0.0.1:$target_port/taxbaik/healthz` 헬스 체크를 통과할 때까지 폴링(최대 60초)합니다.
- 헬스 체크 성공 시 `/home/kjh2064/taxbaik_port` 파일에 새 포트 번호를 기입하여 **트래픽을 즉시 무중단 전환**합니다.
- 기존 포트에서 동작하던 구버전 .NET 프로세스를 종료(`kill -15`)합니다.
- 만약 헬스 체크 실패 시 새 프로세스만 강제 종료하고 배포를 롤백하여 실서비스 다운타임을 방지합니다.
**표준 배포 (현재)**:
1. `master` 브랜치에 push
2. Gitea Actions가 `TaxBaik.Web`을 build/publish
3. CI가 서버의 `taxbaik` 서비스와 `~/taxbaik_active`를 갱신
4. CI가 서비스 재시작 후 `/taxbaik/admin/login`으로 헬스 체크
**API 클라이언트 설정 (Green-Blue 대비)**:
- API 클라이언트 Base URL이 이제 동적 설정됨: `appsettings.json` > `ApiClient:BaseUrl`
- 기본값: `http://localhost:5001/taxbaik/api/`
- 배포 시 환경변수로 오버라이드 가능:
```bash
export ApiClient__BaseUrl="http://localhost:5002/taxbaik/api/"
systemctl start taxbaik # 새 포트에 배포
```
- Nginx가 `/taxbaik` → active 포트로 라우팅하면 자동 전환됨
**운영 규칙**:
- 로컬 또는 서버에서 수동 `dotnet publish`로 운영 배포하지 않는다.
- 배포 실패 시 Gitea Actions CI/CD 로그 및 `~/deployments/taxbaik_timestamp/web_*.log`를 먼저 확인한다.
- 배포 후 최종 검증은 프록시 포트를 경유하는 메인 홈페이지, 관리자 로그인 페이지, 로그인 API를 모두 포함한다.
- 로컬 또는 서버에서 수동 `dotnet publish`로 운영 배포하지 않는다
- `rsync`로 직접 아티팩트를 올리지 않는다
- 배포 실패 시 CI 로그를 먼저 본다
- 배포된 아티팩트는 CI가 만든 것만 신뢰한다
- 배포 후 검증은 홈, 관리자 로그인 페이지, 로그인 API를 모두 포함한다
**롤백**:
- 이전 정상 커밋을 `master`에 revert 또는 hotfix로 되돌려 다시 배포를 수행하거나, 비상시 서버의 `taxbaik_port` 파일의 포트 번호를 수동 수정하여 이전 버전 포트로 즉시 원상복구한다.
- 이전 정상 커밋을 `master`에 revert 또는 hotfix로 되돌린다
- 서버 파일을 수동으로 복구하지 않는다
- 롤백은 커밋 단위로 추적 가능해야 한다
### 3.4 서비스 파일 위치
```
@@ -745,22 +754,6 @@ ssh kjh2064@178.104.200.7 crontab -l | grep backup
---
## 5-1. 블로그 & FAQ 콘텐츠 작성 규칙
**핵심**: 고객 임파워먼트 (당신도 할 수 있습니다!)
- ✅ 주변에서 흔히 보는 실제 사례 (이름, 나이, 직업 구체화)
- ✅ 절세 효과 수치화 ("세금을 X만 원 절약했습니다")
- ✅ 중학교 2학년도 이해 가능한 수준
- ✅ 단계별 설명 + 표로 시각화
- ✅ 결론: "정확하게 하면 이런 이점이 있습니다" (임파워먼트)
**피해야 할 톤**: "복잡하니까 맡기세요" (세무사 의존성 강화)
**세무사 언급**: "더 복잡하면 전문가와 상담하세요" (선택지)
**자세한 템플릿 및 체크리스트**: `BLOG_TEMPLATE.md` 참고
---
## 6. 코드 규칙
### 6.1 C# 네이밍
@@ -1644,7 +1637,7 @@ curl http://127.0.0.1/taxbaik/admin/login
### E2E 테스트 & 반응형 검증
```bash
# 문의 폼 제출
curl -X POST http://taxbaik.com/taxbaik/contact \
curl -X POST http://178.104.200.7/taxbaik/contact \
-d "name=테스트&phone=010-1234-5678&service_type=사업자세무&message=테스트"
# 관리자 DB에서 확인
@@ -1683,7 +1676,7 @@ npx playwright test admin-responsive.spec.ts --project="Desktop Chrome"
**프로덕션 E2E 테스트**:
```bash
export E2E_BASE_URL="http://taxbaik.com/taxbaik"
export E2E_BASE_URL="http://178.104.200.7/taxbaik"
export E2E_ADMIN_USERNAME="test_admin"
export E2E_ADMIN_PASSWORD="TestAdmin@123456"
@@ -1951,7 +1944,7 @@ else
2. **Actions run 생성 확인**
```powershell
$headers = @{ Authorization = "token $env:GITEA_TOKEN_TAXBAIK" }
$runs = Invoke-RestMethod -Headers $headers -Uri "http://gitea.taxbaik.com/api/v1/repos/kjh2064/taxbaik/actions/runs?limit=10"
$runs = Invoke-RestMethod -Headers $headers -Uri "http://178.104.200.7/api/v1/repos/kjh2064/taxbaik/actions/runs?limit=10"
$runs.workflow_runs | Select-Object id,path,event,head_sha,display_title,status,conclusion
```
`deploy.yml@refs/heads/master`, `event=push`, 최신 `head_sha`가 있어야 배포가 실제로 시작된 것이다.
+23 -130
View File
@@ -17,7 +17,7 @@
| 3.3 | [주요 Python 패키지](#33-주요-python-패키지-시스템) | 시스템/venv 패키지 구분 |
| 4 | [서비스 아키텍처](#4-서비스-아키텍처) | 포트 맵, Nginx 리버스 프록시 |
| 4.1 | [포트 맵](#41-포트-맵) | 22, 80, 2222, 3000, 5000, 5432 |
| 4.2 | [Nginx 리버스 프록시](#42-nginx-리버스-프록시) | 도메인 기반 가상 호스트 분기 (홈페이지, Gitea, Quant) |
| 4.2 | [Nginx 리버스 프록시](#42-nginx-리버스-프록시) | `/` → Gitea, `/quant/` → Blazor |
| 5 | [Gitea](#5-gitea) | Docker Compose 설정, 시크릿, 데이터 경로 |
| 5.1 | [Docker Compose](#51-docker-compose) | `gitea:1.26.4`, PG 연동 |
| 5.2 | [시크릿 관리](#52-시크릿-관리) | `/opt/stacks/gitea/.env` |
@@ -126,84 +126,16 @@ boto3, cryptography, Jinja2, jsonschema, fail2ban 등 시스템 레벨로 설치
### 4.2. Nginx 리버스 프록시
```nginx
# /etc/nginx/sites-available/taxbaik-domains.conf
# /etc/nginx/sites-enabled/gitea-ip.conf
# 1. TaxBaik 홈페이지 (taxbaik.com, www.taxbaik.com)
server {
server_name taxbaik.com www.taxbaik.com;
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
client_max_body_size 512M;
# /admin 하위 요청을 /taxbaik/admin 으로 리다이렉트하여 Blazor Base Path 대응
location /admin {
return 301 $scheme://$host/taxbaik$request_uri;
}
# 루트 경로 요청을 /taxbaik 으로 프록싱하여 base href /taxbaik/ 에 대응
location / {
proxy_pass http://127.0.0.1:5001/taxbaik/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# /taxbaik/ 하위로 들어오는 리소스 및 페이지 요청 처리
location /taxbaik {
proxy_pass http://127.0.0.1:5001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 120s;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/taxbaik.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/taxbaik.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# 2. Gitea (gitea.taxbaik.com)
server {
server_name gitea.taxbaik.com;
client_max_body_size 512M;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/taxbaik.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/taxbaik.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# 3. QuantEngine (quant.taxbaik.com)
server {
server_name quant.taxbaik.com;
location / {
# QuantEngine Blazor Web App
location /quant/ {
proxy_pass http://127.0.0.1:5000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@@ -215,64 +147,25 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/taxbaik.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/taxbaik.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.taxbaik.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = taxbaik.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name taxbaik.com www.taxbaik.com;
return 404; # managed by Certbot
}
server {
if ($host = gitea.taxbaik.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name gitea.taxbaik.com;
return 404; # managed by Certbot
}
server {
if ($host = quant.taxbaik.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name quant.taxbaik.com;
return 404; # managed by Certbot
# Gitea (기본)
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
}
}
```
**라우팅 요약**:
- `http://taxbaik.com/` 또는 `http://www.taxbaik.com/` → TaxBaik 홈페이지 (내부 proxy: `http://127.0.0.1:5001/taxbaik/`)
- `http://gitea.taxbaik.com/` → Gitea Web UI (내부 proxy: `http://127.0.0.1:3000`)
- `http://quant.taxbaik.com/` → QuantEngine Blazor Admin (내부 proxy: `http://127.0.0.1:5000/`)
- `ssh://gitea.taxbaik.com:2222` → Gitea Git SSH
- `http://178.104.200.7/` → Gitea Web UI
- `http://178.104.200.7/quant/` → QuantEngine Blazor Admin
- `ssh://178.104.200.7:2222` → Gitea Git SSH
## 5. Gitea
@@ -491,7 +384,7 @@ ClientAliveCountMax 2
| **CI Runner** | Synology Act Runner | 6× `act_runner:latest` (Docker) |
| **DB** | SQLite (파일 기반) | PostgreSQL 18 + SQLite (하이브리드) |
| **웹 Admin** | 없음 | QuantEngine Blazor (.NET 10, MudBlazor) |
| **리버스 프록시** | Synology 내장 | Nginx (도메인 기반 분기 - 홈페이지, Gitea, Quant) |
| **리버스 프록시** | Synology 내장 | Nginx (`/` → Gitea, `/quant/` → Blazor) |
| **보안** | DSM 방화벽 | fail2ban + SSH 공개키 + 서비스 로컬바인드 |
| **시크릿 관리** | `.secrets/kis_real.env` | `/opt/stacks/gitea/.env` |
| **OS** | Synology DSM 7.x | Ubuntu 26.04 LTS |
+11 -44
View File
@@ -19,46 +19,32 @@ GRANT ALL PRIVILEGES ON DATABASE taxbaikdb TO taxbaik;
### 2. 환경 변수 설정
**Web 서비스** (`/etc/systemd/system/taxbaik.service`, 백엔드 전용):
**Web 서비스** (`/etc/systemd/system/taxbaik.service`):
```ini
[Service]
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=ASPNETCORE_URLS=http://127.0.0.1:5004
Environment=ASPNETCORE_URLS=http://127.0.0.1:5001
Environment=ConnectionStrings__Default=Host=localhost;Database=taxbaikdb;Username=taxbaik;Password=your_secure_password
```
**프록시 서비스** (`/etc/systemd/system/taxbaik-proxy.service`, 5001 진입점):
```ini
[Service]
ExecStart=/usr/bin/dotnet TaxBaik.Proxy.dll
WorkingDirectory=/home/kjh2064/taxbaik_active
Restart=always
```
### 3. systemd 서비스 파일 설치
```bash
sudo cp deploy/taxbaik.service /etc/systemd/system/
sudo cp deploy/taxbaik-proxy.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable taxbaik
sudo systemctl enable taxbaik-proxy
```
### 4. Nginx 설정
```bash
# Nginx 도메인 기반 가상 호스트 설정 복사
sudo cp deploy/nginx-taxbaik-domains.conf /etc/nginx/sites-available/taxbaik-domains.conf
# 현재 Nginx 설정 확인
sudo cat /etc/nginx/sites-available/default | head -30
# 기존 설정(IP 기반 및 default) 활성화 해제
sudo rm -f /etc/nginx/sites-enabled/default
sudo rm -f /etc/nginx/sites-enabled/gitea-ip.conf
# location 블록 추가 (또는 기존 설정에 병합)
sudo cp deploy/nginx-taxbaik-locations.conf /etc/nginx/conf.d/taxbaik.conf
# 새 설정 활성화 (심링크 생성)
sudo ln -sfn /etc/nginx/sites-available/taxbaik-domains.conf /etc/nginx/sites-enabled/taxbaik-domains.conf
# 설정 문법 테스트 및 Nginx 서비스 리로드
# 테스트 및 재로드
sudo nginx -t
sudo systemctl reload nginx
```
@@ -79,7 +65,7 @@ sudo systemctl reload nginx
master 브랜치 push → build → test → publish → restart → health check → Playwright
```
수동 배포는 사용하지 않습니다. `deploy_gb.sh`는 `TAXBAIK_DEPLOY_FROM_CI=1`이 없으면 즉시 종료하므로, 배포는 반드시 Gitea Actions에서만 실행됩니다.
수동 배포는 비상 롤백 외에는 사용하지 않습니다. 배포 이슈는 Gitea Actions 로그로 해결합니다.
## 마이그레이션 자동 실행
@@ -142,7 +128,6 @@ ls -la ~/deployments/ | grep taxbaik
# 심링크 변경 (예: 이전 버전이 taxbaik_20260626_140000)
ln -sfn ~/deployments/taxbaik_20260626_140000 ~/taxbaik_active
sudo systemctl restart taxbaik-proxy
sudo systemctl restart taxbaik
```
@@ -154,10 +139,10 @@ sudo systemctl restart taxbaik
ssh kjh2064@178.104.200.7
# 서비스 상태
systemctl status taxbaik taxbaik-proxy
systemctl status taxbaik
# 포트 확인
netstat -tlnp | grep -E '5001|5004'
netstat -tlnp | grep -E '5001'
# 프로세스 확인
ps aux | grep TaxBaik
@@ -180,27 +165,9 @@ journalctl -u taxbaik -f
| 404 /taxbaik | Nginx 설정 미적용 | `sudo nginx -t && sudo systemctl reload nginx` |
| Blazor WebSocket 안 됨 | `/taxbaik` location에 `proxy_http_version 1.1`, `Upgrade`, `Connection \"Upgrade\"` 헤더가 모두 있는지 확인 |
| DB 연결 오류 | 환경 변수 미설정 | systemd service 파일의 ConnectionStrings__Default 확인 |
| 503 Service Unavailable | 백엔드 또는 프록시 미시작 | `sudo systemctl restart taxbaik-proxy taxbaik` |
| 503 Service Unavailable | 미시작 | `sudo systemctl restart taxbaik` |
| 마이그레이션 실패 | DB 권한 문제 | `GRANT ALL PRIVILEGES ON DATABASE taxbaikdb TO taxbaik;` |
## 운영 복구 순서
```bash
ssh kjh2064@178.104.200.7
sudo cp /home/kjh2064/taxbaik.service /etc/systemd/system/taxbaik.service
sudo cp /home/kjh2064/taxbaik-proxy.service /etc/systemd/system/taxbaik-proxy.service
sudo systemctl daemon-reload
sudo systemctl restart taxbaik-proxy
sudo systemctl restart taxbaik
curl -I http://127.0.0.1:5001/taxbaik/admin/login
```
## 원라인 점검
```bash
ssh kjh2064@178.104.200.7 'systemctl status taxbaik taxbaik-proxy --no-pager --lines=3 && ss -tlnp | grep -E ":5001 |:5004 " && curl -fsSI http://127.0.0.1:5001/taxbaik/admin/login && curl -fsS http://127.0.0.1:5001/taxbaik/favicon.svg >/dev/null && curl -fsS http://127.0.0.1:5001/taxbaik/robots.txt >/dev/null'
```
## 초기 데이터
### 관리자 계정
+40 -8
View File
@@ -48,7 +48,29 @@ ssh kjh2064@178.104.200.7 'bash ~/SERVER_SETUP.sh'
# ~/taxbaik_active
```
### 2단계: Gitea Actions 설정
### 2단계: 첫 배포 (수동)
```bash
# 로컬에서 실행
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
# SSH 키 설정 (필요시)
export DEPLOY_USER="kjh2064"
export DEPLOY_HOST="178.104.200.7"
# 배포
rsync -avz --delete ./publish/ \
$DEPLOY_USER@$DEPLOY_HOST:~/deployments/taxbaik_${TIMESTAMP}/
# 심링크 변경 및 시작
ssh $DEPLOY_USER@$DEPLOY_HOST << EOF
ln -sfn ~/deployments/taxbaik_${TIMESTAMP} ~/taxbaik_active
sudo systemctl start taxbaik
sudo systemctl status taxbaik
EOF
```
### 3단계: Gitea Actions 설정 (선택)
**Gitea 저장소 Settings → Secrets 추가**:
- `DEPLOY_USER`: `kjh2064`
@@ -195,8 +217,8 @@ curl -I -H "Accept-Encoding: gzip" http://178.104.200.7/taxbaik/ | grep -i encod
| 증상 | 원인 | 해결 방법 |
|------|------|----------|
| 404 /taxbaik | Nginx 설정 미적용 | `sudo nginx -t && sudo systemctl reload nginx` |
| 502 Bad Gateway | 프록시 또는 백엔드 미실행 | `sudo systemctl restart taxbaik-proxy taxbaik` |
| 503 Service Unavailable | 백엔드 충돌 또는 비밀값 누락 | 로그 확인: `journalctl -u taxbaik -n 50` |
| 502 Bad Gateway | 미실행 | `sudo systemctl restart taxbaik` |
| 503 Service Unavailable | 앱 충돌 | 로그 확인: `journalctl -u taxbaik -n 50` |
| DB 연결 오류 | 환경 변수 미설정 | systemd 파일의 ConnectionStrings__Default 확인 |
| HTTPS 오류 | SSL 미구성 | 개발 환경에서는 HTTP 사용 (IP 기반) |
| 마이그레이션 실패 | 테이블 존재 | `DROP DATABASE taxbaikdb;` 후 재시작 |
@@ -208,11 +230,11 @@ curl -I -H "Accept-Encoding: gzip" http://178.104.200.7/taxbaik/ | grep -i encod
### 실시간 모니터링
```bash
# 터미널 1: 백엔드 로그
# 터미널 1: 웹 서비스 로그
ssh kjh2064@178.104.200.7 'journalctl -u taxbaik -f'
# 터미널 2: 프록시 로그
ssh kjh2064@178.104.200.7 'journalctl -u taxbaik-proxy -f'
# 터미널 2: 통합 서비스 로그
ssh kjh2064@178.104.200.7 'journalctl -u taxbaik -f'
# 터미널 3: Nginx 로그
ssh kjh2064@178.104.200.7 'sudo tail -f /var/log/nginx/access.log | grep taxbaik'
@@ -224,7 +246,13 @@ ssh kjh2064@178.104.200.7 'watch -n 1 "ps aux | grep TaxBaik"'
### 정기적 검사
```bash
# 일일 체크는 CI 배포 후 자동 검증으로 대체
# 일일 체크 (cron job)
0 9 * * * /home/kjh2064/health-check.sh
# 내용:
#!/bin/bash
curl -f http://127.0.0.1:5001/taxbaik || systemctl restart taxbaik
curl -f http://127.0.0.1:5001/taxbaik/admin/login || systemctl restart taxbaik
```
---
@@ -240,6 +268,11 @@ git commit -m "기능: 새로운 기능 추가"
git push origin master
# 2. Gitea Actions가 자동으로 배포
# 또는 수동 배포:
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
dotnet publish TaxBaik.Web -c Release -o ./publish
rsync -avz ./publish/ kjh2064@178.104.200.7:~/deployments/taxbaik_${TIMESTAMP}/
ssh kjh2064@178.104.200.7 "ln -sfn ~/deployments/taxbaik_${TIMESTAMP} ~/taxbaik_active && sudo systemctl restart taxbaik"
```
### 롤백 절차
@@ -251,7 +284,6 @@ ssh kjh2064@178.104.200.7 'ls -la ~/deployments/ | grep taxbaik'
# 롤백 (예: 이전 버전이 taxbaik_20260625_100000)
ssh kjh2064@178.104.200.7 << EOF
ln -sfn ~/deployments/taxbaik_20260625_100000 ~/taxbaik_active
sudo systemctl restart taxbaik-proxy
sudo systemctl restart taxbaik
EOF
```
+1 -1
View File
@@ -168,7 +168,7 @@ master 브랜치에 푸시하면 파이프라인이 다음 단계를 수행합
- `TAXBAIK_ADMIN_TEST_PASSWORD`: 배포 검증용 관리자 비밀번호
- `Admin__PasswordResetToken`: 관리자 비밀번호 재설정 API용 서버 비밀값
배포는 Gitea Actions CI/CD로만 수행합니다. 수동 배포 경로는 CI 하네스로 차단되어 있으며, 실패 시 [DEPLOYMENT_GUIDE.md](./DEPLOYMENT_GUIDE.md)의 CI 점검 절차를 따릅니다.
수동 배포는 비상 롤백 절차 외에는 사용하지 않습니다. 실패 시 [DEPLOYMENT_GUIDE.md](./DEPLOYMENT_GUIDE.md)의 CI 점검 절차를 따릅니다.
---
-43
View File
@@ -522,46 +522,3 @@ Todo:
- WBS-UX-03/04 구현 완료
- WBS-CRM-01/02/03/04/05 구현 완료 (배포 후 검증 필요)
- WBS-CRM-06/07/08 (텔레그램·포털·소셜 로그인) Phase 3 미착수
---
## ── 홈페이지 · 어드민 · 포털 프리미엄 UX/UI 개편 (2026-06-30) ──────────────────
## WBS-UX-05 홈페이지 프리미엄 UI 및 마이크로 인터랙션
목표: 홈페이지 디자인을 극도로 모던하고 신뢰성 있는 프리미엄 스타일로 전면 개편한다.
성공 기준:
- Hero 섹션에 유려한 배경 그라데이션 및 부드러운 CSS 애니메이션 효과 적용
- 서비스 카드에 섀도우 및 보더 트랜지션, 골드/그린 그라데이션 호버 이펙트 추가
- 신뢰도 스트립 카드에 입체감 및 돋보이는 레이아웃 설계
- Noto Sans KR 외에 Outfit/Inter 등의 보조 영문 폰트 결합으로 타이포그래피 고급화
Todo:
- [x] `site.css` 내 Hero 섹션 그라데이션 및 CSS 애니메이션 보강
- [x] 서비스 카드 및 신뢰도 스트립 컴포넌트 프리미엄 스타일로 개편
- [x] 홈페이지 폰트 스택 확장 및 메인 레이아웃 적용
## WBS-PORTAL-01 고객 포털 UI/UX 고도화 및 글래스모피즘
목표: 고객 마이 포털 화면을 미려하고 현대적인 글래스모피즘 디자인으로 개편하여 이용 가치를 극대화한다.
성공 기준:
- 포털 메인 대시보드 카드를 Glassmorphism 스타일(blur, semi-transparent border)로 변경
- 세무 신고 현황 테이블 및 상담 이력 타임라인 컴포넌트의 모던 디자인화
Todo:
- [x] `site.css` 내 포털 전용 모던 글래스모피즘 클래스군 추가
- [x] `Portal/Index.cshtml` 레이아웃 및 컴포넌트 UI 고도화
## WBS-MAINT-02 코드 품질 및 경고 결함 차단
목표: 빌드 컴파일 타임 경고(Warnings)를 0으로 유지하여 미래 코드 결함을 방지한다.
성공 기준:
- `dotnet build` 수행 시 경고 0개 달성
Todo:
- [x] `CustomAuthenticationStateProvider.cs` Nullable 경고 수정
- [x] `Dashboard.razor` 미사용 변수 제거 및 UI 연계 바인딩 처리
@@ -1,34 +0,0 @@
namespace TaxBaik.Application.Tests;
using TaxBaik.Web.Components.Admin.Shared;
using Xunit;
public class BusinessDayCalculatorTests
{
[Theory]
[InlineData(2026, 2, 14, 2026, 2, 19)]
[InlineData(2026, 8, 15, 2026, 8, 20)]
[InlineData(2026, 9, 24, 2026, 9, 29)]
[InlineData(2026, 10, 3, 2026, 10, 8)]
public void GetEffectiveDueDate_SkipsWeekendHolidayAndSubstituteHoliday(
int dueYear, int dueMonth, int dueDay,
int expectedYear, int expectedMonth, int expectedDay)
{
var effective = BusinessDayCalculator.GetEffectiveDueDate(new DateOnly(dueYear, dueMonth, dueDay));
Assert.Equal(new DateOnly(expectedYear, expectedMonth, expectedDay), effective);
}
[Theory]
[InlineData(2026, 2, 19, 0)]
[InlineData(2026, 2, 20, -1)]
[InlineData(2026, 2, 18, 1)]
public void GetDday_UsesEffectiveDueDate(
int refYear, int refMonth, int refDay,
int expectedDays)
{
var dday = BusinessDayCalculator.GetDday(new DateOnly(2026, 2, 14), new DateOnly(refYear, refMonth, refDay));
Assert.Equal(expectedDays, dday);
}
}
@@ -18,6 +18,5 @@
<ItemGroup>
<ProjectReference Include="..\TaxBaik.Application\TaxBaik.Application.csproj" />
<ProjectReference Include="..\TaxBaik.Web\TaxBaik.Web.csproj" />
</ItemGroup>
</Project>
@@ -27,7 +27,6 @@ public static class DependencyInjection
services.AddScoped<RevenueTrackingService>();
services.AddScoped<TelegramReportService>();
services.AddScoped<PortalUserService>();
services.AddScoped<CommonCodeService>();
return services;
}
}
@@ -1,48 +0,0 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using TaxBaik.Domain.Entities;
using TaxBaik.Domain.Interfaces;
namespace TaxBaik.Application.Services;
public class CommonCodeService(ICommonCodeRepository commonCodeRepository)
{
public async Task<IEnumerable<string>> GetAllGroupsAsync(CancellationToken ct = default)
{
return await commonCodeRepository.GetAllGroupsAsync(ct);
}
public async Task<IEnumerable<CommonCode>> GetByGroupAsync(string codeGroup, CancellationToken ct = default)
{
return await commonCodeRepository.GetByGroupAsync(codeGroup, ct);
}
public async Task<IEnumerable<CommonCode>> GetAllActiveAsync(CancellationToken ct = default)
{
return await commonCodeRepository.GetAllActiveAsync(ct);
}
public async Task<CommonCode?> GetAsync(string codeGroup, string codeValue, CancellationToken ct = default)
{
return await commonCodeRepository.GetAsync(codeGroup, codeValue, ct);
}
public async Task UpsertAsync(CommonCode code, CancellationToken ct = default)
{
Normalize(code);
await commonCodeRepository.UpsertAsync(code, ct);
}
public async Task DeleteAsync(string codeGroup, string codeValue, CancellationToken ct = default)
{
await commonCodeRepository.DeleteAsync(codeGroup.Trim(), codeValue.Trim(), ct);
}
private static void Normalize(CommonCode code)
{
code.CodeGroup = code.CodeGroup.Trim();
code.CodeValue = code.CodeValue.Trim();
code.CodeName = code.CodeName.Trim();
}
}
@@ -37,10 +37,7 @@ public class TaxProfileService(ITaxProfileRepository repository)
public async Task UpdateAsync(int profileId, string? businessType, string? accountingMethod,
DateTime? nextFilingDueDate, string taxRiskLevel = "normal", CancellationToken ct = default)
{
var profile = await repository.GetByIdAsync(profileId, ct);
if (profile == null)
throw new ValidationException("세무 프로필을 찾을 수 없습니다.");
var profile = new TaxProfile { Id = profileId };
if (!string.IsNullOrWhiteSpace(businessType))
profile.BusinessType = businessType.Trim();
if (!string.IsNullOrWhiteSpace(accountingMethod))
-10
View File
@@ -1,10 +0,0 @@
namespace TaxBaik.Domain.Entities;
public class CommonCode
{
public string CodeGroup { get; set; } = string.Empty;
public string CodeValue { get; set; } = string.Empty;
public string CodeName { get; set; } = string.Empty;
public int SortOrder { get; set; }
public bool IsActive { get; set; } = true;
}
@@ -1,16 +0,0 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using TaxBaik.Domain.Entities;
namespace TaxBaik.Domain.Interfaces;
public interface ICommonCodeRepository
{
Task<IEnumerable<string>> GetAllGroupsAsync(CancellationToken ct = default);
Task<IEnumerable<CommonCode>> GetByGroupAsync(string codeGroup, CancellationToken ct = default);
Task<IEnumerable<CommonCode>> GetAllActiveAsync(CancellationToken ct = default);
Task<CommonCode?> GetAsync(string codeGroup, string codeValue, CancellationToken ct = default);
Task UpsertAsync(CommonCode code, CancellationToken ct = default);
Task DeleteAsync(string codeGroup, string codeValue, CancellationToken ct = default);
}
@@ -5,7 +5,6 @@ using TaxBaik.Domain.Entities;
public interface ITaxProfileRepository
{
Task<int> CreateAsync(TaxProfile profile, CancellationToken cancellationToken = default);
Task<TaxProfile?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
Task<IEnumerable<TaxProfile>> GetAllAsync(CancellationToken cancellationToken = default);
Task<TaxProfile?> GetByClientIdAsync(int clientId, CancellationToken cancellationToken = default);
Task UpdateAsync(TaxProfile profile, CancellationToken cancellationToken = default);
@@ -27,7 +27,6 @@ public static class DependencyInjection
services.AddScoped<IConsultingActivityRepository, ConsultingActivityRepository>();
services.AddScoped<IContractRepository, ContractRepository>();
services.AddScoped<IRevenueTrackingRepository, RevenueTrackingRepository>();
services.AddScoped<ICommonCodeRepository, CommonCodeRepository>();
return services;
}
@@ -1,72 +0,0 @@
using System.Collections.Generic;
using System.Data;
using System.Threading;
using System.Threading.Tasks;
using Dapper;
using TaxBaik.Domain.Entities;
using TaxBaik.Domain.Interfaces;
namespace TaxBaik.Infrastructure.Repositories;
public class CommonCodeRepository(IDbConnectionFactory connectionFactory) : BaseRepository(connectionFactory), ICommonCodeRepository
{
public async Task<IEnumerable<string>> GetAllGroupsAsync(CancellationToken ct = default)
{
using var conn = Conn();
return await conn.QueryAsync<string>(
"SELECT DISTINCT code_group FROM common_codes WHERE is_active = TRUE ORDER BY code_group");
}
public async Task<IEnumerable<CommonCode>> GetByGroupAsync(string codeGroup, CancellationToken ct = default)
{
using var conn = Conn();
return await conn.QueryAsync<CommonCode>(
@"SELECT code_group as CodeGroup, code_value as CodeValue, code_name as CodeName, sort_order as SortOrder, is_active as IsActive
FROM common_codes
WHERE code_group = @CodeGroup AND is_active = TRUE
ORDER BY sort_order",
new { CodeGroup = codeGroup });
}
public async Task<IEnumerable<CommonCode>> GetAllActiveAsync(CancellationToken ct = default)
{
using var conn = Conn();
return await conn.QueryAsync<CommonCode>(
@"SELECT code_group as CodeGroup, code_value as CodeValue, code_name as CodeName, sort_order as SortOrder, is_active as IsActive
FROM common_codes
WHERE is_active = TRUE
ORDER BY code_group, sort_order");
}
public async Task<CommonCode?> GetAsync(string codeGroup, string codeValue, CancellationToken ct = default)
{
using var conn = Conn();
return await conn.QuerySingleOrDefaultAsync<CommonCode>(
@"SELECT code_group as CodeGroup, code_value as CodeValue, code_name as CodeName, sort_order as SortOrder, is_active as IsActive
FROM common_codes
WHERE code_group = @CodeGroup AND code_value = @CodeValue",
new { CodeGroup = codeGroup, CodeValue = codeValue });
}
public async Task UpsertAsync(CommonCode code, CancellationToken ct = default)
{
using var conn = Conn();
await conn.ExecuteAsync(
@"INSERT INTO common_codes (code_group, code_value, code_name, sort_order, is_active)
VALUES (@CodeGroup, @CodeValue, @CodeName, @SortOrder, @IsActive)
ON CONFLICT (code_group, code_value) DO UPDATE
SET code_name = EXCLUDED.code_name,
sort_order = EXCLUDED.sort_order,
is_active = EXCLUDED.is_active",
code);
}
public async Task DeleteAsync(string codeGroup, string codeValue, CancellationToken ct = default)
{
using var conn = Conn();
await conn.ExecuteAsync(
@"DELETE FROM common_codes
WHERE code_group = @CodeGroup AND code_value = @CodeValue",
new { CodeGroup = codeGroup, CodeValue = codeValue });
}
}
@@ -20,17 +20,6 @@ public class TaxProfileRepository(IDbConnectionFactory connectionFactory) : Base
profile);
}
public async Task<TaxProfile?> GetByIdAsync(int id, CancellationToken cancellationToken = default)
{
using var conn = Conn();
return await conn.QueryFirstOrDefaultAsync<TaxProfile>(
@"SELECT id, client_id, business_registration, business_type, establishment_date,
annual_revenue_range, employee_count, accounting_method, fiscal_year_end, last_filing_date,
next_filing_due_date, tax_risk_level, previous_audit_history, special_notes, created_at, updated_at
FROM tax_profiles WHERE id = @Id",
new { Id = id });
}
public async Task<IEnumerable<TaxProfile>> GetAllAsync(CancellationToken cancellationToken = default)
{
using var conn = Conn();
-93
View File
@@ -1,93 +0,0 @@
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
class Program
{
private const string PortFile = "/home/kjh2064/taxbaik_port";
private static int _fallbackPort = 5003;
static async Task Main(string[] args)
{
// Allow setting fallback port via args
if (args.Length > 0 && int.TryParse(args[0], out var port))
{
_fallbackPort = port;
}
var listener = new TcpListener(IPAddress.Loopback, 5001);
listener.Start();
Console.WriteLine($"[TaxBaik Proxy] Listening on 127.0.0.1:5001 (Forwarding to target in {PortFile})");
while (true)
{
try
{
var client = await listener.AcceptTcpClientAsync();
_ = HandleClientAsync(client);
}
catch (Exception ex)
{
Console.WriteLine($"[TaxBaik Proxy] Accept error: {ex.Message}");
await Task.Delay(100);
}
}
}
private static int GetTargetPort()
{
try
{
if (File.Exists(PortFile))
{
var content = File.ReadAllText(PortFile).Trim();
if (int.TryParse(content, out var port) && port > 1024 && port < 65535)
{
return port;
}
}
}
catch { }
return _fallbackPort;
}
private static async Task HandleClientAsync(TcpClient client)
{
client.NoDelay = true;
int targetPort = GetTargetPort();
using var backend = new TcpClient();
backend.NoDelay = true;
try
{
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5));
await backend.ConnectAsync(IPAddress.Loopback, targetPort, cts.Token);
}
catch (Exception ex)
{
Console.WriteLine($"[TaxBaik Proxy] Failed to connect to backend on port {targetPort}: {ex.Message}");
client.Close();
return;
}
try
{
using var clientStream = client.GetStream();
using var backendStream = backend.GetStream();
var toBackend = clientStream.CopyToAsync(backendStream);
var toClient = backendStream.CopyToAsync(clientStream);
await Task.WhenAny(toBackend, toClient);
}
catch { }
finally
{
client.Close();
backend.Close();
}
}
}
-10
View File
@@ -1,10 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
-52
View File
@@ -1,52 +0,0 @@
{
"runtimeOptions": {
"tfm": "net10.0",
"includedFrameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "10.0.0"
}
],
"wasmHostProperties": {
"perHostConfig": [
{
"name": "browser",
"host": "browser"
}
]
},
"configProperties": {
"Microsoft.AspNetCore.Components.Routing.RegexConstraintSupport": false,
"Microsoft.Extensions.DependencyInjection.VerifyOpenGenericServiceTrimmability": true,
"System.ComponentModel.DefaultValueAttribute.IsSupported": false,
"System.ComponentModel.Design.IDesignerHost.IsSupported": false,
"System.ComponentModel.TypeConverter.EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization": false,
"System.ComponentModel.TypeDescriptor.IsComObjectDescriptorSupported": false,
"System.Data.DataSet.XmlSerializationIsSupported": false,
"System.Diagnostics.Debugger.IsSupported": false,
"System.Diagnostics.Metrics.Meter.IsSupported": false,
"System.Diagnostics.Tracing.EventSource.IsSupported": false,
"System.GC.Server": true,
"System.Globalization.Invariant": false,
"System.TimeZoneInfo.Invariant": false,
"System.Linq.Enumerable.IsSizeOptimized": true,
"System.Net.Http.EnableActivityPropagation": false,
"System.Net.Http.WasmEnableStreamingResponse": true,
"System.Net.SocketsHttpHandler.Http3Support": false,
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Resources.ResourceManager.AllowCustomResourceTypes": false,
"System.Resources.UseSystemResourceKeys": true,
"System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeSupported": true,
"System.Runtime.InteropServices.BuiltInComInterop.IsSupported": false,
"System.Runtime.InteropServices.EnableConsumingManagedCodeFromNativeHosting": false,
"System.Runtime.InteropServices.EnableCppCLIHostActivation": false,
"System.Runtime.InteropServices.Marshalling.EnableGeneratedComInterfaceComImportInterop": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false,
"System.StartupHookProvider.IsSupported": false,
"System.Text.Encoding.EnableUnsafeUTF7Encoding": false,
"System.Text.Json.JsonSerializer.IsReflectionEnabledByDefault": true,
"System.Threading.Thread.EnableAutoreleasePool": false,
"Microsoft.AspNetCore.Components.Endpoints.NavigationManager.DisableThrowNavigationException": false
}
}
}
-2
View File
@@ -1,2 +0,0 @@
global using System.Net.Http;
global using System.Net.Http.Json;
+5 -39
View File
@@ -1,51 +1,17 @@
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using MudBlazor.Services;
using TaxBaik.Application.Services;
using TaxBaik.Web.Services;
using TaxBaik.Web.Services.AdminClients;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
// MudBlazor (WASM 측 인터랙티브 컴포넌트용)
builder.Services.AddMudServices(config =>
builder.Services.AddMudServices();
// API 호출용 HttpClient — 호스트 base(`/taxbaik/`) 기준
builder.Services.AddScoped(sp => new HttpClient
{
config.SnackbarConfiguration.HideTransitionDuration = 400;
config.SnackbarConfiguration.ShowTransitionDuration = 300;
config.PopoverOptions.ThrowOnDuplicateProvider = false;
BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)
});
// API Base Url 동적 구성 (호스트 기준 /taxbaik/api/)
var apiBaseUrl = builder.HostEnvironment.BaseAddress.TrimEnd('/') + "/taxbaik/api/";
// HTTP Client for API (with automatic token refresh)
builder.Services.AddScoped<ITokenStore, TokenStore>();
builder.Services.AddScoped<TokenRefreshHandler>();
builder.Services.AddHttpClient<IApiClient, ApiClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
// 각 Browser API Client 등록
builder.Services.AddHttpClient<IAdminDashboardClient, AdminDashboardClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
builder.Services.AddHttpClient<IInquiryBrowserClient, InquiryBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
builder.Services.AddHttpClient<IClientBrowserClient, ClientBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
builder.Services.AddHttpClient<ITaxFilingBrowserClient, TaxFilingBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
builder.Services.AddHttpClient<IFaqBrowserClient, FaqBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
builder.Services.AddHttpClient<IAnnouncementBrowserClient, AnnouncementBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
builder.Services.AddHttpClient<ITaxProfileBrowserClient, TaxProfileBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
builder.Services.AddHttpClient<ITaxFilingScheduleBrowserClient, TaxFilingScheduleBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
builder.Services.AddHttpClient<IConsultingActivityBrowserClient, ConsultingActivityBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
builder.Services.AddHttpClient<IContractBrowserClient, ContractBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
builder.Services.AddHttpClient<IRevenueTrackingBrowserClient, RevenueTrackingBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
builder.Services.AddHttpClient<ICommonCodeBrowserClient, CommonCodeBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
// Blazor 인증 (WASM 측 클라이언트)
builder.Services.AddScoped<CustomAuthenticationStateProvider>();
builder.Services.AddScoped<AuthenticationStateProvider>(sp => sp.GetRequiredService<CustomAuthenticationStateProvider>());
builder.Services.AddScoped<ILocalStorageService, LocalStorageService>();
builder.Services.AddCascadingAuthenticationState();
builder.Services.AddAuthorizationCore();
await builder.Build().RunAsync();
@@ -1,118 +0,0 @@
namespace TaxBaik.Web.Services.AdminClients;
using System.Collections.Generic;
using System.Net.Http.Json;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using TaxBaik.Domain.Entities;
using Microsoft.Extensions.Logging;
public interface ICommonCodeBrowserClient
{
Task<List<string>> GetGroupsAsync(CancellationToken ct = default);
Task<List<CommonCode>> GetAllActiveAsync(CancellationToken ct = default);
Task<List<CommonCode>> GetByGroupAsync(string group, CancellationToken ct = default);
Task<CommonCode?> GetAsync(string group, string value, CancellationToken ct = default);
Task<bool> UpsertAsync(CommonCode code, CancellationToken ct = default);
Task<bool> DeleteAsync(string group, string value, CancellationToken ct = default);
}
public class CommonCodeBrowserClient(HttpClient httpClient, ITokenStore tokenStore, ILogger<CommonCodeBrowserClient> logger) : ICommonCodeBrowserClient
{
private const string BaseUrl = "/api/commoncode";
private void EnsureAuthHeader()
{
if (!string.IsNullOrEmpty(tokenStore.AccessToken))
httpClient.DefaultRequestHeaders.Authorization = new("Bearer", tokenStore.AccessToken);
else
httpClient.DefaultRequestHeaders.Authorization = null;
}
public async Task<List<CommonCode>> GetAllActiveAsync(CancellationToken ct = default)
{
try
{
EnsureAuthHeader();
return await httpClient.GetFromJsonAsync<List<CommonCode>>($"{BaseUrl}", ct) ?? [];
}
catch (Exception ex)
{
logger.LogError(ex, "Failed to get all active common codes");
return [];
}
}
public async Task<List<CommonCode>> GetByGroupAsync(string group, CancellationToken ct = default)
{
try
{
EnsureAuthHeader();
return await httpClient.GetFromJsonAsync<List<CommonCode>>($"{BaseUrl}/group/{group}", ct) ?? [];
}
catch (Exception ex)
{
logger.LogError(ex, "Failed to get common codes for group {Group}", group);
return [];
}
}
public async Task<List<string>> GetGroupsAsync(CancellationToken ct = default)
{
try
{
EnsureAuthHeader();
return await httpClient.GetFromJsonAsync<List<string>>($"{BaseUrl}/groups", ct) ?? [];
}
catch (Exception ex)
{
logger.LogError(ex, "Failed to get common code groups");
return [];
}
}
public async Task<CommonCode?> GetAsync(string group, string value, CancellationToken ct = default)
{
try
{
EnsureAuthHeader();
return await httpClient.GetFromJsonAsync<CommonCode>($"{BaseUrl}/{group}/{value}", ct);
}
catch (Exception ex)
{
logger.LogError(ex, "Failed to get common code {Group}/{Value}", group, value);
return null;
}
}
public async Task<bool> UpsertAsync(CommonCode code, CancellationToken ct = default)
{
try
{
EnsureAuthHeader();
var response = await httpClient.PostAsJsonAsync(BaseUrl, code, ct);
return response.IsSuccessStatusCode;
}
catch (Exception ex)
{
logger.LogError(ex, "Failed to upsert common code {Group}/{Value}", code.CodeGroup, code.CodeValue);
return false;
}
}
public async Task<bool> DeleteAsync(string group, string value, CancellationToken ct = default)
{
try
{
EnsureAuthHeader();
var response = await httpClient.DeleteAsync($"{BaseUrl}/{group}/{value}", ct);
return response.IsSuccessStatusCode;
}
catch (Exception ex)
{
logger.LogError(ex, "Failed to delete common code {Group}/{Value}", group, value);
return false;
}
}
}
@@ -15,10 +15,7 @@
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.9" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.9" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.19.1" />
<PackageReference Include="MudBlazor" Version="6.10.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.19.1" />
</ItemGroup>
</Project>
-573
View File
@@ -1,573 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v10.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v10.0": {
"TaxBaik.Web/1.0.0": {
"dependencies": {
"BCrypt.Net-Next": "4.0.3",
"Microsoft.AspNetCore.Authentication.Google": "10.0.9",
"Microsoft.AspNetCore.Authentication.JwtBearer": "10.0.9",
"Microsoft.AspNetCore.Components.WebAssembly.Server": "10.0.9",
"Microsoft.IdentityModel.Tokens": "8.19.1",
"MudBlazor": "6.10.0",
"Serilog.AspNetCore": "8.0.1",
"Serilog.Sinks.Console": "6.0.0",
"Serilog.Sinks.File": "5.0.0",
"System.IdentityModel.Tokens.Jwt": "8.19.1",
"TaxBaik.Application": "1.0.0",
"TaxBaik.Infrastructure": "1.0.0",
"TaxBaik.Web.Client": "1.0.0"
},
"runtime": {
"TaxBaik.Web.dll": {}
}
},
"BCrypt.Net-Next/4.0.3": {
"runtime": {
"lib/net6.0/BCrypt.Net-Next.dll": {
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.0.3.0"
}
}
},
"Dapper/2.1.15": {
"runtime": {
"lib/net5.0/Dapper.dll": {
"assemblyVersion": "2.0.0.0",
"fileVersion": "2.1.15.52653"
}
}
},
"Microsoft.AspNetCore.Authentication.Google/10.0.9": {
"runtime": {
"lib/net10.0/Microsoft.AspNetCore.Authentication.Google.dll": {
"assemblyVersion": "10.0.9.0",
"fileVersion": "10.0.926.27113"
}
}
},
"Microsoft.AspNetCore.Authentication.JwtBearer/10.0.9": {
"dependencies": {
"Microsoft.IdentityModel.Protocols.OpenIdConnect": "8.0.1"
},
"runtime": {
"lib/net10.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll": {
"assemblyVersion": "10.0.9.0",
"fileVersion": "10.0.926.27113"
}
}
},
"Microsoft.AspNetCore.Components.WebAssembly/10.0.9": {
"dependencies": {
"Microsoft.JSInterop.WebAssembly": "10.0.9"
},
"runtime": {
"lib/net10.0/Microsoft.AspNetCore.Components.WebAssembly.dll": {
"assemblyVersion": "10.0.9.0",
"fileVersion": "10.0.926.27113"
}
}
},
"Microsoft.AspNetCore.Components.WebAssembly.Server/10.0.9": {
"dependencies": {
"Microsoft.AspNetCore.Components.WebAssembly": "10.0.9"
},
"runtime": {
"lib/net10.0/Microsoft.AspNetCore.Components.WebAssembly.Server.dll": {
"assemblyVersion": "10.0.9.0",
"fileVersion": "10.0.926.27113"
}
}
},
"Microsoft.Bcl.Cryptography/10.0.2": {
"runtime": {
"lib/net10.0/Microsoft.Bcl.Cryptography.dll": {
"assemblyVersion": "10.0.0.2",
"fileVersion": "10.0.225.61305"
}
}
},
"Microsoft.Extensions.DependencyModel/8.0.0": {
"runtime": {
"lib/net8.0/Microsoft.Extensions.DependencyModel.dll": {
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
}
},
"Microsoft.IdentityModel.Abstractions/8.19.1": {
"runtime": {
"lib/net10.0/Microsoft.IdentityModel.Abstractions.dll": {
"assemblyVersion": "8.19.1.0",
"fileVersion": "8.19.1.26153"
}
}
},
"Microsoft.IdentityModel.JsonWebTokens/8.19.1": {
"dependencies": {
"Microsoft.IdentityModel.Tokens": "8.19.1"
},
"runtime": {
"lib/net10.0/Microsoft.IdentityModel.JsonWebTokens.dll": {
"assemblyVersion": "8.19.1.0",
"fileVersion": "8.19.1.26153"
}
}
},
"Microsoft.IdentityModel.Logging/8.19.1": {
"dependencies": {
"Microsoft.IdentityModel.Abstractions": "8.19.1"
},
"runtime": {
"lib/net10.0/Microsoft.IdentityModel.Logging.dll": {
"assemblyVersion": "8.19.1.0",
"fileVersion": "8.19.1.26153"
}
}
},
"Microsoft.IdentityModel.Protocols/8.0.1": {
"dependencies": {
"Microsoft.IdentityModel.Tokens": "8.19.1"
},
"runtime": {
"lib/net9.0/Microsoft.IdentityModel.Protocols.dll": {
"assemblyVersion": "8.0.1.0",
"fileVersion": "8.0.1.50722"
}
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect/8.0.1": {
"dependencies": {
"Microsoft.IdentityModel.Protocols": "8.0.1",
"System.IdentityModel.Tokens.Jwt": "8.19.1"
},
"runtime": {
"lib/net9.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll": {
"assemblyVersion": "8.0.1.0",
"fileVersion": "8.0.1.50722"
}
}
},
"Microsoft.IdentityModel.Tokens/8.19.1": {
"dependencies": {
"Microsoft.Bcl.Cryptography": "10.0.2",
"Microsoft.IdentityModel.Logging": "8.19.1"
},
"runtime": {
"lib/net10.0/Microsoft.IdentityModel.Tokens.dll": {
"assemblyVersion": "8.19.1.0",
"fileVersion": "8.19.1.26153"
}
}
},
"Microsoft.JSInterop.WebAssembly/10.0.9": {
"runtime": {
"lib/net10.0/Microsoft.JSInterop.WebAssembly.dll": {
"assemblyVersion": "10.0.9.0",
"fileVersion": "10.0.926.27113"
}
}
},
"MudBlazor/6.10.0": {
"runtime": {
"lib/net7.0/MudBlazor.dll": {
"assemblyVersion": "6.10.0.0",
"fileVersion": "6.10.0.0"
}
}
},
"Npgsql/10.0.3": {
"runtime": {
"lib/net10.0/Npgsql.dll": {
"assemblyVersion": "10.0.3.0",
"fileVersion": "10.0.3.0"
}
}
},
"Serilog/4.0.0": {
"runtime": {
"lib/net8.0/Serilog.dll": {
"assemblyVersion": "4.0.0.0",
"fileVersion": "4.0.0.0"
}
}
},
"Serilog.AspNetCore/8.0.1": {
"dependencies": {
"Serilog": "4.0.0",
"Serilog.Extensions.Hosting": "8.0.0",
"Serilog.Extensions.Logging": "8.0.0",
"Serilog.Formatting.Compact": "2.0.0",
"Serilog.Settings.Configuration": "8.0.0",
"Serilog.Sinks.Console": "6.0.0",
"Serilog.Sinks.Debug": "2.0.0",
"Serilog.Sinks.File": "5.0.0"
},
"runtime": {
"lib/net8.0/Serilog.AspNetCore.dll": {
"assemblyVersion": "8.0.1.0",
"fileVersion": "8.0.1.0"
}
}
},
"Serilog.Extensions.Hosting/8.0.0": {
"dependencies": {
"Serilog": "4.0.0",
"Serilog.Extensions.Logging": "8.0.0"
},
"runtime": {
"lib/net8.0/Serilog.Extensions.Hosting.dll": {
"assemblyVersion": "7.0.0.0",
"fileVersion": "8.0.0.0"
}
}
},
"Serilog.Extensions.Logging/8.0.0": {
"dependencies": {
"Serilog": "4.0.0"
},
"runtime": {
"lib/net8.0/Serilog.Extensions.Logging.dll": {
"assemblyVersion": "7.0.0.0",
"fileVersion": "8.0.0.0"
}
}
},
"Serilog.Formatting.Compact/2.0.0": {
"dependencies": {
"Serilog": "4.0.0"
},
"runtime": {
"lib/net7.0/Serilog.Formatting.Compact.dll": {
"assemblyVersion": "2.0.0.0",
"fileVersion": "2.0.0.0"
}
}
},
"Serilog.Settings.Configuration/8.0.0": {
"dependencies": {
"Microsoft.Extensions.DependencyModel": "8.0.0",
"Serilog": "4.0.0"
},
"runtime": {
"lib/net8.0/Serilog.Settings.Configuration.dll": {
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.0.0"
}
}
},
"Serilog.Sinks.Console/6.0.0": {
"dependencies": {
"Serilog": "4.0.0"
},
"runtime": {
"lib/net8.0/Serilog.Sinks.Console.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.0.0"
}
}
},
"Serilog.Sinks.Debug/2.0.0": {
"dependencies": {
"Serilog": "4.0.0"
},
"runtime": {
"lib/netstandard2.1/Serilog.Sinks.Debug.dll": {
"assemblyVersion": "2.0.0.0",
"fileVersion": "2.0.0.0"
}
}
},
"Serilog.Sinks.File/5.0.0": {
"dependencies": {
"Serilog": "4.0.0"
},
"runtime": {
"lib/net5.0/Serilog.Sinks.File.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.0"
}
}
},
"System.IdentityModel.Tokens.Jwt/8.19.1": {
"dependencies": {
"Microsoft.IdentityModel.JsonWebTokens": "8.19.1",
"Microsoft.IdentityModel.Tokens": "8.19.1"
},
"runtime": {
"lib/net10.0/System.IdentityModel.Tokens.Jwt.dll": {
"assemblyVersion": "8.19.1.0",
"fileVersion": "8.19.1.26153"
}
}
},
"TaxBaik.Application/1.0.0": {
"dependencies": {
"TaxBaik.Domain": "1.0.0"
},
"runtime": {
"TaxBaik.Application.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.0.0.0"
}
}
},
"TaxBaik.Domain/1.0.0": {
"runtime": {
"TaxBaik.Domain.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.0.0.0"
}
}
},
"TaxBaik.Infrastructure/1.0.0": {
"dependencies": {
"Dapper": "2.1.15",
"Npgsql": "10.0.3",
"TaxBaik.Domain": "1.0.0"
},
"runtime": {
"TaxBaik.Infrastructure.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.0.0.0"
}
}
},
"TaxBaik.Web.Client/1.0.0": {
"dependencies": {
"Microsoft.AspNetCore.Components.WebAssembly": "10.0.9",
"Microsoft.IdentityModel.Tokens": "8.19.1",
"MudBlazor": "6.10.0",
"System.IdentityModel.Tokens.Jwt": "8.19.1",
"TaxBaik.Application": "1.0.0"
},
"runtime": {
"TaxBaik.Web.Client.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.0.0.0"
}
}
}
}
},
"libraries": {
"TaxBaik.Web/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"BCrypt.Net-Next/4.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-W+U9WvmZQgi5cX6FS5GDtDoPzUCV4LkBLkywq/kRZhuDwcbavOzcDAr3LXJFqHUi952Yj3LEYoWW0jbEUQChsA==",
"path": "bcrypt.net-next/4.0.3",
"hashPath": "bcrypt.net-next.4.0.3.nupkg.sha512"
},
"Dapper/2.1.15": {
"type": "package",
"serviceable": true,
"sha512": "sha512-1aWSAosZymEM+mRwfrXteRIN74/JTUjqj9B/KqEbanH6vfUKy9D9cemRN0q1ZOEfSB7d1PpFTpVOCbf2Uv70Og==",
"path": "dapper/2.1.15",
"hashPath": "dapper.2.1.15.nupkg.sha512"
},
"Microsoft.AspNetCore.Authentication.Google/10.0.9": {
"type": "package",
"serviceable": true,
"sha512": "sha512-xqjTc8/ap0dwKmdaqSlV8RxjXb02uQ8rynDtTuHRU2gmOYaNm6O+uUjobp4Ararzq0ndKNXiWnQErxjWEGFGiA==",
"path": "microsoft.aspnetcore.authentication.google/10.0.9",
"hashPath": "microsoft.aspnetcore.authentication.google.10.0.9.nupkg.sha512"
},
"Microsoft.AspNetCore.Authentication.JwtBearer/10.0.9": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Hs5NDsGm8YicDDNx5RoBIT+H2AB9R27MvZ2gHoupTiHr+nnH3VxzY7DcmlbJ3b5DvvOhK35lWt/9Odtrq9sjtA==",
"path": "microsoft.aspnetcore.authentication.jwtbearer/10.0.9",
"hashPath": "microsoft.aspnetcore.authentication.jwtbearer.10.0.9.nupkg.sha512"
},
"Microsoft.AspNetCore.Components.WebAssembly/10.0.9": {
"type": "package",
"serviceable": true,
"sha512": "sha512-tBv68AsZ3r6z2QdV2m3cSSKUCbvEscN8REpHxcUs22vlR6UjTz6IKdInKNREkJ/3G1AQrBKrRTdrfrHVffE8Iw==",
"path": "microsoft.aspnetcore.components.webassembly/10.0.9",
"hashPath": "microsoft.aspnetcore.components.webassembly.10.0.9.nupkg.sha512"
},
"Microsoft.AspNetCore.Components.WebAssembly.Server/10.0.9": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ZTtYvBILwGxhIiXi1L03ETBBOgMmizStu7dO/YblK6rPTa27wpEgYKp5Z9bUfr+wsFvHIDWd/ZMGb9on41f6yw==",
"path": "microsoft.aspnetcore.components.webassembly.server/10.0.9",
"hashPath": "microsoft.aspnetcore.components.webassembly.server.10.0.9.nupkg.sha512"
},
"Microsoft.Bcl.Cryptography/10.0.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LG9Yll3B5aNpxv0+D47g6LiOiKBIlodhcHdQwcYzo8VeexFLGqx5ymetmA2aBRyo9cCcWsQWrFsdbsr8LvmWDw==",
"path": "microsoft.bcl.cryptography/10.0.2",
"hashPath": "microsoft.bcl.cryptography.10.0.2.nupkg.sha512"
},
"Microsoft.Extensions.DependencyModel/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-NSmDw3K0ozNDgShSIpsZcbFIzBX4w28nDag+TfaQujkXGazBm+lid5onlWoCBy4VsLxqnnKjEBbGSJVWJMf43g==",
"path": "microsoft.extensions.dependencymodel/8.0.0",
"hashPath": "microsoft.extensions.dependencymodel.8.0.0.nupkg.sha512"
},
"Microsoft.IdentityModel.Abstractions/8.19.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-gFA8THIk23uNF/vMdOHnjIdXD1LyA2g12cHzMJ+Xag6WpgWLw6E/6uCXxvA0gp9d2yAvkRt3xzFzMUiO/hofnQ==",
"path": "microsoft.identitymodel.abstractions/8.19.1",
"hashPath": "microsoft.identitymodel.abstractions.8.19.1.nupkg.sha512"
},
"Microsoft.IdentityModel.JsonWebTokens/8.19.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-6eeY+y2QFyjj3XnCz/8gJdoP5smYHTS9ow1bw2nsZzDIPjPhBZlackYTIduSMipVpxnoT/B62LkrXX2jPggOXg==",
"path": "microsoft.identitymodel.jsonwebtokens/8.19.1",
"hashPath": "microsoft.identitymodel.jsonwebtokens.8.19.1.nupkg.sha512"
},
"Microsoft.IdentityModel.Logging/8.19.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-H+sMrMpdbWnwkQnpb/ESkQovtOgdefmj0ecGCcP40mDKzE5i4dUYkH6599M9mWYFNGNJnTp92l/9wLubYXWimw==",
"path": "microsoft.identitymodel.logging/8.19.1",
"hashPath": "microsoft.identitymodel.logging.8.19.1.nupkg.sha512"
},
"Microsoft.IdentityModel.Protocols/8.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-uA2vpKqU3I2mBBEaeJAWPTjT9v1TZrGWKdgK6G5qJd03CLx83kdiqO9cmiK8/n1erkHzFBwU/RphP83aAe3i3g==",
"path": "microsoft.identitymodel.protocols/8.0.1",
"hashPath": "microsoft.identitymodel.protocols.8.0.1.nupkg.sha512"
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect/8.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-AQDbfpL+yzuuGhO/mQhKNsp44pm5Jv8/BI4KiFXR7beVGZoSH35zMV3PrmcfvSTsyI6qrcR898NzUauD6SRigg==",
"path": "microsoft.identitymodel.protocols.openidconnect/8.0.1",
"hashPath": "microsoft.identitymodel.protocols.openidconnect.8.0.1.nupkg.sha512"
},
"Microsoft.IdentityModel.Tokens/8.19.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-KDiuSLXud2AFVNAOottd8ztVysfPeHyr4r8gofU3/VKUXlI7oytzGTnPsNJ/B3nui17rgz8wAdWNJOtzPjkUxw==",
"path": "microsoft.identitymodel.tokens/8.19.1",
"hashPath": "microsoft.identitymodel.tokens.8.19.1.nupkg.sha512"
},
"Microsoft.JSInterop.WebAssembly/10.0.9": {
"type": "package",
"serviceable": true,
"sha512": "sha512-4G0A7GuQrtCAes8PuJPTDUcy+lCrxHWjr8ZlkDOa4h8a2Txj1XdhbXKLnld2vMY5EyZNC5jZXxa1xTD/AOCUlw==",
"path": "microsoft.jsinterop.webassembly/10.0.9",
"hashPath": "microsoft.jsinterop.webassembly.10.0.9.nupkg.sha512"
},
"MudBlazor/6.10.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Dpjouo3MVva4p8Nh2VCzHzvzReWhnzmCBNlrhymeXjn6oBEtT3Oi9z/R2sHOg/jYrW/hIPKMhfZHnptilHScsw==",
"path": "mudblazor/6.10.0",
"hashPath": "mudblazor.6.10.0.nupkg.sha512"
},
"Npgsql/10.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-7nb5YzXuvWWJxB0J8DiyL3we+X4FOctZrt0fIBnucOIaIevFEEwGQVZKtiu9olXdlNAK1eNgqSral6r/jlhI4w==",
"path": "npgsql/10.0.3",
"hashPath": "npgsql.10.0.3.nupkg.sha512"
},
"Serilog/4.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-2jDkUrSh5EofOp7Lx5Zgy0EB+7hXjjxE2ktTb1WVQmU00lDACR2TdROGKU0K1pDTBSJBN1PqgYpgOZF8mL7NJw==",
"path": "serilog/4.0.0",
"hashPath": "serilog.4.0.0.nupkg.sha512"
},
"Serilog.AspNetCore/8.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-B/X+wAfS7yWLVOTD83B+Ip9yl4MkhioaXj90JSoWi1Ayi8XHepEnsBdrkojg08eodCnmOKmShFUN2GgEc6c0CQ==",
"path": "serilog.aspnetcore/8.0.1",
"hashPath": "serilog.aspnetcore.8.0.1.nupkg.sha512"
},
"Serilog.Extensions.Hosting/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-db0OcbWeSCvYQkHWu6n0v40N4kKaTAXNjlM3BKvcbwvNzYphQFcBR+36eQ/7hMMwOkJvAyLC2a9/jNdUL5NjtQ==",
"path": "serilog.extensions.hosting/8.0.0",
"hashPath": "serilog.extensions.hosting.8.0.0.nupkg.sha512"
},
"Serilog.Extensions.Logging/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-YEAMWu1UnWgf1c1KP85l1SgXGfiVo0Rz6x08pCiPOIBt2Qe18tcZLvdBUuV5o1QHvrs8FAry9wTIhgBRtjIlEg==",
"path": "serilog.extensions.logging/8.0.0",
"hashPath": "serilog.extensions.logging.8.0.0.nupkg.sha512"
},
"Serilog.Formatting.Compact/2.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ob6z3ikzFM3D1xalhFuBIK1IOWf+XrQq+H4KeH4VqBcPpNcmUgZlRQ2h3Q7wvthpdZBBoY86qZOI2LCXNaLlNA==",
"path": "serilog.formatting.compact/2.0.0",
"hashPath": "serilog.formatting.compact.2.0.0.nupkg.sha512"
},
"Serilog.Settings.Configuration/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-nR0iL5HwKj5v6ULo3/zpP8NMcq9E2pxYA6XKTSWCbugVs4YqPyvaqaKOY+OMpPivKp7zMEpax2UKHnDodbRB0Q==",
"path": "serilog.settings.configuration/8.0.0",
"hashPath": "serilog.settings.configuration.8.0.0.nupkg.sha512"
},
"Serilog.Sinks.Console/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-fQGWqVMClCP2yEyTXPIinSr5c+CBGUvBybPxjAGcf7ctDhadFhrQw03Mv8rJ07/wR5PDfFjewf2LimvXCDzpbA==",
"path": "serilog.sinks.console/6.0.0",
"hashPath": "serilog.sinks.console.6.0.0.nupkg.sha512"
},
"Serilog.Sinks.Debug/2.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Y6g3OBJ4JzTyyw16fDqtFcQ41qQAydnEvEqmXjhwhgjsnG/FaJ8GUqF5ldsC/bVkK8KYmqrPhDO+tm4dF6xx4A==",
"path": "serilog.sinks.debug/2.0.0",
"hashPath": "serilog.sinks.debug.2.0.0.nupkg.sha512"
},
"Serilog.Sinks.File/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-uwV5hdhWPwUH1szhO8PJpFiahqXmzPzJT/sOijH/kFgUx+cyoDTMM8MHD0adw9+Iem6itoibbUXHYslzXsLEAg==",
"path": "serilog.sinks.file/5.0.0",
"hashPath": "serilog.sinks.file.5.0.0.nupkg.sha512"
},
"System.IdentityModel.Tokens.Jwt/8.19.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-2VHcRtT95GAcW1E3aVBLvL2rAAMxKHXKMXKXFyWzwgkdFXZPMMvP8tVOfnRydL4vTr1RirNuGC6T8VSEF2YsPQ==",
"path": "system.identitymodel.tokens.jwt/8.19.1",
"hashPath": "system.identitymodel.tokens.jwt.8.19.1.nupkg.sha512"
},
"TaxBaik.Application/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"TaxBaik.Domain/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"TaxBaik.Infrastructure/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"TaxBaik.Web.Client/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
-20
View File
@@ -1,20 +0,0 @@
{
"runtimeOptions": {
"tfm": "net10.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "10.0.0"
},
{
"name": "Microsoft.AspNetCore.App",
"version": "10.0.0"
}
],
"configProperties": {
"System.GC.Server": true,
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}
File diff suppressed because one or more lines are too long
+12 -17
View File
@@ -6,16 +6,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>백원숙 세무회계 - 관리자</title>
<base href="/taxbaik/" />
<link rel="icon" type="image/svg+xml" href="/taxbaik/favicon.svg" />
<link rel="alternate icon" href="/taxbaik/favicon.ico" />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
<!-- EasyMDE 마크다운 에디터 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/easymde@2.18.0/dist/easymde.min.css" />
<script src="https://cdn.jsdelivr.net/npm/easymde@2.18.0/dist/easymde.min.js"></script>
<!-- Marked 라이브러리 (EasyMDE 미리보기용) -->
<script src="https://cdn.jsdelivr.net/npm/marked@11.1.1/marked.min.js"></script>
<script>
document.documentElement.classList.toggle(
'admin-login-route',
@@ -39,11 +32,13 @@
</div>
</div>
<MudThemeProvider @bind-IsDarkMode="isDarkMode" Theme="mudTheme" />
<Routes @rendermode="new InteractiveServerRenderMode(prerender: true)" />
<MudPopoverProvider />
<MudDialogProvider />
<MudSnackbarProvider />
<Routes @rendermode="new InteractiveServerRenderMode(prerender: false)" />
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
<script src="js/admin-session.js"></script>
<script src="_framework/blazor.web.js"></script>
<script>window.taxbaikAdminSession?.bindLoginForm();</script>
<script>window.taxbaikAdminSession?.watchReconnect();</script>
</body>
</html>
@@ -85,49 +80,49 @@
},
LayoutProperties = new LayoutProperties()
{
DefaultBorderRadius = "6px"
DefaultBorderRadius = "8px"
},
Typography = new Typography()
{
Default = new Default()
{
FontSize = ".8125rem",
FontSize = ".875rem",
FontWeight = 400,
LineHeight = 1.5
},
H1 = new H1()
{
FontSize = "1.75rem",
FontSize = "2.5rem",
FontWeight = 600,
LineHeight = 1.2
},
H2 = new H2()
{
FontSize = "1.5rem",
FontSize = "2rem",
FontWeight = 600,
LineHeight = 1.3
},
H3 = new H3()
{
FontSize = "1.25rem",
FontSize = "1.75rem",
FontWeight = 600,
LineHeight = 1.3
},
H4 = new H4()
{
FontSize = "1.1rem",
FontSize = "1.5rem",
FontWeight = 600,
LineHeight = 1.4
},
H5 = new H5()
{
FontSize = "0.95rem",
FontSize = "1.25rem",
FontWeight = 500,
LineHeight = 1.4
},
H6 = new H6()
{
FontSize = "0.85rem",
FontSize = "1rem",
FontWeight = 500,
LineHeight = 1.5
}
@@ -1,13 +1,7 @@
@inherits LayoutComponentBase
@inject NavigationManager Navigation
@inject IJSRuntime JS
@inject VersionInfo VersionInfo
@implements IDisposable
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: true))
<MudPopoverProvider />
<MudDialogProvider />
<MudSnackbarProvider />
<MudLayout Class="admin-shell">
<MudAppBar Elevation="0" Class="admin-topbar">
@@ -16,9 +10,9 @@
Edge="Edge.Start"
Class="admin-menu-button"
OnClick="@ToggleDrawer" />
<div class="admin-topbar-title" style="display: flex; align-items: center; gap: 8px;">
<MudText Typo="Typo.body2" Class="font-weight-bold" Style="color: var(--primary-color);">[TaxBaik]</MudText>
<MudText Typo="Typo.body2" Style="font-weight: bold; color: #1E293B;">세무회계 관리 대시보드</MudText>
<div class="admin-topbar-title">
<MudText Typo="Typo.caption" Color="Color.Secondary">TaxBaik Admin</MudText>
<MudText Typo="Typo.h6">세무회계 관리 대시보드</MudText>
</div>
<MudSpacer />
@@ -88,14 +82,7 @@
<MudNavLink Href="/taxbaik/admin/inquiries" Icon="@Icons.Material.Filled.Forum">문의 관리</MudNavLink>
<MudNavLink Href="/taxbaik/admin/settings" Icon="@Icons.Material.Filled.Tune">설정</MudNavLink>
<MudNavLink Href="/taxbaik/admin/common-codes" Icon="@Icons.Material.Filled.Category">공통관리</MudNavLink>
</MudNavMenu>
<div class="admin-drawer-version">
<div class="admin-drawer-version-label">Version</div>
<div class="admin-drawer-version-value">v@(VersionInfo.Version)</div>
<div class="admin-drawer-version-built">@VersionInfo.Built</div>
</div>
</MudDrawer>
<MudMainContent Class="admin-main">
@@ -128,7 +115,7 @@
private void OnLocationChanged(object? sender, LocationChangedEventArgs args)
{
_ = InvokeAsync(() => JS.InvokeVoidAsync("taxbaikAdminSession.hideLoading"));
_ = InvokeAsync(() => JS.InvokeVoidAsync("taxbaikAdminSession.showLoading"));
}
private void ToggleDrawer()
@@ -22,22 +22,14 @@
</MudButton>
</section>
<div class="d-flex pa-4 gap-4 align-center">
<MudTextField @bind-Value="searchQuery" Placeholder="공지사항 제목 검색..." Adornment="Adornment.Start"
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="flex-grow-1" Immediate="true" Clearable="true" />
</div>
<MudPaper Class="admin-surface" Elevation="0">
@if (announcements is null)
{
<MudProgressLinear Indeterminate="true" />
}
else if (!FilteredAnnouncements.Any())
else if (!announcements.Any())
{
<div class="pa-6 text-center">
<MudIcon Icon="@Icons.Material.Filled.Campaign" Style="font-size:3rem; opacity:.3;" />
<MudText Class="mt-2 text-muted">검색 조건에 맞는 공지사항이 없습니다.</MudText>
</div>
<MudText Class="pa-4 text-muted">등록된 공지사항이 없습니다.</MudText>
}
else
{
@@ -53,7 +45,7 @@
</tr>
</thead>
<tbody>
@foreach (var item in FilteredAnnouncements)
@foreach (var item in announcements)
{
<tr>
<td>@item.Title</td>
@@ -94,9 +86,6 @@
}
</tbody>
</MudSimpleTable>
<MudText Typo="Typo.caption" Class="pa-2 text-muted">
검색 결과 @(FilteredAnnouncements.Count())개 · 총 @(announcements.Count)개
</MudText>
}
</MudPaper>
@@ -105,12 +94,6 @@
private Task<AuthenticationState>? AuthStateTask { get; set; }
private List<Announcement>? announcements;
private string searchQuery = "";
private IEnumerable<Announcement> FilteredAnnouncements => announcements?
.Where(a => string.IsNullOrEmpty(searchQuery) ||
a.Title.Contains(searchQuery, StringComparison.OrdinalIgnoreCase))
.OrderBy(a => a.SortOrder) ?? Enumerable.Empty<Announcement>();
protected override async Task OnAfterRenderAsync(bool firstRender)
{
@@ -1,6 +1,5 @@
@page "/admin/blog/create"
@attribute [Authorize]
@rendermode @(new InteractiveServerRenderMode(prerender: false))
@using TaxBaik.Application.DTOs
@using TaxBaik.Application.Services
@using TaxBaik.Domain.Interfaces
@@ -22,8 +21,8 @@
<MudPaper Class="pa-4 mt-4" Elevation="1">
<MudForm @ref="form">
<MudTextField @bind-Value="model.Title" Label="제목 *"
Variant="Variant.Outlined" Class="mb-4" Required="true" RequiredError="제목을 입력하세요." Counter="100" MaxLength="100" />
<MudTextField @bind-Value="model.Title" Label="제목"
Variant="Variant.Outlined" Class="mb-4" Required="true" />
<MudSelect T="int?" @bind-Value="model.CategoryId" Label="카테고리"
Variant="Variant.Outlined" Class="mb-4">
@@ -33,11 +32,8 @@
}
</MudSelect>
<div class="mb-4">
<label class="d-block mb-2" style="font-weight: 500;">본문 내용 (마크다운) *</label>
<textarea id="markdown-editor" @bind="model.Content" style="display: none;"></textarea>
<div id="editor-container" style="border: 1px solid #d0d0d0; border-radius: 4px; min-height: 400px;"></div>
</div>
<MudTextField @bind-Value="model.Content" Label="본문"
Variant="Variant.Outlined" Lines="10" Class="mb-4" Required="true" />
<MudTextField @bind-Value="model.Tags" Label="태그 (쉼표로 구분)"
Variant="Variant.Outlined" Class="mb-4" />
@@ -61,24 +57,12 @@
private MudForm? form;
private List<Domain.Entities.Category> categories = [];
private CreatePostModel model = new();
private EasyMDE.Editor? editor;
[Inject]
private IJSRuntime JS { get; set; } = null!;
protected override async Task OnInitializedAsync()
{
categories = (await CategoryRepository.GetAllAsync()).ToList();
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await JS.InvokeVoidAsync("window.initMarkdownEditor", "markdown-editor", model.Content ?? "");
}
}
private void GoBack()
{
Navigation.NavigateTo("/taxbaik/admin/blog");
@@ -89,15 +73,6 @@
if (form == null)
return;
// 에디터에서 최신 내용 가져오기
model.Content = await JS.InvokeAsync<string>("window.getMarkdownContent");
if (string.IsNullOrWhiteSpace(model.Content))
{
Snackbar.Add("본문 내용을 입력하세요.", Severity.Error);
return;
}
await form.Validate();
if (!form.IsValid)
return;
@@ -135,33 +110,3 @@
public bool IsPublished { get; set; }
}
}
<!-- EasyMDE 초기화 스크립트 -->
<script>
window.initMarkdownEditor = function(editorId, initialContent) {
if (!window.easyMDEInstance) {
window.easyMDEInstance = new EasyMDE({
element: document.getElementById(editorId),
spellChecker: false,
autoDownloadFontAwesome: false,
initialValue: initialContent || "",
toolbar: [
"bold", "italic", "strikethrough", "|",
"heading", "code", "|",
"unordered-list", "ordered-list", "|",
"link", "image", "table", "|",
"quote", "horizontal-rule", "|",
"preview", "side-by-side", "fullscreen", "|",
"guide"
],
previewRender: function(plainText) {
return marked.parse(plainText);
}
});
}
};
window.getMarkdownContent = function() {
return window.easyMDEInstance ? window.easyMDEInstance.value() : "";
};
</script>
@@ -1,6 +1,5 @@
@page "/admin/blog/{id:int}/edit"
@attribute [Authorize]
@rendermode @(new InteractiveServerRenderMode(prerender: false))
@using TaxBaik.Application.DTOs
@using TaxBaik.Application.Services
@using TaxBaik.Domain.Interfaces
@@ -33,8 +32,8 @@ else
{
<MudPaper Class="pa-4 mt-4" Elevation="1">
<MudForm @ref="form">
<MudTextField @bind-Value="model.Title" Label="제목 *"
Variant="Variant.Outlined" Class="mb-4" Required="true" RequiredError="제목을 입력하세요." Counter="100" MaxLength="100" />
<MudTextField @bind-Value="model.Title" Label="제목"
Variant="Variant.Outlined" Class="mb-4" Required="true" />
<MudSelect T="int?" @bind-Value="model.CategoryId" Label="카테고리"
Variant="Variant.Outlined" Class="mb-4">
@@ -44,11 +43,8 @@ else
}
</MudSelect>
<div class="mb-4">
<label class="d-block mb-2" style="font-weight: 500;">본문 내용 (마크다운) *</label>
<textarea id="markdown-editor" @bind="model.Content" style="display: none;"></textarea>
<div id="editor-container" style="border: 1px solid #d0d0d0; border-radius: 4px; min-height: 400px;"></div>
</div>
<MudTextField @bind-Value="model.Content" Label="본문"
Variant="Variant.Outlined" Lines="10" Class="mb-4" Required="true" />
<MudTextField @bind-Value="model.Tags" Label="태그 (쉼표로 구분)"
Variant="Variant.Outlined" Class="mb-4" />
@@ -75,9 +71,6 @@ else
[Parameter]
public int Id { get; set; }
[Inject]
private IJSRuntime JS { get; set; } = null!;
private MudForm? form;
private Domain.Entities.BlogPost? post;
private List<Domain.Entities.Category> categories = [];
@@ -105,14 +98,6 @@ else
}
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender && post != null)
{
await JS.InvokeVoidAsync("window.initMarkdownEditor", "markdown-editor", model.Content ?? "");
}
}
private void MapPostToModel(Domain.Entities.BlogPost post)
{
model.Title = post.Title;
@@ -134,15 +119,6 @@ else
if (form == null || post == null)
return;
// 에디터에서 최신 내용 가져오기
model.Content = await JS.InvokeAsync<string>("window.getMarkdownContent");
if (string.IsNullOrWhiteSpace(model.Content))
{
Snackbar.Add("본문 내용을 입력하세요.", Severity.Error);
return;
}
await form.Validate();
if (!form.IsValid)
return;
@@ -209,33 +185,3 @@ else
public bool IsPublished { get; set; }
}
}
<!-- EasyMDE 초기화 스크립트 -->
<script>
window.initMarkdownEditor = function(editorId, initialContent) {
if (!window.easyMDEInstance) {
window.easyMDEInstance = new EasyMDE({
element: document.getElementById(editorId),
spellChecker: false,
autoDownloadFontAwesome: false,
initialValue: initialContent || "",
toolbar: [
"bold", "italic", "strikethrough", "|",
"heading", "code", "|",
"unordered-list", "ordered-list", "|",
"link", "image", "table", "|",
"quote", "horizontal-rule", "|",
"preview", "side-by-side", "fullscreen", "|",
"guide"
],
previewRender: function(plainText) {
return marked.parse(plainText);
}
});
}
};
window.getMarkdownContent = function() {
return window.easyMDEInstance ? window.easyMDEInstance.value() : "";
};
</script>
@@ -1,30 +1,28 @@
@page "/admin/blog"
@attribute [Authorize]
@inject IBlogBrowserClient BlogClient
@inject IApiClient ApiClient
@inject ISnackbar Snackbar
<PageTitle>블로그 관리</PageTitle>
<AdminPageHeader Title="블로그 관리" Eyebrow="Content" Subtitle="검색 유입 콘텐츠의 발행 상태와 성과를 관리합니다.">
<ChildContent>
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.EditNote"
Href="/taxbaik/admin/blog/create">새 포스트 작성</MudButton>
</ChildContent>
</AdminPageHeader>
<div class="d-flex pa-4 gap-4 align-center">
<MudTextField @bind-Value="searchQuery" Placeholder="블로그 제목 또는 본문 검색..." Adornment="Adornment.Start"
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="flex-grow-1" Immediate="true" Clearable="true" />
</div>
<section class="admin-page-hero">
<div>
<MudText Typo="Typo.caption" Class="admin-eyebrow">Content</MudText>
<MudText Typo="Typo.h4" Class="admin-page-title">블로그 관리</MudText>
<MudText Typo="Typo.body2" Class="admin-page-subtitle">검색 유입 콘텐츠의 발행 상태와 성과를 관리합니다.</MudText>
</div>
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.EditNote"
Href="/taxbaik/admin/blog/create">새 포스트 작성</MudButton>
</section>
<MudPaper Class="admin-surface mb-4" Elevation="0">
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
<MudText Typo="Typo.subtitle1">@($"검색 결과 {FilteredPosts.Count()}개 / 전체 포스트 {totalPosts}개")</MudText>
<MudText Typo="Typo.subtitle1">@($"전체 포스트 {totalPosts}개")</MudText>
<MudText Typo="Typo.body2">페이지 @currentPage / @totalPages</MudText>
</MudStack>
</MudPaper>
<MudDataGrid Items="@FilteredPosts" Striped="true" Hoverable="true" Loading="@isLoading" Class="admin-grid">
<MudDataGrid Items="@posts" Striped="true" Hoverable="true" Loading="@isLoading" Class="admin-grid">
<Columns>
<PropertyColumn Property="x => x.Title" Title="제목" />
<PropertyColumn Property="x => x.IsPublished" Title="발행">
@@ -55,27 +53,25 @@
[CascadingParameter]
private Task<AuthenticationState>? AuthStateTask { get; set; }
private List<TaxBaik.Application.DTOs.BlogPostResponseDto> posts = [];
private string searchQuery = "";
private List<TaxBaik.Domain.Entities.BlogPost> posts = [];
private bool isLoading = true;
private int currentPage = 1;
private int totalPages = 1;
private int totalPosts = 0;
private const int PageSize = 20;
private IEnumerable<TaxBaik.Application.DTOs.BlogPostResponseDto> FilteredPosts => posts
.Where(p => string.IsNullOrEmpty(searchQuery) ||
p.Title.Contains(searchQuery, StringComparison.OrdinalIgnoreCase) ||
(p.Content != null && p.Content.Contains(searchQuery, StringComparison.OrdinalIgnoreCase)));
protected override async Task OnInitializedAsync()
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (AuthStateTask != null)
if (firstRender)
{
var authState = await AuthStateTask;
if (authState.User.Identity?.IsAuthenticated == true)
if (AuthStateTask != null)
{
await LoadPosts();
var authState = await AuthStateTask;
if (authState.User.Identity?.IsAuthenticated == true)
{
await LoadPosts();
StateHasChanged();
}
}
}
}
@@ -85,9 +81,9 @@
isLoading = true;
try
{
var result = await BlogClient.GetAdminPagedAsync(currentPage, PageSize);
posts = result.Items.ToList();
totalPosts = result.Total;
var result = await ApiClient.GetAsync<PagedBlogResponse>($"blog/admin?page={currentPage}&pageSize={PageSize}");
posts = result?.Data ?? [];
totalPosts = result?.Total ?? 0;
totalPages = Math.Max(1, (int)Math.Ceiling(totalPosts / (double)PageSize));
}
catch
@@ -117,21 +113,21 @@
await LoadPosts();
}
private async Task TogglePublish(TaxBaik.Application.DTOs.BlogPostResponseDto post, bool isPublished)
private async Task TogglePublish(TaxBaik.Domain.Entities.BlogPost post, bool isPublished)
{
var previous = post.IsPublished;
post.IsPublished = isPublished;
var result = await BlogClient.UpdateAsync(post.Id, new TaxBaik.Application.DTOs.CreateBlogPostDto
var result = await ApiClient.PutAsync<TaxBaik.Domain.Entities.BlogPost>($"blog/{post.Id}", new
{
Title = post.Title,
Content = post.Content,
CategoryId = post.CategoryId,
Tags = post.Tags,
SeoTitle = post.SeoTitle,
SeoDescription = post.SeoDescription,
ThumbnailUrl = post.ThumbnailUrl,
post.Title,
post.Content,
post.CategoryId,
post.Tags,
post.SeoTitle,
post.SeoDescription,
post.ThumbnailUrl,
IsPublished = isPublished,
AuthorId = post.AuthorId
post.AuthorId
});
if (result == null)
@@ -146,13 +142,14 @@
private async Task DeletePost(int postId)
{
var deleted = await BlogClient.DeleteAsync(postId);
if (!deleted)
{
Snackbar.Add("포스트 삭제에 실패했습니다.", Severity.Error);
return;
}
await ApiClient.DeleteAsync($"blog/{postId}");
Snackbar.Add("포스트가 삭제되었습니다.", Severity.Success);
await LoadPosts();
}
private class PagedBlogResponse
{
public List<TaxBaik.Domain.Entities.BlogPost> Data { get; set; } = [];
public int Total { get; set; }
}
}
@@ -1,177 +0,0 @@
@page "/admin/common-codes"
@using TaxBaik.Web.Services.AdminClients
@using TaxBaik.Domain.Entities
@attribute [Authorize]
@inject ICommonCodeBrowserClient CommonCodeClient
@inject ISnackbar Snackbar
<PageTitle>공통관리</PageTitle>
<section class="admin-page-hero">
<div>
<MudText Typo="Typo.caption" Class="admin-eyebrow">System</MudText>
<MudText Typo="Typo.h4" Class="admin-page-title">공통관리</MudText>
<MudText Typo="Typo.body2" Class="admin-page-subtitle">공통코드 그룹과 항목을 일관된 기준으로 관리합니다.</MudText>
</div>
</section>
<MudGrid Spacing="2">
<MudItem XS="12" MD="4">
<MudPaper Class="admin-surface pa-4" Elevation="0">
<MudText Typo="Typo.h6" Class="mb-3">그룹</MudText>
<MudSelect T="string" Value="@selectedGroup" ValueChanged="OnGroupChanged" Label="코드 그룹" Variant="Variant.Outlined" FullWidth="true">
@foreach (var group in groups)
{
<MudSelectItem Value="@group">@group</MudSelectItem>
}
</MudSelect>
<MudButton Class="mt-3" Variant="Variant.Filled" Color="Color.Primary" OnClick="PrepareCreate">새 코드 추가</MudButton>
</MudPaper>
</MudItem>
<MudItem XS="12" MD="8">
<MudPaper Class="admin-surface pa-4" Elevation="0">
@if (isLoading)
{
<MudProgressLinear Indeterminate="true" />
}
else
{
<MudTable Items="@codes" Dense="true" Hover="true">
<HeaderContent>
<MudTh>그룹</MudTh>
<MudTh>값</MudTh>
<MudTh>이름</MudTh>
<MudTh>순서</MudTh>
<MudTh>상태</MudTh>
<MudTh>작업</MudTh>
</HeaderContent>
<RowTemplate>
<MudTd>@context.CodeGroup</MudTd>
<MudTd>@context.CodeValue</MudTd>
<MudTd>@context.CodeName</MudTd>
<MudTd>@context.SortOrder</MudTd>
<MudTd>@(context.IsActive ? "활성" : "비활성")</MudTd>
<MudTd>
<MudButton Size="Size.Small" Variant="Variant.Text" OnClick="@(() => EditCode(context))">수정</MudButton>
<MudButton Size="Size.Small" Variant="Variant.Text" Color="Color.Error" OnClick="@(() => DeleteCode(context))">삭제</MudButton>
</MudTd>
</RowTemplate>
</MudTable>
<MudDivider Class="my-4" />
<MudForm @ref="form">
<MudTextField @bind-Value="editModel.CodeGroup" Label="그룹" Variant="Variant.Outlined" FullWidth="true" Required="true" Disabled="@(!isCreateMode)" Class="mb-3" />
<MudTextField @bind-Value="editModel.CodeValue" Label="값" Variant="Variant.Outlined" FullWidth="true" Required="true" Disabled="@(!isCreateMode)" Class="mb-3" />
<MudTextField @bind-Value="editModel.CodeName" Label="이름" Variant="Variant.Outlined" FullWidth="true" Required="true" Class="mb-3" />
<MudNumericField T="int" @bind-Value="editModel.SortOrder" Label="순서" Variant="Variant.Outlined" FullWidth="true" Class="mb-3" />
<MudSwitch @bind-Checked="editModel.IsActive" Color="Color.Primary">활성</MudSwitch>
<div class="d-flex gap-2 mt-4">
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="SaveCode">저장</MudButton>
<MudButton Variant="Variant.Outlined" OnClick="PrepareCreate">초기화</MudButton>
</div>
</MudForm>
}
</MudPaper>
</MudItem>
</MudGrid>
@code {
private List<string> groups = [];
private List<CommonCode> codes = [];
private string selectedGroup = "";
private bool isLoading = true;
private MudForm? form;
private CommonCode editModel = new();
private bool isCreateMode = true;
protected override async Task OnInitializedAsync()
{
groups = await CommonCodeClient.GetGroupsAsync();
selectedGroup = groups.FirstOrDefault() ?? "";
await LoadCodes();
PrepareCreate();
}
private async Task OnGroupChanged(string value)
{
selectedGroup = value;
await LoadCodes();
PrepareCreate();
}
private async Task LoadCodes()
{
isLoading = true;
codes = string.IsNullOrWhiteSpace(selectedGroup)
? []
: await CommonCodeClient.GetByGroupAsync(selectedGroup);
isLoading = false;
}
private void PrepareCreate()
{
isCreateMode = true;
editModel = new CommonCode
{
CodeGroup = selectedGroup,
IsActive = true
};
}
private void EditCode(CommonCode code)
{
isCreateMode = false;
editModel = new CommonCode
{
CodeGroup = code.CodeGroup,
CodeValue = code.CodeValue,
CodeName = code.CodeName,
SortOrder = code.SortOrder,
IsActive = code.IsActive
};
}
private async Task SaveCode()
{
if (form != null)
{
await form.Validate();
if (!form.IsValid)
{
Snackbar.Add("필수 항목을 입력하세요.", Severity.Warning);
return;
}
}
if (editModel.CodeValue.Contains(' '))
{
Snackbar.Add("code_value에는 공백을 넣을 수 없습니다.", Severity.Error);
return;
}
if (!await CommonCodeClient.UpsertAsync(editModel))
{
Snackbar.Add("저장 실패", Severity.Error);
return;
}
Snackbar.Add("저장되었습니다.", Severity.Success);
await LoadCodes();
PrepareCreate();
}
private async Task DeleteCode(CommonCode code)
{
if (!await CommonCodeClient.DeleteAsync(code.CodeGroup, code.CodeValue))
{
Snackbar.Add("삭제 실패", Severity.Error);
return;
}
Snackbar.Add("삭제되었습니다.", Severity.Success);
await LoadCodes();
PrepareCreate();
}
}
+118 -142
View File
@@ -1,6 +1,5 @@
@page "/admin/contracts"
@using TaxBaik.Web.Services.AdminClients
@using TaxBaik.Web.Components.Admin.Shared
@inject IContractBrowserClient ContractClient
@inject IClientBrowserClient ClientClient
@inject ISnackbar Snackbar
@@ -22,126 +21,116 @@
</MudText>
}
</div>
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="PrepareCreate" StartIcon="@Icons.Material.Filled.Add" id="btn-add-contract">
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="OpenCreateDialog" StartIcon="@Icons.Material.Filled.Add">
새 계약 추가
</MudButton>
</section>
@if (contracts is null)
{
<MudProgressLinear Indeterminate="true" />
}
else
{
<MudGrid Spacing="2" Class="mt-2">
<!-- Left: Dense Grid List -->
<MudItem XS="12" MD="8">
@if (contracts.Count == 0)
{
<MudAlert Severity="Severity.Info">
<MudIcon Icon="@Icons.Material.Filled.Description" Class="me-2" />
계약이 없습니다.
</MudAlert>
}
else
{
<MudDataGrid T="Contract"
Items="@contracts"
Dense="true"
Hover="true"
Striped="true"
Virtualize="true"
RowsPerPage="30"
SelectedItem="@selectedContract"
SelectedItemChanged="OnRowSelected"
Class="admin-grid">
<Columns>
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" />
<TemplateColumn Title="고객">
<CellTemplate>
@if (clientMap.TryGetValue(context.Item.ClientId, out var clientName))
{
@clientName
}
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.ContractNumber" Title="계약번호" />
<PropertyColumn Property="x => x.ServiceType" Title="서비스 유형" />
<PropertyColumn Property="x => x.MonthlyFee" Title="월 수수료" Format="C" />
<TemplateColumn Title="계약기간">
<CellTemplate>
@context.Item.StartDate.ToString("yyyy-MM-dd")
@if (context.Item.EndDate.HasValue)
{
<span>~@context.Item.EndDate.Value.ToString("yyyy-MM-dd")</span>
}
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="상태">
<CellTemplate>
@{
var isActive = !context.Item.EndDate.HasValue || context.Item.EndDate.Value >= DateTime.Today;
}
@if (isActive)
{
<MudChip Size="Size.Small" Color="Color.Success" Variant="Variant.Filled">활성</MudChip>
}
else
{
<MudChip Size="Size.Small" Color="Color.Default" Variant="Variant.Outlined">만료</MudChip>
}
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="작업" Sortable="false">
<CellTemplate>
<MudIconButton Icon="@Icons.Material.Filled.Delete" Color="Color.Error" Size="Size.Small"
OnClick="@(async () => await DeleteContract(context.Item.Id))" />
</CellTemplate>
</TemplateColumn>
</Columns>
</MudDataGrid>
}
</MudItem>
<!-- Right: Detail Form Panel (Inline Editor) -->
<MudItem XS="12" MD="4">
<MudPaper Class="pa-4 admin-surface admin-editor-panel" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 400px;">
<div class="d-flex align-center justify-space-between mb-4">
<MudText Typo="Typo.h6" Class="font-weight-bold">@(isEditMode ? "계약 상세 정보" : "새 계약 추가")</MudText>
@if (isEditMode)
{
<MudButton Size="Size.Small" Variant="Variant.Outlined" Color="Color.Secondary" OnClick="PrepareCreate">
새로 작성
</MudButton>
}
</div>
<MudForm @ref="form">
<MudSelect T="int?" @bind-Value="contractForm.ClientId" Label="고객" Required="true" Variant="Variant.Outlined" FullWidth="@true" Class="mb-3" RequiredError="고객을 선택하세요." Disabled="@isEditMode">
@foreach (var client in clients)
<MudPaper Class="admin-surface" Elevation="0">
@if (contracts is null)
{
<MudProgressLinear Indeterminate="true" />
}
else if (contracts.Count == 0)
{
<MudAlert Severity="Severity.Info" Class="mt-4">
<MudIcon Icon="@Icons.Material.Filled.Description" Class="me-2" />
계약이 없습니다.
</MudAlert>
}
else
{
<MudDataGrid T="Contract"
Items="@contracts"
Dense="true"
Hover="true"
Striped="true"
Virtualize="true"
RowsPerPage="30"
Class="admin-grid">
<Columns>
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" />
<TemplateColumn Title="고객">
<CellTemplate>
@if (clientMap.TryGetValue(context.Item.ClientId, out var clientName))
{
<MudSelectItem Value="@((int?)client.Id)">@GetClientDisplayName(client)</MudSelectItem>
<MudLink Href="@($"/taxbaik/admin/clients/{context.Item.ClientId}")" Color="Color.Primary">
@clientName
</MudLink>
}
</MudSelect>
<MudTextField T="string" @bind-Value="contractForm.ContractNumber" Label="계약번호" Variant="Variant.Outlined" FullWidth="@true" Class="mb-3" Required="true" />
<CommonCodeSelect @bind-Value="contractForm.ServiceType" Group="CONTRACT_SERVICE_TYPE" Label="서비스 유형" Class="mb-3" Required="true" />
<MudDatePicker @bind-Date="contractForm.StartDate" Label="계약 시작일" Variant="Variant.Outlined" FullWidth="@true" Class="mb-3" Required="true" />
<MudNumericField T="decimal?" @bind-Value="contractForm.MonthlyFee" Label="월 수수료" Variant="Variant.Outlined" FullWidth="@true" Class="mb-4" />
<div class="d-flex justify-end gap-2">
@if (isEditMode)
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.ContractNumber" Title="계약번호" />
<PropertyColumn Property="x => x.ServiceType" Title="서비스 유형" />
<PropertyColumn Property="x => x.MonthlyFee" Title="월 수수료" Format="C" />
<TemplateColumn Title="계약기간">
<CellTemplate>
@context.Item.StartDate.ToString("yyyy-MM-dd")
@if (context.Item.EndDate.HasValue)
{
<MudButton Variant="Variant.Outlined" Color="Color.Error" OnClick="@(async () => await DeleteContract(selectedContract?.Id ?? 0))">삭제</MudButton>
<span>~@context.Item.EndDate.Value.ToString("yyyy-MM-dd")</span>
}
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="상태">
<CellTemplate>
@{
var isActive = !context.Item.EndDate.HasValue || context.Item.EndDate.Value >= DateTime.Today;
}
@if (isActive)
{
<MudChip Size="Size.Small" Color="Color.Success" Variant="Variant.Filled">활성</MudChip>
}
else
{
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="SaveContract" id="btn-save-contract">저장</MudButton>
<MudChip Size="Size.Small" Color="Color.Default" Variant="Variant.Outlined">만료</MudChip>
}
</div>
</MudForm>
</MudPaper>
</MudItem>
</MudGrid>
}
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="작업" Sortable="false">
<CellTemplate>
<MudButtonGroup Size="Size.Small" Variant="Variant.Outlined">
<MudIconButton Icon="@Icons.Material.Filled.Delete" Color="Color.Error"
OnClick="@(async () => await DeleteContract(context.Item.Id))" />
</MudButtonGroup>
</CellTemplate>
</TemplateColumn>
</Columns>
</MudDataGrid>
}
</MudPaper>
<!-- Create Dialog -->
<MudDialog @bind-IsVisible="isDialogOpen" Options="new DialogOptions { MaxWidth = MaxWidth.Small, FullWidth = true }">
<TitleContent>
<MudText Typo="Typo.h6">새 계약 추가</MudText>
</TitleContent>
<DialogContent>
<MudForm @ref="form">
<MudSelect T="int?" @bind-Value="contractForm.ClientId" Label="고객" Required="true" Variant="Variant.Outlined" FullWidth="true" Class="mb-4" RequiredError="고객을 선택하세요.">
@foreach (var client in clients)
{
<MudSelectItem Value="@((int?)client.Id)">@GetClientDisplayName(client)</MudSelectItem>
}
</MudSelect>
<MudTextField T="string" @bind-Value="contractForm.ContractNumber" Label="계약번호" Variant="Variant.Outlined" FullWidth="true" Class="mb-4" Required="true" />
<MudSelect T="string" @bind-Value="contractForm.ServiceType" Label="서비스 유형" Variant="Variant.Outlined" FullWidth="true" Class="mb-4" Required="true">
<MudSelectItem Value="@("개인 기장대리")">개인 기장대리</MudSelectItem>
<MudSelectItem Value="@("법인 기장대리")">법인 기장대리</MudSelectItem>
<MudSelectItem Value="@("세무조정 대행")">세무조정 대행</MudSelectItem>
<MudSelectItem Value="@("양도세 신고대리")">양도세 신고대리</MudSelectItem>
<MudSelectItem Value="@("상속·증여 자문")">상속·증여 자문</MudSelectItem>
<MudSelectItem Value="@("세무조사 대응")">세무조사 대응</MudSelectItem>
</MudSelect>
<MudDatePicker @bind-Date="contractForm.StartDate" Label="계약 시작일" Variant="Variant.Outlined" FullWidth="true" Class="mb-4" Required="true" />
<MudNumericField T="decimal?" @bind-Value="contractForm.MonthlyFee" Label="월 수수료" Variant="Variant.Outlined" FullWidth="true" Class="mb-4" />
</MudForm>
</DialogContent>
<DialogActions>
<MudButton OnClick="CloseDialog">취소</MudButton>
<MudButton Color="Color.Primary" OnClick="SaveContract">저장</MudButton>
</DialogActions>
</MudDialog>
@code {
[CascadingParameter]
@@ -152,19 +141,21 @@ else
private Dictionary<int, string> clientMap = new();
private decimal mrr = 0;
private MudForm? form;
private bool isEditMode;
private Contract? selectedContract;
private bool isDialogOpen;
private ContractForm contractForm = new();
protected override async Task OnInitializedAsync()
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (AuthStateTask != null)
if (firstRender)
{
var authState = await AuthStateTask;
if (authState.User.Identity?.IsAuthenticated == true)
if (AuthStateTask != null)
{
await LoadData();
PrepareCreate();
var authState = await AuthStateTask;
if (authState.User.Identity?.IsAuthenticated == true)
{
await LoadData();
StateHasChanged();
}
}
}
}
@@ -185,30 +176,14 @@ else
}
}
private void PrepareCreate()
private void OpenCreateDialog()
{
selectedContract = null;
isEditMode = false;
contractForm = new ContractForm
{
ClientId = clients.FirstOrDefault()?.Id,
StartDate = DateTime.Today
};
}
private void OnRowSelected(Contract contract)
{
if (contract == null) return;
selectedContract = contract;
isEditMode = true;
contractForm = new ContractForm
{
ClientId = contract.ClientId,
ContractNumber = contract.ContractNumber,
ServiceType = contract.ServiceType,
StartDate = contract.StartDate,
MonthlyFee = contract.MonthlyFee
};
isDialogOpen = true;
}
private async Task SaveContract()
@@ -236,7 +211,7 @@ else
if (newId > 0)
{
Snackbar.Add("계약이 추가되었습니다.", Severity.Success);
PrepareCreate();
CloseDialog();
await LoadData();
}
}
@@ -264,10 +239,6 @@ else
{
await ContractClient.DeleteAsync(id);
Snackbar.Add("계약이 삭제되었습니다.", Severity.Success);
if (selectedContract?.Id == id)
{
PrepareCreate();
}
await LoadData();
}
catch (Exception ex)
@@ -276,13 +247,18 @@ else
}
}
private void CloseDialog()
{
isDialogOpen = false;
contractForm = new();
}
private static string GetClientDisplayName(Client client)
=> !string.IsNullOrWhiteSpace(client.CompanyName)
? client.CompanyName
: !string.IsNullOrWhiteSpace(client.Name)
? client.Name
: $"Client #{client.Id}";
private class ContractForm
{
public int? ClientId { get; set; }
@@ -1,7 +1,6 @@
@page "/admin/dashboard"
@attribute [Authorize]
@using TaxBaik.Web.Services
@using TaxBaik.Web.Components.Admin.Shared
@inject IAdminDashboardClient DashboardClient
@inject NavigationManager Nav
@@ -18,58 +17,49 @@
</MudButton>
</section>
@if (!string.IsNullOrEmpty(errorMessage))
{
<MudAlert Severity="Severity.Error" Class="mb-4">@errorMessage</MudAlert>
}
@if (isLoading)
{
<MudProgressLinear Color="Color.Primary" Indeterminate="true" Class="mb-4" />
}
<!-- Metrics Grid -->
<!-- Metrics Grid - Pure HTML div instead of MudGrid to ensure proper layout -->
<div class="admin-metric-grid">
<div class="admin-metric-card accent-blue cursor-pointer" @onclick='(() => Nav.NavigateTo("/taxbaik/admin/inquiries"))'>
<div class="admin-metric-card-body">
<span class="admin-metric-card-label">이번달 문의</span>
<div class="admin-metric-card-value-row">
<span class="admin-metric-card-value" style="color: var(--primary-dark);">@summary.ThisMonthInquiries</span>
<span class="admin-metric-card-icon" style="color: var(--primary-color);">💬</span>
<div class="admin-metric-card accent-blue cursor-pointer" @onclick='(() => Nav.NavigateTo("/taxbaik/admin/inquiries"))' style="cursor: pointer;">
<div style="display: flex; flex-direction: column; gap: 12px; height: 100%;">
<span style="font-size: 0.75rem; color: #999; text-transform: uppercase; font-weight: 600;">이번달 문의</span>
<div style="display: flex; justify-content: space-between; align-items: center; flex: 1;">
<span style="font-size: 2rem; font-weight: 700; color: #1565c0;">@summary.ThisMonthInquiries</span>
<span style="font-size: 2.5rem; opacity: 0.15; color: #1976d2;">💬</span>
</div>
<span class="admin-metric-card-caption">월간 상담 유입 (클릭 시 이동)</span>
<span style="font-size: 0.9rem; color: #666;">월간 상담 유입 (클릭 시 이동)</span>
</div>
</div>
<div class="admin-metric-card accent-amber cursor-pointer" @onclick='(() => Nav.NavigateTo("/taxbaik/admin/inquiries?status=new"))'>
<div class="admin-metric-card-body">
<span class="admin-metric-card-label">신규 문의</span>
<div class="admin-metric-card-value-row">
<span class="admin-metric-card-value" style="color: var(--tertiary-dark);">@summary.NewInquiries</span>
<span class="admin-metric-card-icon" style="color: var(--tertiary-color);">⚠️</span>
<div class="admin-metric-card accent-amber cursor-pointer" @onclick='(() => Nav.NavigateTo("/taxbaik/admin/inquiries?status=new"))' style="cursor: pointer;">
<div style="display: flex; flex-direction: column; gap: 12px; height: 100%;">
<span style="font-size: 0.75rem; color: #999; text-transform: uppercase; font-weight: 600;">신규 문의</span>
<div style="display: flex; justify-content: space-between; align-items: center; flex: 1;">
<span style="font-size: 2rem; font-weight: 700; color: #e65100;">@summary.NewInquiries</span>
<span style="font-size: 2.5rem; opacity: 0.15; color: #f57c00;">⚠️</span>
</div>
<span class="admin-metric-card-caption">처리 대기 (클릭 시 이동)</span>
<span style="font-size: 0.9rem; color: #666;">처리 대기 (클릭 시 이동)</span>
</div>
</div>
<div class="admin-metric-card accent-slate cursor-pointer" @onclick='(() => Nav.NavigateTo("/taxbaik/admin/blog"))'>
<div class="admin-metric-card-body">
<span class="admin-metric-card-label">전체 포스트</span>
<div class="admin-metric-card-value-row">
<span class="admin-metric-card-value" style="color: #455a64;">@summary.TotalPosts</span>
<span class="admin-metric-card-icon" style="color: #607d8b;">📄</span>
<div class="admin-metric-card accent-slate cursor-pointer" @onclick='(() => Nav.NavigateTo("/taxbaik/admin/blog"))' style="cursor: pointer;">
<div style="display: flex; flex-direction: column; gap: 12px; height: 100%;">
<span style="font-size: 0.75rem; color: #999; text-transform: uppercase; font-weight: 600;">전체 포스트</span>
<div style="display: flex; justify-content: space-between; align-items: center; flex: 1;">
<span style="font-size: 2rem; font-weight: 700; color: #455a64;">@summary.TotalPosts</span>
<span style="font-size: 2.5rem; opacity: 0.15; color: #607d8b;">📄</span>
</div>
<span class="admin-metric-card-caption">콘텐츠 자산 (클릭 시 이동)</span>
<span style="font-size: 0.9rem; color: #666;">콘텐츠 자산 (클릭 시 이동)</span>
</div>
</div>
<div class="admin-metric-card accent-green cursor-pointer" @onclick='(() => Nav.NavigateTo("/taxbaik/admin/blog"))'>
<div class="admin-metric-card-body">
<span class="admin-metric-card-label">발행된 포스트</span>
<div class="admin-metric-card-value-row">
<span class="admin-metric-card-value" style="color: var(--secondary-dark);">@summary.PublishedPosts</span>
<span class="admin-metric-card-icon" style="color: var(--secondary-color);">🌐</span>
<div class="admin-metric-card accent-green cursor-pointer" @onclick='(() => Nav.NavigateTo("/taxbaik/admin/blog"))' style="cursor: pointer;">
<div style="display: flex; flex-direction: column; gap: 12px; height: 100%;">
<span style="font-size: 0.75rem; color: #999; text-transform: uppercase; font-weight: 600;">발행된 포스트</span>
<div style="display: flex; justify-content: space-between; align-items: center; flex: 1;">
<span style="font-size: 2rem; font-weight: 700; color: #2e7d32;">@summary.PublishedPosts</span>
<span style="font-size: 2.5rem; opacity: 0.15; color: #388e3c;">🌐</span>
</div>
<span class="admin-metric-card-caption">검색 노출 대상 (클릭 시 이동)</span>
<span style="font-size: 0.9rem; color: #666;">검색 노출 대상 (클릭 시 이동)</span>
</div>
</div>
</div>
@@ -96,8 +86,7 @@
<tbody>
@foreach (var f in upcomingFilings)
{
var dday = BusinessDayCalculator.GetDday(DateOnly.FromDateTime(f.DueDate));
var effectiveDueDate = BusinessDayCalculator.GetEffectiveDueDate(DateOnly.FromDateTime(f.DueDate));
var dday = (f.DueDate.Date - DateTime.Today).Days;
<tr>
<td>
<MudLink Href="@($"/taxbaik/admin/clients/{f.ClientId}")" Underline="Underline.Hover" Color="Color.Primary" Class="font-weight-bold">
@@ -105,7 +94,7 @@
</MudLink>
</td>
<td>@f.FilingType</td>
<td>@effectiveDueDate.ToDateTime(TimeOnly.MinValue).ToString("yyyy-MM-dd")</td>
<td>@f.DueDate.ToString("yyyy-MM-dd")</td>
<td>
@if (dday < 0)
{
@@ -177,30 +166,35 @@
private string? errorMessage;
private bool isLoading = true;
protected override async Task OnInitializedAsync()
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (AuthStateTask != null)
if (firstRender)
{
var authState = await AuthStateTask;
if (authState.User.Identity?.IsAuthenticated == true)
if (AuthStateTask != null)
{
try
var authState = await AuthStateTask;
if (authState.User.Identity?.IsAuthenticated == true)
{
var summaryTask = DashboardClient.GetSummaryAsync();
var filingsTask = DashboardClient.GetUpcomingFilingsAsync(30);
try
{
// API 클라이언트 사용 (서비스 직접 호출 X)
var summaryTask = DashboardClient.GetSummaryAsync();
var filingsTask = DashboardClient.GetUpcomingFilingsAsync(30);
await Task.WhenAll(summaryTask, filingsTask);
summary = await summaryTask;
upcomingFilings = (await filingsTask).ToList();
}
catch (Exception ex)
{
errorMessage = "대시보드 데이터를 불러올 수 없습니다.";
Console.Error.WriteLine($"Dashboard error: {ex.Message}");
}
finally
{
isLoading = false;
await Task.WhenAll(summaryTask, filingsTask);
summary = await summaryTask;
upcomingFilings = (await filingsTask).ToList();
}
catch (Exception ex)
{
errorMessage = "대시보드 데이터를 불러올 수 없습니다.";
Console.Error.WriteLine($"Dashboard error: {ex.Message}");
}
finally
{
isLoading = false;
StateHasChanged();
}
}
}
}
@@ -22,21 +22,16 @@
</MudButton>
</section>
<div class="d-flex pa-4 gap-4 align-center">
<MudTextField @bind-Value="searchQuery" Placeholder="질문 또는 답변 검색..." Adornment="Adornment.Start"
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="flex-grow-1" Immediate="true" Clearable="true" />
</div>
<MudPaper Class="admin-surface" Elevation="0">
@if (faqs is null)
{
<MudProgressLinear Indeterminate="true" />
}
else if (!FilteredFaqs.Any())
else if (!faqs.Any())
{
<div class="pa-6 text-center">
<MudIcon Icon="@Icons.Material.Filled.QuestionAnswer" Style="font-size:3rem; opacity:.3;" />
<MudText Class="mt-2 text-muted">검색 조건에 맞는 FAQ가 없습니다.</MudText>
<MudText Class="mt-2 text-muted">등록된 FAQ가 없습니다.</MudText>
</div>
}
else
@@ -44,7 +39,7 @@
<MudSimpleTable Striped="true" Dense="true" Class="admin-table">
<thead>
<tr>
<th style="width:110px;">순서</th>
<th style="width:60px;">순서</th>
<th>질문</th>
<th style="width:130px;">카테고리</th>
<th style="width:90px;">상태</th>
@@ -52,15 +47,11 @@
</tr>
</thead>
<tbody>
@foreach (var item in FilteredFaqs)
@foreach (var item in faqs)
{
<tr>
<td>
<div class="d-flex align-center justify-start gap-1">
<MudText Typo="Typo.body2" Class="mr-2">@item.SortOrder</MudText>
<MudIconButton Icon="@Icons.Material.Filled.ArrowDropUp" Size="Size.Small" OnClick="@(() => MoveUpAsync(item))" Style="padding:2px;" Dense="true" />
<MudIconButton Icon="@Icons.Material.Filled.ArrowDropDown" Size="Size.Small" OnClick="@(() => MoveDownAsync(item))" Style="padding:2px;" Dense="true" />
</div>
<td class="text-center">
<MudText Typo="Typo.body2">@item.SortOrder</MudText>
</td>
<td>
<MudText Typo="Typo.body2" Style="max-width:480px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;">
@@ -86,10 +77,10 @@
<td>
<MudButtonGroup Size="Size.Small" Variant="Variant.Outlined">
<MudButton @onclick="@(() => Navigation.NavigateTo($"/taxbaik/admin/faqs/{item.Id}/edit"))">
수정
수정
</MudButton>
<MudButton Color="Color.Error" @onclick="@(() => DeleteAsync(item))">
삭제
삭제
</MudButton>
</MudButtonGroup>
</td>
@@ -98,7 +89,7 @@
</tbody>
</MudSimpleTable>
<MudText Typo="Typo.caption" Class="pa-2 text-muted">
검색 결과 @(FilteredFaqs.Count())개 · 총 @(faqs.Count)개 · 노출 중 @(faqs.Count(f => f.IsActive))개
총 @(faqs.Count)개 · 노출 중 @(faqs.Count(f => f.IsActive))개
</MudText>
}
</MudPaper>
@@ -108,13 +99,6 @@
private Task<AuthenticationState>? AuthStateTask { get; set; }
private List<Faq>? faqs;
private string searchQuery = "";
private IEnumerable<Faq> FilteredFaqs => faqs?
.Where(f => string.IsNullOrEmpty(searchQuery) ||
f.Question.Contains(searchQuery, StringComparison.OrdinalIgnoreCase) ||
(f.Answer != null && f.Answer.Contains(searchQuery, StringComparison.OrdinalIgnoreCase)))
.OrderBy(f => f.SortOrder) ?? Enumerable.Empty<Faq>();
protected override async Task OnAfterRenderAsync(bool firstRender)
{
@@ -136,7 +120,7 @@
{
try
{
faqs = (await FaqClient.GetAllAsync()).OrderBy(f => f.SortOrder).ToList();
faqs = (await FaqClient.GetAllAsync()).ToList();
}
catch (Exception ex)
{
@@ -145,66 +129,6 @@
}
}
private async Task MoveUpAsync(Faq item)
{
if (faqs == null) return;
var sorted = faqs.OrderBy(f => f.SortOrder).ToList();
var index = sorted.IndexOf(item);
if (index <= 0) return;
var prev = sorted[index - 1];
var temp = item.SortOrder;
item.SortOrder = prev.SortOrder;
prev.SortOrder = temp;
if (item.SortOrder == prev.SortOrder)
{
prev.SortOrder = item.SortOrder + 1;
}
try
{
await FaqClient.UpdateAsync(item.Id, item);
await FaqClient.UpdateAsync(prev.Id, prev);
Snackbar.Add("순서가 상향되었습니다.", Severity.Success);
await LoadAsync();
}
catch (Exception ex)
{
Snackbar.Add($"순서 조정 실패: {ex.Message}", Severity.Error);
}
}
private async Task MoveDownAsync(Faq item)
{
if (faqs == null) return;
var sorted = faqs.OrderBy(f => f.SortOrder).ToList();
var index = sorted.IndexOf(item);
if (index < 0 || index >= sorted.Count - 1) return;
var next = sorted[index + 1];
var temp = item.SortOrder;
item.SortOrder = next.SortOrder;
next.SortOrder = temp;
if (item.SortOrder == next.SortOrder)
{
next.SortOrder = item.SortOrder + 1;
}
try
{
await FaqClient.UpdateAsync(item.Id, item);
await FaqClient.UpdateAsync(next.Id, next);
Snackbar.Add("순서가 하향되었습니다.", Severity.Success);
await LoadAsync();
}
catch (Exception ex)
{
Snackbar.Add($"순서 조정 실패: {ex.Message}", Severity.Error);
}
}
private async Task DeleteAsync(Faq item)
{
var confirmed = await DialogService.ShowMessageBox(
@@ -5,12 +5,15 @@
<PageTitle>문의 관리</PageTitle>
<AdminPageHeader Title="문의 관리" Eyebrow="Customer Requests" Subtitle="상담 요청을 상태별로 확인하고 후속 조치를 기록합니다.">
<ChildContent>
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Add"
Href="/taxbaik/admin/inquiries/create">문의 등록</MudButton>
</ChildContent>
</AdminPageHeader>
<section class="admin-page-hero">
<div>
<MudText Typo="Typo.caption" Class="admin-eyebrow">Customer Requests</MudText>
<MudText Typo="Typo.h4" Class="admin-page-title">문의 관리</MudText>
<MudText Typo="Typo.body2" Class="admin-page-subtitle">상담 요청을 상태별로 확인하고 후속 조치를 기록합니다.</MudText>
</div>
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Add"
Href="/taxbaik/admin/inquiries/create">새 문의 등록</MudButton>
</section>
<MudPaper Class="admin-surface" Elevation="0">
@if (isLoading)
@@ -49,14 +52,18 @@ else
private bool isLoading = true;
private IReadOnlyList<Domain.Entities.Inquiry> allInquiries = [];
protected override async Task OnInitializedAsync()
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (AuthStateTask != null)
if (firstRender)
{
var authState = await AuthStateTask;
if (authState.User.Identity?.IsAuthenticated == true)
if (AuthStateTask != null)
{
await LoadData();
var authState = await AuthStateTask;
if (authState.User.Identity?.IsAuthenticated == true)
{
await LoadData();
StateHasChanged();
}
}
}
}
+102 -21
View File
@@ -1,10 +1,12 @@
@page "/admin/login"
@using System.ComponentModel.DataAnnotations
@layout TaxBaik.Web.Components.Admin.Layout.BlankLayout
@attribute [AllowAnonymous]
@rendermode @(new InteractiveServerRenderMode(prerender: true))
@inject IApiClient ApiClient
@inject ILocalStorageService LocalStorageService
@inject NavigationManager NavigationManager
@inject CustomAuthenticationStateProvider AuthStateProvider
@inject IJSRuntime Js
@inject ILocalStorageService LocalStorageService
<PageTitle>로그인</PageTitle>
@@ -12,39 +14,52 @@
<MudPaper Class="pa-8" Elevation="3" Style="width: 100%; max-width: 400px;">
<MudText Typo="Typo.h4" Class="mb-6 text-center">관리자 로그인</MudText>
<form id="admin-login-form">
<input class="mud-input mud-input-outlined mud-input-root mud-input-root-adorned-start mb-4"
style="width: 100%; min-height: 56px; padding: 16px 14px;"
placeholder="사용자명"
autocomplete="username"
name="username"
value="@model.Username" />
<form @onsubmit="HandleLogin" @onsubmit:preventDefault>
<InputText class="mud-input mud-input-outlined mud-input-root mud-input-root-adorned-start mb-4"
style="width: 100%; min-height: 56px; padding: 16px 14px;"
placeholder="사용자명"
autocomplete="username"
@bind-Value="model.Username" />
<input type="password"
class="mud-input mud-input-outlined mud-input-root mud-input-root-adorned-start mb-4"
style="width: 100%; min-height: 56px; padding: 16px 14px;"
placeholder="비밀번호"
autocomplete="current-password"
name="password" />
<InputText type="password"
class="mud-input mud-input-outlined mud-input-root mud-input-root-adorned-start mb-4"
style="width: 100%; min-height: 56px; padding: 16px 14px;"
placeholder="비밀번호"
autocomplete="current-password"
@bind-Value="model.Password" />
<div class="mb-4">
<input class="mud-checkbox" type="checkbox" name="rememberMe" />
<InputCheckbox class="mud-checkbox" @bind-Value="model.RememberMe" />
<label style="margin-left: 8px; cursor: pointer;">아이디 저장</label>
</div>
<div class="mud-alert mud-alert-filled-error mb-4 login-error-message" style="display:none;">로그인 중 오류가 발생했습니다.</div>
@if (!string.IsNullOrEmpty(errorMessage))
{
<MudAlert Severity="Severity.Error" Class="mb-4">@errorMessage</MudAlert>
}
<button type="submit"
class="mud-button-root mud-button mud-button-filled mud-button-filled-primary mud-elevation-0"
style="width: 100%; min-height: 52px; border: 0; border-radius: 4px; color: white;">
<span>로그인</span>
style="width: 100%; min-height: 52px; border: 0; border-radius: 4px; color: white;"
disabled="@isLoading">
@if (isLoading)
{
<MudProgressCircular Size="Size.Small" Indeterminate="true" Class="mr-2" />
<span>로그인 중...</span>
}
else
{
<span>로그인</span>
}
</button>
</form>
</MudPaper>
</MudContainer>
@code {
private readonly LoginModel model = new();
private bool isLoading = false;
private string errorMessage = "";
private LoginModel model = new();
private const string RememberedUsernameKey = "admin-remembered-username";
protected override async Task OnInitializedAsync()
@@ -55,11 +70,12 @@
if (!string.IsNullOrEmpty(remembered))
{
model.Username = remembered;
model.RememberMe = true;
}
}
catch
{
// LocalStorage may be unavailable during prerender.
// LocalStorage not available in pre-render
}
}
@@ -69,10 +85,75 @@
await Js.InvokeVoidAsync("taxbaikAdminSession.syncRouteClass");
}
private async Task HandleLogin()
{
if (isLoading)
return;
isLoading = true;
errorMessage = "";
try
{
var request = new { model.Username, model.Password };
var response = await ApiClient.PostAsync<LoginResponse>("auth/login", request);
if (response?.AccessToken == null || response?.RefreshToken == null)
{
errorMessage = "사용자명 또는 비밀번호가 올바르지 않습니다.";
isLoading = false;
return;
}
if (model.RememberMe)
{
await LocalStorageService.SetItemAsStringAsync(RememberedUsernameKey, model.Username);
}
else
{
await LocalStorageService.RemoveItemAsync(RememberedUsernameKey);
}
await ApiClient.SetAuthToken(response.AccessToken);
await AuthStateProvider.LoginAsync(response.AccessToken, response.RefreshToken, response.ExpiresIn);
NavigationManager.NavigateTo(GetReturnUrl(), forceLoad: false);
}
catch
{
errorMessage = "로그인 중 오류가 발생했습니다.";
isLoading = false;
}
}
private class LoginResponse
{
public string AccessToken { get; set; } = "";
public string RefreshToken { get; set; } = "";
public int ExpiresIn { get; set; }
}
private class LoginModel
{
public string Username { get; set; } = "";
public string Password { get; set; } = "";
public bool RememberMe { get; set; }
}
private string GetReturnUrl()
{
var uri = NavigationManager.ToAbsoluteUri(NavigationManager.Uri);
if (!Microsoft.AspNetCore.WebUtilities.QueryHelpers.ParseQuery(uri.Query).TryGetValue("returnUrl", out var returnUrl)
|| string.IsNullOrWhiteSpace(returnUrl))
{
return "/taxbaik/admin/dashboard";
}
var value = returnUrl.ToString();
if (!value.StartsWith("admin", StringComparison.OrdinalIgnoreCase))
{
return "/taxbaik/admin/dashboard";
}
return $"/taxbaik/{value.TrimStart('/')}";
}
}
@@ -1,7 +1,5 @@
@page "/admin/tax-filing-schedules"
@using TaxBaik.Web.Services.AdminClients
@using TaxBaik.Domain.Entities
@using TaxBaik.Web.Components.Admin.Shared
@inject ITaxFilingScheduleBrowserClient TaxFilingClient
@inject IClientBrowserClient ClientClient
@inject ISnackbar Snackbar
@@ -16,155 +14,141 @@
<MudText Typo="Typo.h4" Class="admin-page-title">신고 일정</MudText>
<MudText Typo="Typo.body2" Class="admin-page-subtitle">고객별 마감일과 처리 상태를 한 화면에서 관리합니다.</MudText>
</div>
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="PrepareCreate" StartIcon="@Icons.Material.Filled.Add" id="btn-add-schedule">
<MudButton Variant="Variant.Filled"
Color="Color.Primary"
OnClick="OpenCreateDialog"
StartIcon="@Icons.Material.Filled.Add">
새 일정 추가
</MudButton>
</section>
@if (schedules is null)
{
<MudProgressLinear Indeterminate="true" />
}
else
{
<MudGrid Spacing="2" Class="mt-2">
<!-- Left: Dense Grid List -->
<MudItem XS="12" MD="8">
@if (schedules.Count == 0)
{
<MudAlert Severity="Severity.Info">
<MudIcon Icon="@Icons.Material.Filled.EventBusy" Class="me-2" />
신고 일정이 없습니다.
</MudAlert>
}
else
{
<MudDataGrid T="TaxFilingSchedule"
Items="@schedules"
Dense="true"
Hover="true"
Striped="true"
Virtualize="true"
RowsPerPage="30"
SelectedItem="@selectedSchedule"
SelectedItemChanged="OnRowSelected"
Class="admin-grid">
<Columns>
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" />
<TemplateColumn Title="고객">
<CellTemplate>
@if (clientMap.TryGetValue(context.Item.ClientId, out var clientName))
{
@clientName
}
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.FilingType" Title="신고 유형" />
<TemplateColumn Title="마감일">
<CellTemplate>
@{
var effectiveDueDate = BusinessDayCalculator.GetEffectiveDueDate(DateOnly.FromDateTime(context.Item.DueDate));
var daysLeft = BusinessDayCalculator.GetDday(DateOnly.FromDateTime(context.Item.DueDate));
var statusColor = daysLeft < 0 ? Color.Error : daysLeft <= 7 ? Color.Warning : Color.Success;
}
<MudChip Size="Size.Small" Color="@statusColor" Variant="Variant.Filled">
@effectiveDueDate.ToDateTime(TimeOnly.MinValue).ToString("yyyy-MM-dd")
@if (daysLeft >= 0)
{
<span class="ms-1">(D-@daysLeft)</span>
}
else
{
<span class="ms-1">(마감 @Math.Abs(daysLeft)일 경과)</span>
}
</MudChip>
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.FilingYear" Title="신고연도" />
<TemplateColumn Title="상태">
<CellTemplate>
@if (context.Item.Status == "completed")
{
<MudChip Size="Size.Small" Color="Color.Success" Variant="Variant.Filled">완료</MudChip>
}
else
{
<MudChip Size="Size.Small" Color="Color.Default" Variant="Variant.Outlined">대기</MudChip>
}
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="작업" Sortable="false">
<CellTemplate>
<MudButtonGroup Size="Size.Small" Variant="Variant.Outlined">
@if (context.Item.Status != "completed")
{
<MudIconButton Icon="@Icons.Material.Filled.CheckCircle"
Color="Color.Success"
OnClick="@(async () => await CompleteSchedule(context.Item.Id))"
Title="완료" />
}
<MudIconButton Icon="@Icons.Material.Filled.Delete"
Color="Color.Error"
OnClick="@(async () => await DeleteSchedule(context.Item.Id))"
Title="삭제" />
</MudButtonGroup>
</CellTemplate>
</TemplateColumn>
</Columns>
</MudDataGrid>
}
</MudItem>
<!-- Right: Detail Form Panel (Inline Editor) -->
<MudItem XS="12" MD="4">
<MudPaper Class="pa-4 admin-surface admin-editor-panel" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 400px;">
<div class="d-flex align-center justify-space-between mb-4">
<MudText Typo="Typo.h6" Class="font-weight-bold">@(isEditMode ? "신고 일정 상세" : "새 신고 일정 추가")</MudText>
@if (isEditMode)
{
<MudButton Size="Size.Small" Variant="Variant.Outlined" Color="Color.Secondary" OnClick="PrepareCreate">
새로 작성
</MudButton>
}
</div>
<MudForm @ref="form">
<MudSelect T="int?"
@bind-Value="scheduleForm.ClientId"
Label="고객"
Required="true"
Variant="Variant.Outlined"
FullWidth="@true"
Class="mb-3"
RequiredError="고객을 선택하세요."
Disabled="@isEditMode">
@foreach (var client in clients)
<MudPaper Class="admin-surface" Elevation="0">
@if (schedules is null)
{
<MudProgressLinear Indeterminate="true" />
}
else if (schedules.Count == 0)
{
<MudAlert Severity="Severity.Info" Class="mt-4">
<MudIcon Icon="@Icons.Material.Filled.EventBusy" Class="me-2" />
신고 일정이 없습니다.
</MudAlert>
}
else
{
<MudDataGrid T="TaxFilingSchedule"
Items="@schedules"
Dense="true"
Hover="true"
Striped="true"
Virtualize="true"
RowsPerPage="30"
Class="admin-grid">
<Columns>
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" />
<TemplateColumn Title="고객">
<CellTemplate>
@if (clientMap.TryGetValue(context.Item.ClientId, out var clientName))
{
<MudSelectItem Value="@((int?)client.Id)">@GetClientDisplayName(client)</MudSelectItem>
<MudLink Href="@($"/taxbaik/admin/clients/{context.Item.ClientId}")" Color="Color.Primary">
@clientName
</MudLink>
}
</MudSelect>
<CommonCodeSelect @bind-Value="scheduleForm.FilingType" Group="FILING_TYPE" Label="신고 유형" Class="mb-3" Required="true" />
<MudDatePicker @bind-Date="scheduleForm.DueDate" Label="마감일" Variant="Variant.Outlined" FullWidth="@true" Class="mb-3" Required="true" />
<MudNumericField T="int" @bind-Value="scheduleForm.FilingYear" Label="신고연도" Variant="Variant.Outlined" FullWidth="@true" Class="mb-4" Required="true" />
<div class="d-flex justify-end gap-2">
@if (isEditMode && selectedSchedule?.Status != "completed")
{
<MudButton Variant="Variant.Outlined" Color="Color.Success" OnClick="@(async () => await CompleteSchedule(selectedSchedule?.Id ?? 0))">완료 처리</MudButton>
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.FilingType" Title="신고 유형" />
<TemplateColumn Title="마감일">
<CellTemplate>
@{
var daysLeft = (context.Item.DueDate.Date - DateTime.Today).Days;
var statusColor = daysLeft < 0 ? Color.Error : daysLeft <= 7 ? Color.Warning : Color.Success;
}
@if (isEditMode)
<MudChip Size="Size.Small" Color="@statusColor" Variant="Variant.Filled">
@context.Item.DueDate.ToString("yyyy-MM-dd")
@if (daysLeft >= 0)
{
<span class="ms-1">(D-@daysLeft)</span>
}
else
{
<span class="ms-1">(마감 @Math.Abs(daysLeft)일 경과)</span>
}
</MudChip>
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.FilingYear" Title="신고연도" />
<TemplateColumn Title="상태">
<CellTemplate>
@if (context.Item.Status == "completed")
{
<MudButton Variant="Variant.Outlined" Color="Color.Error" OnClick="@(async () => await DeleteSchedule(selectedSchedule?.Id ?? 0))">삭제</MudButton>
<MudChip Size="Size.Small" Color="Color.Success" Variant="Variant.Filled">완료</MudChip>
}
else
{
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="SaveSchedule" id="btn-save-schedule">저장</MudButton>
<MudChip Size="Size.Small" Color="Color.Default" Variant="Variant.Outlined">대기</MudChip>
}
</div>
</MudForm>
</MudPaper>
</MudItem>
</MudGrid>
}
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="작업" Sortable="false">
<CellTemplate>
<MudButtonGroup Size="Size.Small" Variant="Variant.Outlined">
@if (context.Item.Status != "completed")
{
<MudIconButton Icon="@Icons.Material.Filled.CheckCircle"
Color="Color.Success"
OnClick="@(async () => await CompleteSchedule(context.Item.Id))"
Title="완료" />
}
<MudIconButton Icon="@Icons.Material.Filled.Delete"
Color="Color.Error"
OnClick="@(async () => await DeleteSchedule(context.Item.Id))"
Title="삭제" />
</MudButtonGroup>
</CellTemplate>
</TemplateColumn>
</Columns>
</MudDataGrid>
}
</MudPaper>
<MudDialog @bind-IsVisible="isDialogOpen" Options="new DialogOptions { MaxWidth = MaxWidth.Small, FullWidth = true }">
<TitleContent>
<MudText Typo="Typo.h6">새 신고 일정 추가</MudText>
</TitleContent>
<DialogContent>
<MudForm @ref="form">
<MudSelect T="int?"
@bind-Value="scheduleForm.ClientId"
Label="고객"
Required="true"
Variant="Variant.Outlined"
FullWidth="true"
Class="mb-4"
RequiredError="고객을 선택하세요.">
@foreach (var client in clients)
{
<MudSelectItem Value="@((int?)client.Id)">@GetClientDisplayName(client)</MudSelectItem>
}
</MudSelect>
<MudSelect T="string" @bind-Value="scheduleForm.FilingType" Label="신고 유형" Variant="Variant.Outlined" FullWidth="true" Class="mb-4" Required="true">
<MudSelectItem Value="@("종합소득세")">종합소득세</MudSelectItem>
<MudSelectItem Value="@("부가가치세")">부가가치세</MudSelectItem>
<MudSelectItem Value="@("법인세")">법인세</MudSelectItem>
<MudSelectItem Value="@("원천세")">원천세</MudSelectItem>
<MudSelectItem Value="@("종합부동산세")">종합부동산세</MudSelectItem>
<MudSelectItem Value="@("양도소득세")">양도소득세</MudSelectItem>
<MudSelectItem Value="@("상속·증여세")">상속·증여세</MudSelectItem>
<MudSelectItem Value="@("세무조정")">세무조정</MudSelectItem>
</MudSelect>
<MudDatePicker @bind-Date="scheduleForm.DueDate" Label="마감일" Variant="Variant.Outlined" FullWidth="true" Class="mb-4" Required="true" />
<MudNumericField T="int" @bind-Value="scheduleForm.FilingYear" Label="신고연도" Variant="Variant.Outlined" FullWidth="true" Class="mb-4" Required="true" />
</MudForm>
</DialogContent>
<DialogActions>
<MudButton OnClick="CloseDialog">취소</MudButton>
<MudButton Color="Color.Primary" OnClick="SaveSchedule">저장</MudButton>
</DialogActions>
</MudDialog>
@code {
[CascadingParameter]
@@ -174,8 +158,7 @@ else
private List<Client> clients = [];
private Dictionary<int, string> clientMap = new();
private MudForm? form;
private bool isEditMode;
private TaxFilingSchedule? selectedSchedule;
private bool isDialogOpen;
private TaxFilingScheduleForm scheduleForm = new();
protected override async Task OnAfterRenderAsync(bool firstRender)
@@ -188,7 +171,6 @@ else
if (authState.User.Identity?.IsAuthenticated == true)
{
await LoadData();
PrepareCreate();
StateHasChanged();
}
}
@@ -210,31 +192,15 @@ else
}
}
private void PrepareCreate()
private void OpenCreateDialog()
{
selectedSchedule = null;
isEditMode = false;
scheduleForm = new TaxFilingScheduleForm
{
FilingYear = DateTime.Now.Year,
DueDate = DateTime.Today,
ClientId = clients.FirstOrDefault()?.Id,
FilingType = string.Empty
};
}
private void OnRowSelected(TaxFilingSchedule schedule)
{
if (schedule == null) return;
selectedSchedule = schedule;
isEditMode = true;
scheduleForm = new TaxFilingScheduleForm
{
ClientId = schedule.ClientId,
FilingType = schedule.FilingType,
DueDate = schedule.DueDate,
FilingYear = schedule.FilingYear
ClientId = clients.FirstOrDefault()?.Id
};
isDialogOpen = true;
}
private async Task SaveSchedule()
@@ -261,7 +227,7 @@ else
if (newId > 0)
{
Snackbar.Add("신고 일정이 추가되었습니다.", Severity.Success);
PrepareCreate();
CloseDialog();
await LoadData();
}
else
@@ -281,10 +247,6 @@ else
{
await TaxFilingClient.MarkCompletedAsync(id);
Snackbar.Add("신고 일정이 완료 처리되었습니다.", Severity.Success);
if (selectedSchedule?.Id == id)
{
PrepareCreate();
}
await LoadData();
}
catch (Exception ex)
@@ -310,10 +272,6 @@ else
{
await TaxFilingClient.DeleteAsync(id);
Snackbar.Add("신고 일정이 삭제되었습니다.", Severity.Success);
if (selectedSchedule?.Id == id)
{
PrepareCreate();
}
await LoadData();
}
catch (Exception ex)
@@ -322,13 +280,18 @@ else
}
}
private void CloseDialog()
{
isDialogOpen = false;
scheduleForm = new();
}
private static string GetClientDisplayName(Client client)
=> !string.IsNullOrWhiteSpace(client.CompanyName)
? client.CompanyName
: !string.IsNullOrWhiteSpace(client.Name)
? client.Name
: $"Client #{client.Id}";
private class TaxFilingScheduleForm
{
public int? ClientId { get; set; }
@@ -1,6 +1,5 @@
@page "/admin/tax-profiles"
@using TaxBaik.Web.Services.AdminClients
@using TaxBaik.Web.Components.Admin.Shared
@inject ITaxProfileBrowserClient TaxProfileClient
@inject IClientBrowserClient ClientClient
@inject ISnackbar Snackbar
@@ -15,7 +14,7 @@
<MudText Typo="Typo.h4" Class="admin-page-title">세무 프로필</MudText>
<MudText Typo="Typo.body2" Class="admin-page-subtitle">고객별 세무 프로필, 신고 일정, 위험도 추적</MudText>
</div>
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="PrepareCreate" StartIcon="@Icons.Material.Filled.Add" id="btn-add-profile">
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="OpenCreateDialog" StartIcon="@Icons.Material.Filled.Add">
새 프로필 추가
</MudButton>
</section>
@@ -24,100 +23,99 @@
{
<MudProgressCircular Indeterminate="true" Class="mt-4" />
}
else if (profiles.Count == 0)
{
<MudAlert Severity="Severity.Info" Class="mt-4">세무 프로필이 없습니다.</MudAlert>
}
else
{
<MudGrid Spacing="2" Class="mt-2">
<!-- Left: Dense Grid List -->
<MudItem XS="12" MD="8">
@if (profiles.Count == 0)
{
<MudAlert Severity="Severity.Info">세무 프로필이 없습니다.</MudAlert>
}
else
{
<MudDataGrid T="TaxProfile"
Items="@profiles"
Dense="true"
Hover="true"
Striped="true"
Virtualize="true"
RowsPerPage="30"
SelectedItem="@selectedProfile"
SelectedItemChanged="OnRowSelected"
Class="admin-grid">
<Columns>
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" />
<TemplateColumn Title="고객">
<CellTemplate>
@if (clientMap.TryGetValue(context.Item.ClientId, out var clientName))
{
@clientName
}
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.BusinessType" Title="사업 유형" />
<TemplateColumn Title="위험도">
<CellTemplate>
<MudChip Size="Size.Small" Color="@GetRiskColor(context.Item.TaxRiskLevel)" Variant="Variant.Filled">
@context.Item.TaxRiskLevel
</MudChip>
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="다음 신고">
<CellTemplate>
@if (context.Item.NextFilingDueDate.HasValue)
{
@context.Item.NextFilingDueDate.Value.ToString("yyyy-MM-dd")
}
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="작업" Sortable="false">
<CellTemplate>
<MudIconButton Icon="@Icons.Material.Filled.Delete" Color="Color.Error" Size="Size.Small" OnClick="@(async () => await DeleteProfile(context.Item.Id))" />
</CellTemplate>
</TemplateColumn>
</Columns>
</MudDataGrid>
}
</MudItem>
<!-- Right: Detail Form Panel (Inline Editor) -->
<MudItem XS="12" MD="4">
<MudPaper Class="pa-4 admin-surface admin-editor-panel" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 400px;">
<div class="d-flex align-center justify-space-between mb-4">
<MudText Typo="Typo.h6" Class="font-weight-bold">@(isEditMode ? "세무 프로필 수정" : "새 세무 프로필 추가")</MudText>
@if (isEditMode)
<MudDataGrid T="TaxProfile"
Items="@profiles"
Dense="true"
Hover="true"
Striped="true"
Virtualize="true"
RowsPerPage="30"
Class="admin-grid mt-4">
<Columns>
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" />
<TemplateColumn Title="고객">
<CellTemplate>
@if (clientMap.TryGetValue(context.Item.ClientId, out var clientName))
{
<MudButton Size="Size.Small" Variant="Variant.Outlined" Color="Color.Secondary" OnClick="PrepareCreate">
새로 작성
</MudButton>
<MudLink Href="@($"/taxbaik/admin/clients/{context.Item.ClientId}")" Color="Color.Primary">
@clientName
</MudLink>
}
</div>
<MudForm @ref="form">
<MudSelect T="int?" @bind-Value="profileForm.ClientId" Label="고객" Required="true" Variant="Variant.Outlined" FullWidth="@true" Class="mb-3" RequiredError="고객을 선택하세요." Disabled="@isEditMode">
@foreach (var client in clients)
{
<MudSelectItem Value="@((int?)client.Id)">@GetClientDisplayName(client)</MudSelectItem>
}
</MudSelect>
<CommonCodeSelect @bind-Value="profileForm.BusinessType" Group="BUSINESS_TYPE" Label="사업 유형" Class="mb-3" Required="true" />
<CommonCodeSelect @bind-Value="profileForm.TaxRiskLevel" Group="TAX_RISK_LEVEL" Label="위험도" Class="mb-3" />
<MudDatePicker @bind-Date="profileForm.NextFilingDueDate" Label="다음 신고 예정일" Variant="Variant.Outlined" FullWidth="@true" Class="mb-3" />
<MudTextField T="string" @bind-Value="profileForm.SpecialNotes" Label="특수 사항" Variant="Variant.Outlined" FullWidth="@true" Lines="3" Class="mb-4" />
<div class="d-flex justify-end gap-2">
@if (isEditMode)
{
<MudButton Variant="Variant.Outlined" Color="Color.Error" OnClick="@(async () => await DeleteProfile(selectedProfile?.Id ?? 0))">삭제</MudButton>
}
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="SaveProfile" id="btn-save-profile">저장</MudButton>
</div>
</MudForm>
</MudPaper>
</MudItem>
</MudGrid>
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.BusinessType" Title="사업 유형" />
<TemplateColumn Title="위험도">
<CellTemplate>
<MudChip Size="Size.Small" Color="@GetRiskColor(context.Item.TaxRiskLevel)" Variant="Variant.Filled">
@context.Item.TaxRiskLevel
</MudChip>
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="다음 신고">
<CellTemplate>
@if (context.Item.NextFilingDueDate.HasValue)
{
@context.Item.NextFilingDueDate.Value.ToString("yyyy-MM-dd")
}
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="작업" Sortable="false">
<CellTemplate>
<MudButtonGroup Size="Size.Small" Variant="Variant.Outlined">
<MudIconButton Icon="@Icons.Material.Filled.Edit" OnClick="@(async () => await OpenEditDialog(context.Item))" />
<MudIconButton Icon="@Icons.Material.Filled.Delete" Color="Color.Error" OnClick="@(async () => await DeleteProfile(context.Item.Id))" />
</MudButtonGroup>
</CellTemplate>
</TemplateColumn>
</Columns>
</MudDataGrid>
}
<!-- Create/Edit Dialog -->
<MudDialog @bind-IsVisible="isDialogOpen" Options="new DialogOptions { MaxWidth = MaxWidth.Small, FullWidth = true }">
<TitleContent>
<MudText Typo="Typo.h6">@(isEditMode ? "세무 프로필 수정" : "새 세무 프로필 추가")</MudText>
</TitleContent>
<DialogContent>
<MudForm @ref="form">
<MudSelect T="int?" @bind-Value="profileForm.ClientId" Label="고객" Required="true" Variant="Variant.Outlined" FullWidth="true" Class="mb-4" RequiredError="고객을 선택하세요.">
@foreach (var client in clients)
{
<MudSelectItem Value="@((int?)client.Id)">@GetClientDisplayName(client)</MudSelectItem>
}
</MudSelect>
<MudSelect T="string" @bind-Value="profileForm.BusinessType" Label="사업 유형" Variant="Variant.Outlined" FullWidth="true" Class="mb-4" Required="true">
<MudSelectItem Value="@("일반제조업")">일반제조업</MudSelectItem>
<MudSelectItem Value="@("도소매업")">도소매업</MudSelectItem>
<MudSelectItem Value="@("서비스업")">서비스업</MudSelectItem>
<MudSelectItem Value="@("정보통신업")">정보통신업</MudSelectItem>
<MudSelectItem Value="@("부동산업")">부동산업</MudSelectItem>
<MudSelectItem Value="@("건설업")">건설업</MudSelectItem>
<MudSelectItem Value="@("음식점업")">음식점업</MudSelectItem>
<MudSelectItem Value="@("프리랜서")">프리랜서</MudSelectItem>
<MudSelectItem Value="@("기타")">기타</MudSelectItem>
</MudSelect>
<MudSelect T="string" @bind-Value="profileForm.TaxRiskLevel" Label="위험도" Variant="Variant.Outlined" FullWidth="true" Class="mb-4">
<MudSelectItem Value="@("low")">낮음</MudSelectItem>
<MudSelectItem Value="@("normal")">보통</MudSelectItem>
<MudSelectItem Value="@("high")">높음</MudSelectItem>
</MudSelect>
<MudDatePicker @bind-Date="profileForm.NextFilingDueDate" Label="다음 신고 예정일" Variant="Variant.Outlined" FullWidth="true" Class="mb-4" />
<MudTextField T="string" @bind-Value="profileForm.SpecialNotes" Label="특수 사항" Variant="Variant.Outlined" FullWidth="true" Lines="2" />
</MudForm>
</DialogContent>
<DialogActions>
<MudButton OnClick="CloseDialog">취소</MudButton>
<MudButton Color="Color.Primary" OnClick="SaveProfile">저장</MudButton>
</DialogActions>
</MudDialog>
@code {
[CascadingParameter]
private Task<AuthenticationState>? AuthStateTask { get; set; }
@@ -125,21 +123,24 @@ else
private List<TaxProfile>? profiles;
private List<Client> clients = [];
private Dictionary<int, string> clientMap = new();
private List<CommonCode> riskLevels = [];
private MudForm? form;
private bool isDialogOpen;
private bool isEditMode;
private TaxProfile? selectedProfile;
private TaxProfile? editingProfile;
private TaxProfileForm profileForm = new();
protected override async Task OnInitializedAsync()
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (AuthStateTask != null)
if (firstRender)
{
var authState = await AuthStateTask;
if (authState.User.Identity?.IsAuthenticated == true)
if (AuthStateTask != null)
{
await LoadData();
PrepareCreate();
var authState = await AuthStateTask;
if (authState.User.Identity?.IsAuthenticated == true)
{
await LoadData();
StateHasChanged();
}
}
}
}
@@ -152,7 +153,6 @@ else
var (clientItems, _) = await ClientClient.GetPagedAsync(pageSize: 1000);
clients = clientItems.ToList();
clientMap = clients.ToDictionary(c => c.Id, GetClientDisplayName);
}
catch (Exception ex)
{
@@ -160,23 +160,23 @@ else
}
}
private void PrepareCreate()
private void OpenCreateDialog()
{
selectedProfile = null;
isEditMode = false;
editingProfile = null;
profileForm = new TaxProfileForm
{
ClientId = clients.FirstOrDefault()?.Id,
TaxRiskLevel = "normal",
NextFilingDueDate = DateTime.Today.AddMonths(1)
};
isDialogOpen = true;
}
private void OnRowSelected(TaxProfile profile)
private async Task OpenEditDialog(TaxProfile profile)
{
if (profile == null) return;
selectedProfile = profile;
isEditMode = true;
editingProfile = profile;
profileForm = new TaxProfileForm
{
ClientId = profile.ClientId,
@@ -185,6 +185,7 @@ else
NextFilingDueDate = profile.NextFilingDueDate,
SpecialNotes = profile.SpecialNotes
};
isDialogOpen = true;
}
private async Task SaveProfile()
@@ -194,16 +195,16 @@ else
await form.Validate();
if (!form.IsValid)
{
Snackbar.Add("고객을 선택하세요.", Severity.Warning);
Snackbar.Add("고객을 선택하세요.", Severity.Warning);
return;
}
}
try
{
if (isEditMode && selectedProfile != null)
if (isEditMode && editingProfile != null)
{
await TaxProfileClient.UpdateAsync(selectedProfile.Id, profileForm.BusinessType,
await TaxProfileClient.UpdateAsync(editingProfile.Id, profileForm.BusinessType,
null, profileForm.NextFilingDueDate, profileForm.TaxRiskLevel);
Snackbar.Add("세무 프로필이 수정되었습니다.", Severity.Success);
}
@@ -219,6 +220,7 @@ else
profileForm.BusinessType);
if (newId > 0)
{
// 생성 후 상태 업데이트 처리
await TaxProfileClient.UpdateAsync(
newId,
profileForm.BusinessType,
@@ -228,7 +230,7 @@ else
Snackbar.Add("세무 프로필이 추가되었습니다.", Severity.Success);
}
}
PrepareCreate();
CloseDialog();
await LoadData();
}
catch (Exception ex)
@@ -253,10 +255,6 @@ else
{
await TaxProfileClient.DeleteAsync(id);
Snackbar.Add("세무 프로필이 삭제되었습니다.", Severity.Success);
if (selectedProfile?.Id == id)
{
PrepareCreate();
}
await LoadData();
}
catch (Exception ex)
@@ -265,6 +263,14 @@ else
}
}
private void CloseDialog()
{
isDialogOpen = false;
isEditMode = false;
editingProfile = null;
profileForm = new();
}
private Color GetRiskColor(string riskLevel) => riskLevel switch
{
"high" => Color.Error,
@@ -279,7 +285,6 @@ else
: !string.IsNullOrWhiteSpace(client.Name)
? client.Name
: $"Client #{client.Id}";
private class TaxProfileForm
{
public int? ClientId { get; set; }
@@ -1,88 +0,0 @@
namespace TaxBaik.Web.Components.Admin.Shared;
public static class BusinessDayCalculator
{
private sealed record HolidayWindow(DateOnly Start, DateOnly End)
{
public IEnumerable<DateOnly> Dates()
{
for (var date = Start; date <= End; date = date.AddDays(1))
{
yield return date;
}
}
}
private static readonly HolidayWindow[] HolidayWindows =
{
new(new DateOnly(2026, 1, 1), new DateOnly(2026, 1, 1)),
new(new DateOnly(2026, 2, 16), new DateOnly(2026, 2, 18)),
new(new DateOnly(2026, 3, 1), new DateOnly(2026, 3, 2)),
new(new DateOnly(2026, 5, 5), new DateOnly(2026, 5, 5)),
new(new DateOnly(2026, 6, 6), new DateOnly(2026, 6, 6)),
new(new DateOnly(2026, 8, 15), new DateOnly(2026, 8, 17)),
new(new DateOnly(2026, 9, 24), new DateOnly(2026, 9, 26)),
new(new DateOnly(2026, 10, 3), new DateOnly(2026, 10, 5)),
new(new DateOnly(2026, 10, 9), new DateOnly(2026, 10, 9)),
new(new DateOnly(2026, 12, 25), new DateOnly(2026, 12, 25))
};
private static readonly HashSet<DateOnly> HolidayDates = BuildHolidayDates();
public static DateOnly GetEffectiveDueDate(DateOnly dueDate)
{
var effectiveDate = dueDate;
while (!IsBusinessDay(effectiveDate))
{
effectiveDate = effectiveDate.AddDays(1);
}
return effectiveDate;
}
public static int GetDday(DateOnly dueDate, DateOnly? referenceDate = null)
{
var today = referenceDate ?? DateOnly.FromDateTime(DateTime.Today);
var effectiveDueDate = GetEffectiveDueDate(dueDate);
return effectiveDueDate.DayNumber - today.DayNumber;
}
public static bool IsBusinessDay(DateOnly date)
=> date.DayOfWeek is not DayOfWeek.Saturday and not DayOfWeek.Sunday
&& !HolidayDates.Contains(date);
private static HashSet<DateOnly> BuildHolidayDates()
{
var holidays = new HashSet<DateOnly>();
foreach (var window in HolidayWindows)
{
foreach (var date in window.Dates())
{
holidays.Add(date);
}
}
// 주말과 연속 공휴일 뒤에 붙는 대체휴일을 다음 영업일로 자동 확장한다.
foreach (var window in HolidayWindows)
{
foreach (var date in window.Dates())
{
if (date.DayOfWeek is not DayOfWeek.Saturday and not DayOfWeek.Sunday)
{
continue;
}
var substitute = date.AddDays(1);
while (substitute.DayOfWeek is DayOfWeek.Saturday or DayOfWeek.Sunday || holidays.Contains(substitute))
{
substitute = substitute.AddDays(1);
}
holidays.Add(substitute);
}
}
return holidays;
}
}
@@ -1,56 +0,0 @@
@using TaxBaik.Domain.Entities
@using TaxBaik.Web.Services.AdminClients
@inject ICommonCodeBrowserClient CommonCodeClient
<MudSelect T="string"
Value="Value"
ValueChanged="ValueChanged"
Label="@Label"
Variant="@Variant"
FullWidth="@FullWidth"
Class="@Class"
Required="@Required"
Clearable="@Clearable"
Disabled="@Disabled">
@if (!string.IsNullOrWhiteSpace(Placeholder))
{
<MudSelectItem Value="@string.Empty">@Placeholder</MudSelectItem>
}
@foreach (var item in items)
{
<MudSelectItem Value="@item.CodeValue">@item.CodeName</MudSelectItem>
}
</MudSelect>
@code {
[Parameter] public string? Value { get; set; }
[Parameter] public EventCallback<string?> ValueChanged { get; set; }
[Parameter] public string Group { get; set; } = string.Empty;
[Parameter] public string Label { get; set; } = string.Empty;
[Parameter] public Variant Variant { get; set; } = Variant.Outlined;
[Parameter] public bool FullWidth { get; set; } = true;
[Parameter] public string? Class { get; set; }
[Parameter] public bool Required { get; set; }
[Parameter] public bool Clearable { get; set; }
[Parameter] public bool Disabled { get; set; }
[Parameter] public string? Placeholder { get; set; }
private List<CommonCode> items = [];
protected override async Task OnParametersSetAsync()
{
var normalizedGroup = Group?.Trim() ?? string.Empty;
if (!string.Equals(normalizedGroup, _loadedGroup, StringComparison.OrdinalIgnoreCase))
{
_loadedGroup = normalizedGroup;
items = string.IsNullOrWhiteSpace(normalizedGroup)
? []
: (await CommonCodeClient.GetByGroupAsync(normalizedGroup))
.OrderBy(x => x.SortOrder)
.ThenBy(x => x.CodeName)
.ToList();
}
}
private string? _loadedGroup;
}
@@ -1,80 +0,0 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using TaxBaik.Application.Services;
using TaxBaik.Domain.Entities;
namespace TaxBaik.Web.Controllers;
[ApiController]
[Route("api/[controller]")]
[Authorize]
public class CommonCodeController(CommonCodeService commonCodeService) : ControllerBase
{
[HttpGet]
public async Task<IActionResult> GetAllActive()
{
try
{
var codes = await commonCodeService.GetAllActiveAsync();
return Ok(codes);
}
catch (Exception ex)
{
return StatusCode(500, new { error = "공통코드 조회 실패", message = ex.Message });
}
}
[HttpGet("group/{group}")]
public async Task<IActionResult> GetByGroup(string group)
{
try
{
var codes = await commonCodeService.GetByGroupAsync(group);
return Ok(codes);
}
catch (Exception ex)
{
return StatusCode(500, new { error = "그룹별 공통코드 조회 실패", message = ex.Message });
}
}
[HttpGet("groups")]
public async Task<IActionResult> GetGroups()
{
try
{
var groups = await commonCodeService.GetAllGroupsAsync();
return Ok(groups);
}
catch (Exception ex)
{
return StatusCode(500, new { error = "공통코드 그룹 조회 실패", message = ex.Message });
}
}
[HttpGet("{group}/{value}")]
public async Task<IActionResult> Get(string group, string value)
{
var code = await commonCodeService.GetAsync(group, value);
return code is null ? NotFound() : Ok(code);
}
[HttpPost]
public async Task<IActionResult> Upsert([FromBody] CommonCode code)
{
if (string.IsNullOrWhiteSpace(code.CodeGroup) || string.IsNullOrWhiteSpace(code.CodeValue) || string.IsNullOrWhiteSpace(code.CodeName))
return BadRequest(new { error = "코드 그룹, 값, 이름은 필수입니다." });
if (code.CodeValue.Contains(' '))
return BadRequest(new { error = "code_value에는 공백을 사용할 수 없습니다." });
await commonCodeService.UpsertAsync(code);
return Ok(code);
}
[HttpDelete("{group}/{value}")]
public async Task<IActionResult> Delete(string group, string value)
{
await commonCodeService.DeleteAsync(group, value);
return NoContent();
}
}
+45 -161
View File
@@ -3,171 +3,55 @@
ViewData["Title"] = "소개 | 백원숙 세무회계";
}
<!-- Breadcrumb Navigation -->
<nav aria-label="breadcrumb" class="py-3" style="background: #F9F7F3; border-bottom: 1px solid #D9D3C4;">
<div class="container">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="/taxbaik/" class="text-decoration-none">홈</a></li>
<li class="breadcrumb-item active">소개</li>
</ol>
</div>
</nav>
<div class="container py-5">
<!-- 돌아가기 버튼 -->
<div class="mb-4">
<a href="/taxbaik/" class="btn btn-sm btn-outline-secondary">← 홈으로 돌아가기</a>
<h1 class="fw-bold mb-5">백원숙 세무사</h1>
<div class="row g-5">
<div class="col-md-6">
<p class="lead">사업자 세무, 부동산 거래, 가족 자산 관리 등 종합적인 세무 컨설팅을 제공합니다.</p>
<p>10년 이상의 풍부한 경험과 3개의 국가자격증을 바탕으로, 각 클라이언트의 상황에 맞는 맞춤형 솔루션을 제시합니다.</p>
</div>
<div class="col-md-6">
<div class="bg-light p-4 rounded">
<h5 class="fw-bold mb-3">보유 자격증</h5>
<div class="mb-3">
<p class="mb-1">🎓 <strong>세무사</strong></p>
<small class="text-muted">2015년 자격취득</small>
</div>
<div class="mb-3">
<p class="mb-1">🏠 <strong>부동산중개사</strong></p>
<small class="text-muted">부동산 거래 전문성</small>
</div>
<div>
<p class="mb-1">📊 <strong>보험설계사</strong></p>
<small class="text-muted">자산관리 전문성</small>
</div>
</div>
</div>
</div>
<!-- Hero Section -->
<section class="mb-5 pb-5 border-bottom">
<h1 class="fw-bold mb-4" style="font-size: 2.5rem;">안녕하세요, 백원숙 세무사입니다.</h1>
<div class="row g-5">
<div class="col-lg-6">
<p class="lead">사업자 세무, 부동산 거래, 가족 자산 관리 등 종합적인 세무 컨설팅을 제공합니다.</p>
<p>10년 이상의 풍부한 경험과 3개의 국가자격증을 바탕으로, 각 클라이언트의 상황에 맞는 맞춤형 솔루션을 제시합니다.</p>
<p class="text-muted">저도 작게 시작하는 사업가였습니다. 처음 사업을 시작할 때의 막막함을 잘 알고 있습니다. 그 경험이 오늘날 고객분들과 소통하는 원동력입니다.</p>
</div>
<div class="col-lg-6">
<div class="bg-light p-4 rounded">
<h5 class="fw-bold mb-3">보유 자격증</h5>
<div class="mb-3">
<p class="mb-1">🎓 <strong>세무사</strong></p>
<small class="text-muted">2015년 자격취득 · 10년 경력</small>
</div>
<div class="mb-3">
<p class="mb-1">🏠 <strong>부동산중개사</strong></p>
<small class="text-muted">부동산 거래 구조 이해 · 실무 전문성</small>
</div>
<div>
<p class="mb-1">📊 <strong>보험설계사</strong></p>
<small class="text-muted">자산관리·상속 대비 전문성</small>
</div>
</div>
</div>
</div>
</section>
<hr class="my-5" />
<!-- Expertise Section -->
<section class="mb-5 pb-5 border-bottom">
<h2 class="fw-bold mb-4">세 가지 자격의 시너지</h2>
<p class="text-muted mb-4">단순히 세금을 계산하는 것이 아니라, 사업 구조와 자산 흐름을 종합적으로 이해합니다.</p>
<div class="row g-4">
<div class="col-md-6">
<div class="p-4 border rounded-3" style="border-color: #D9D3C4;">
<div style="font-size: 2rem; margin-bottom: 1rem;">⚖️</div>
<h5 class="fw-bold mb-2">공인 세무사</h5>
<p class="text-muted small mb-0">
세무신고·장부관리·조세 자문 등 세무 업무 전반을 공식 대리합니다. 신고 기한 내 불이익 없는 신고를 기본으로 합니다.
</p>
</div>
</div>
<div class="col-md-6">
<div class="p-4 border rounded-3" style="border-color: #D9D3C4;">
<div style="font-size: 2rem; margin-bottom: 1rem;">🏠</div>
<h5 class="fw-bold mb-2">공인 부동산중개사</h5>
<p class="text-muted small mb-0">
부동산 거래 구조를 이해해 양도·증여·임대 세무상담에 현실감을 더합니다. 계약 전 사전검토로 선택지를 최대화합니다.
</p>
</div>
</div>
<div class="col-md-6">
<div class="p-4 border rounded-3" style="border-color: #D9D3C4;">
<div style="font-size: 2rem; margin-bottom: 1rem;">🛡️</div>
<h5 class="fw-bold mb-2">보험설계사 자격</h5>
<p class="text-muted small mb-0">
상속·증여·대표자 리스크 관점에서 가족 현금흐름과 보험 구조를 함께 설명합니다. 절세와 리스크 관리를 동시에 다룹니다.
</p>
</div>
</div>
<h2 class="fw-bold mb-4">서비스 철학</h2>
<div class="row g-4">
<div class="col-md-4 text-center">
<div class="mb-3" style="font-size: 2rem;">🎯</div>
<h5>명확한 설명</h5>
<p class="small">어려운 세법을 쉽게 설명하여 이해를 높입니다</p>
</div>
</section>
<div class="col-md-4 text-center">
<div class="mb-3" style="font-size: 2rem;">💰</div>
<h5>최대 절세</h5>
<p class="small">법적 범위 내에서 세금을 최소화합니다</p>
</div>
<div class="col-md-4 text-center">
<div class="mb-3" style="font-size: 2rem;">🤝</div>
<h5>신뢰 관계</h5>
<p class="small">장기적 파트너로서 성장을 함께 합니다</p>
</div>
</div>
<!-- Philosophy Section -->
<section class="mb-5 pb-5 border-bottom">
<h2 class="fw-bold mb-4">상담 철학</h2>
<div class="row g-4">
<div class="col-md-4 text-center">
<div class="mb-3" style="font-size: 2.5rem;">🎯</div>
<h5>명확한 설명</h5>
<p class="small text-muted">어려운 세법을 쉽게 설명하여 이해를 높입니다. 전문용어로 일방적 설명하지 않습니다.</p>
</div>
<div class="col-md-4 text-center">
<div class="mb-3" style="font-size: 2.5rem;">💰</div>
<h5>최대 절세</h5>
<p class="small text-muted">법적 범위 내에서 세금을 최소화합니다. 초기 세무 전략이 연간 수백만 원의 차이를 만듭니다.</p>
</div>
<div class="col-md-4 text-center">
<div class="mb-3" style="font-size: 2.5rem;">🤝</div>
<h5>신뢰 파트너</h5>
<p class="small text-muted">장기적 파트너로서 성장을 함께 합니다. 일회성 상담이 아닌 지속적 관계를 지향합니다.</p>
</div>
</div>
</section>
<!-- Online Consultation Section -->
<section class="mb-5 pb-5 border-bottom">
<h2 class="fw-bold mb-4">전국 비대면 온라인 상담</h2>
<div class="row g-4">
<div class="col-md-6">
<h5 class="fw-bold mb-3">왜 온라인인가?</h5>
<ul class="list-unstyled">
<li class="mb-2"><strong>✓ 시간 절약</strong><br/><small class="text-muted">서울로 올 필요 없이 카카오·이메일로 진행</small></li>
<li class="mb-2"><strong>✓ 자료 공유 편의</strong><br/><small class="text-muted">온라인으로 자료 검토 후 맞춤 상담</small></li>
<li class="mb-2"><strong>✓ 기록 남음</strong><br/><small class="text-muted">채팅·메일로 모든 내용을 기록 관리</small></li>
<li class="mb-2"><strong>✓ 비용 절감</strong><br/><small class="text-muted">방문 비용 없이 효율적 상담 제공</small></li>
</ul>
</div>
<div class="col-md-6">
<h5 class="fw-bold mb-3">상담 방식</h5>
<div class="p-3 bg-light rounded-3 mb-3">
<p class="fw-bold mb-2">📞 전화 상담</p>
<small class="text-muted">즉시 상황 파악 필요 시 · 010-4122-8268</small>
</div>
<div class="p-3 bg-light rounded-3 mb-3">
<p class="fw-bold mb-2">💬 카카오채널</p>
<small class="text-muted">당일 응답 · 편한 시간에 문의</small>
</div>
<div class="p-3 bg-light rounded-3 mb-3">
<p class="fw-bold mb-2">✉️ 이메일</p>
<small class="text-muted">자료 첨부 상담 · taxbaik5668@gmail.com</small>
</div>
</div>
</div>
</section>
<!-- CTA Section -->
<section class="text-center mb-5 pb-5 border-bottom">
<h3 class="fw-bold mb-3">세금 고민, 이제 끝내세요</h3>
<p class="text-muted mb-5">무료 상담으로 현재 상황을 진단하고 맞춤형 절세 전략을 받아보세요.</p>
<div class="d-flex gap-3 justify-content-center flex-wrap">
<a href="/taxbaik/contact" class="btn btn-primary btn-lg">상담 신청하기</a>
<a href="http://pf.kakao.com/_xoxchTX" target="_blank" class="btn btn-warning btn-lg">카카오로 문의</a>
</div>
</section>
<!-- 관련 페이지 네비게이션 -->
<section class="text-center py-5">
<h4 class="fw-bold mb-4">다른 페이지 보기</h4>
<div class="row g-3 justify-content-center">
<div class="col-md-4">
<a href="/taxbaik/" class="btn btn-outline-primary btn-sm w-100 py-3">
🏠 홈으로<br/>
<small class="text-muted">서비스 및 최신 정보</small>
</a>
</div>
<div class="col-md-4">
<a href="/taxbaik/services" class="btn btn-outline-primary btn-sm w-100 py-3">
📊 전문 서비스<br/>
<small class="text-muted">사업자·부동산·자산 관리</small>
</a>
</div>
<div class="col-md-4">
<a href="/taxbaik/blog" class="btn btn-outline-primary btn-sm w-100 py-3">
📝 세무 정보 블로그<br/>
<small class="text-muted">절세팁 및 신고 가이드</small>
</a>
</div>
</div>
</section>
<div class="text-center mt-5">
<a href="/taxbaik/contact" class="btn btn-primary btn-lg">상담 신청하기</a>
</div>
</div>
-4
View File
@@ -1,4 +0,0 @@
@page "/announcement"
@{
Response.Redirect("/taxbaik/#top");
}
+2 -2
View File
@@ -39,8 +39,8 @@
<hr class="my-4" />
<div class="article-body lh-lg markdown-body">
@Html.Raw(Model.HtmlContent)
<div class="article-body lh-lg">
@Html.Raw(Model.Post.Content)
</div>
<hr class="my-4" />
-3
View File
@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using TaxBaik.Application.Services;
using TaxBaik.Domain.Entities;
using Markdig;
namespace TaxBaik.Web.Pages.Blog;
@@ -10,7 +9,6 @@ public class BlogPostModel : PageModel
private readonly BlogService _blogService;
public BlogPost? Post { get; set; }
public string? HtmlContent { get; set; }
public BlogPostModel(BlogService blogService)
{
@@ -22,7 +20,6 @@ public class BlogPostModel : PageModel
Post = await _blogService.GetBySlugAsync(slug);
if (Post != null)
{
HtmlContent = Markdown.ToHtml(Post.Content ?? "");
_ = _blogService.IncrementViewCountAsync(Post.Id);
}
}
-4
View File
@@ -1,4 +0,0 @@
@page "/faq"
@{
Response.Redirect("/taxbaik/#faq");
}
+105 -64
View File
@@ -81,7 +81,7 @@ else
<span class="badge bg-primary-badge mb-3">경험 있는 세무사의 맞춤 전략</span>
<h1 class="mb-3">
세금과 자산<br/>
<span style="color: #E8E4D8;">한 번에 해결하는</span>
<span style="color: #FFD54F;">한 번에 해결하는</span>
</h1>
<p class="fs-5 mb-4" style="line-height: 1.8; opacity: 0.95;">
사업자 세무, 부동산 거래, 가족자산 관리를 위한<br/>
@@ -103,14 +103,31 @@ else
</section>
}
<!-- About 링크 배너 -->
<section class="py-3" style="background: rgba(46, 92, 78, 0.05); border-bottom: 1px solid rgba(46, 92, 78, 0.1);">
<!-- 신뢰도 스트립 — 자격과 경험 -->
<section class="trust-strip">
<div class="container">
<div class="d-flex justify-content-between align-items-center gap-3 flex-wrap">
<div>
<p class="mb-0 small text-muted">세무사의 경력, 자격, 상담 철학을 알아보세요</p>
<div class="row">
<div class="col-md-4">
<div class="trust-item">
<div class="trust-icon">🎓</div>
<h3>세무사</h3>
<p>국가공인 세무사 자격<br/>2015년 취득 · 10년 경력</p>
</div>
</div>
<div class="col-md-4">
<div class="trust-item">
<div class="trust-icon">🏢</div>
<h3>부동산중개사</h3>
<p>부동산 거래 전문 자격<br/>양도세·취득세 컨설팅</p>
</div>
</div>
<div class="col-md-4">
<div class="trust-item">
<div class="trust-icon">📊</div>
<h3>보험설계사</h3>
<p>자산관리 전문 자격<br/>가족 자산 플래닝</p>
</div>
</div>
<a href="/taxbaik/about" class="btn btn-sm btn-outline-primary">백원숙 세무사 소개 →</a>
</div>
</div>
</section>
@@ -127,7 +144,7 @@ else
@{
var focusService = season?.FocusService ?? "";
// 시즌에 따라 서비스 카드 순서 결정
// 시즌에 따라 서비스 카드 순서 결정: 시즌 관련 카드가 맨 앞
var cardOrder = focusService switch
{
"real-estate-tax" => new[] { "real-estate-tax", "business-tax", "family-asset" },
@@ -145,10 +162,18 @@ else
<div class="col-lg-4 col-md-6">
<div class="card service-card h-100 @(isFeatured ? "service-card--featured" : "")">
@if (isFeatured) { <div class="service-card-badge">현재 시즌</div> }
<div class="service-icon">📊</div>
<div class="service-icon">🏪</div>
<div class="card-body pt-0">
<h3 class="card-title">사업자 세무</h3>
<p class="text-muted small">월 기장부터 종합소득세, 신규 사업자 세무까지 — 사업 초기부터 체계적인 세무 관리.</p>
<ul class="list-unstyled small mb-3">
<li class="mb-2">✓ 정확한 기장 및 결산</li>
<li class="mb-2">✓ 세금계산서 관리</li>
<li class="mb-2">✓ 경비처리 최적화</li>
<li class="mb-2">✓ 절세 전략 수립</li>
</ul>
<p class="text-muted small">
초기부터 세무 전략을 수립하면 연간 최대 수백만 원의 절세가 가능합니다.
</p>
<a href="/taxbaik/services#business-tax" class="btn btn-sm btn-outline-primary mt-3">자세히 보기</a>
</div>
</div>
@@ -162,7 +187,15 @@ else
<div class="service-icon">🏠</div>
<div class="card-body pt-0">
<h3 class="card-title">부동산 세금</h3>
<p class="text-muted small">양도세·취득세·임대소득세 — 부동산 거래 시 세금 부담을 줄이는 전략.</p>
<ul class="list-unstyled small mb-3">
<li class="mb-2">✓ 양도세 최소화</li>
<li class="mb-2">✓ 취득세 절감</li>
<li class="mb-2">✓ 임대소득 관리</li>
<li class="mb-2">✓ 다주택자 세무</li>
</ul>
<p class="text-muted small">
부동산 거래 시 미리 상담하면 세금 부담을 크게 줄일 수 있습니다.
</p>
<a href="/taxbaik/services#real-estate-tax" class="btn btn-sm btn-outline-primary mt-3">자세히 보기</a>
</div>
</div>
@@ -176,7 +209,15 @@ else
<div class="service-icon">👨‍👩‍👧‍👦</div>
<div class="card-body pt-0">
<h3 class="card-title">가족자산 관리</h3>
<p class="text-muted small">증여·상속 사전 계획부터 대표자 리스크 관리까지 — 가족 자산을 지키는 전략.</p>
<ul class="list-unstyled small mb-3">
<li class="mb-2">✓ 증여세 전략</li>
<li class="mb-2">✓ 상속세 대비</li>
<li class="mb-2">✓ 자산 이전 계획</li>
<li class="mb-2">✓ 가족법인 설립</li>
</ul>
<p class="text-muted small">
세대 이전 전에 사전 계획하면 세금 부담을 현저히 줄일 수 있습니다.
</p>
<a href="/taxbaik/services#family-asset" class="btn btn-sm btn-outline-primary mt-3">자세히 보기</a>
</div>
</div>
@@ -187,7 +228,52 @@ else
</div>
</section>
<!-- 블로그 & 시즌 포스트 (상단으로 올림) -->
<!-- 상담 프로세스 -->
<section class="py-5" style="background: #F7F9FC;">
<div class="container">
<div class="text-center mb-5">
<h2 class="section-title">상담 과정</h2>
</div>
<div class="row align-items-center">
<div class="col-md-3 text-center mb-4 mb-md-0">
<div style="width: 80px; height: 80px; margin: 0 auto 1rem; background: linear-gradient(135deg, #1B4F8A 0%, #133970 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px;">
📞
</div>
<h4>1단계: 무료 상담</h4>
<p class="text-muted small">상황 파악 및<br/>현재 문제점 확인</p>
</div>
<div class="col-md-3 text-center mb-4 mb-md-0">
<div style="width: 80px; height: 80px; margin: 0 auto 1rem; background: linear-gradient(135deg, #1B4F8A 0%, #133970 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px;">
📋
</div>
<h4>2단계: 세무진단</h4>
<p class="text-muted small">자료 분석 및<br/>최적 방안 도출</p>
</div>
<div class="col-md-3 text-center mb-4 mb-md-0">
<div style="width: 80px; height: 80px; margin: 0 auto 1rem; background: linear-gradient(135deg, #1B4F8A 0%, #133970 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px;">
💡
</div>
<h4>3단계: 맞춤제안</h4>
<p class="text-muted small">절세 전략 및<br/>실행 계획 제시</p>
</div>
<div class="col-md-3 text-center">
<div style="width: 80px; height: 80px; margin: 0 auto 1rem; background: linear-gradient(135deg, #1B4F8A 0%, #133970 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px;">
</div>
<h4>4단계: 실행지원</h4>
<p class="text-muted small">지속적 관리 및<br/>추가 상담 제공</p>
</div>
</div>
<div class="text-center mt-5">
<p class="text-muted mb-3">상담은 온라인 또는 오프라인으로 진행되며, 완전히 비밀이 보장됩니다.</p>
<a href="/taxbaik/contact" class="btn btn-primary btn-lg">상담 신청하기</a>
</div>
</div>
</section>
<!-- 세무 정보 블로그 -->
<section class="py-5">
<div class="container">
<div class="text-center mb-5">
@@ -201,7 +287,7 @@ else
}
else
{
<h2 class="section-title">세무 정보 & 절세 팁</h2>
<h2 class="section-title">세무 정보</h2>
<p class="text-muted">최신 세법 변화와 실무 팁을 공유합니다</p>
}
</div>
@@ -227,7 +313,7 @@ else
<small class="badge bg-season-badge">@post.CategoryName</small>
<h4 class="card-title mt-3">@post.Title</h4>
<p class="text-muted small">@((post.PublishedAt ?? post.CreatedAt).ToString("yyyy년 MM월 dd일"))</p>
<a href="/taxbaik/blog/@post.Slug" class="btn btn-sm btn-seasonal">기</a>
<a href="/taxbaik/blog/@post.Slug" class="btn btn-sm btn-seasonal">자세히 보기</a>
</div>
</div>
</div>
@@ -245,7 +331,7 @@ else
<small class="badge bg-primary-badge">@post.CategoryName</small>
<h4 class="card-title mt-3">@post.Title</h4>
<p class="text-muted small">@((post.PublishedAt ?? post.CreatedAt).ToString("yyyy년 MM월 dd일"))</p>
<a href="/taxbaik/blog/@post.Slug" class="btn btn-sm btn-primary">기</a>
<a href="/taxbaik/blog/@post.Slug" class="btn btn-sm btn-primary">글 내용 보기</a>
</div>
</div>
</div>
@@ -256,7 +342,7 @@ else
<div class="text-center mt-5 d-flex justify-content-center gap-3 flex-wrap">
@if (season != null && !string.IsNullOrEmpty(season.RelatedCategorySlug))
{
<a href="/taxbaik/blog?category=@season.RelatedCategorySlug" class="btn btn-outline-secondary btn-lg">
<a href="/taxbaik/blog?category=@season.RelatedCategorySlug" class="btn btn-outline-seasonal btn-lg">
📅 @season.Name 전체 글 보기
</a>
}
@@ -266,55 +352,10 @@ else
</div>
</section>
<!-- 상담 프로세스 -->
<section class="py-5" style="background: #F9F7F3;">
<div class="container">
<div class="text-center mb-5">
<h2 class="section-title">상담 과정</h2>
</div>
<div class="row align-items-center">
<div class="col-md-3 text-center mb-4 mb-md-0">
<div style="width: 80px; height: 80px; margin: 0 auto 1rem; background: linear-gradient(135deg, #C89D6E 0%, #A67C52 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px;">
📞
</div>
<h4>1단계: 무료 상담</h4>
<p class="text-muted small">상황 파악 및<br/>현재 문제점 확인</p>
</div>
<div class="col-md-3 text-center mb-4 mb-md-0">
<div style="width: 80px; height: 80px; margin: 0 auto 1rem; background: linear-gradient(135deg, #C89D6E 0%, #A67C52 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px;">
📋
</div>
<h4>2단계: 세무진단</h4>
<p class="text-muted small">자료 분석 및<br/>최적 방안 도출</p>
</div>
<div class="col-md-3 text-center mb-4 mb-md-0">
<div style="width: 80px; height: 80px; margin: 0 auto 1rem; background: linear-gradient(135deg, #C89D6E 0%, #A67C52 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px;">
💡
</div>
<h4>3단계: 맞춤제안</h4>
<p class="text-muted small">절세 전략 및<br/>실행 계획 제시</p>
</div>
<div class="col-md-3 text-center">
<div style="width: 80px; height: 80px; margin: 0 auto 1rem; background: linear-gradient(135deg, #C89D6E 0%, #A67C52 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px;">
</div>
<h4>4단계: 실행지원</h4>
<p class="text-muted small">지속적 관리 및<br/>추가 상담 제공</p>
</div>
</div>
<div class="text-center mt-5">
<p class="text-muted mb-3">상담은 온라인 또는 오프라인으로 진행되며, 완전히 비밀이 보장됩니다.</p>
<a href="/taxbaik/contact" class="btn btn-primary btn-lg">상담 신청하기</a>
</div>
</div>
</section>
<!-- 자주 묻는 질문 (DB 연동) -->
@if (Model.ActiveFaqs.Count > 0)
{
<section class="py-5" style="background: #F9F7F3;">
<section class="py-5" style="background: #F7F9FC;">
<div class="container">
<div class="text-center mb-5">
<h2 class="section-title">자주 묻는 질문</h2>
@@ -351,7 +392,7 @@ else
}
<!-- 최종 CTA -->
<section class="py-5" style="background: linear-gradient(135deg, #2E5C4E 0%, #1F3A30 100%); color: white;">
<section class="py-5" style="background: linear-gradient(135deg, #1B4F8A 0%, #133970 100%); color: white;">
<div class="container text-center">
@if (season != null)
{
-4
View File
@@ -1,4 +0,0 @@
@page "/inquiry"
@{
Response.Redirect("/taxbaik/contact");
}
+8 -4
View File
@@ -54,7 +54,7 @@
<div class="row g-4">
<!-- 왼쪽: 세무 신고 현황 (Tax Filings) -->
<div class="col-lg-8">
<div class="card glass-card mb-4">
<div class="card border-0 shadow-sm rounded-3 mb-4">
<div class="card-body p-4">
<div class="d-flex justify-content-between align-items-center mb-4">
<h3 class="h5 fw-bold text-dark mb-0">
@@ -124,7 +124,7 @@
<!-- 오른쪽: 상담 이력 요약 (Consulting Activities) -->
<div class="col-lg-4">
<div class="card glass-card">
<div class="card border-0 shadow-sm rounded-3">
<div class="card-body p-4">
<h3 class="h5 fw-bold text-dark mb-4">
<i class="bi bi-chat-text text-primary me-2"></i> 최근 상담 및 지원 이력
@@ -139,10 +139,14 @@
}
else
{
<div class="timeline ps-2">
<div class="timeline">
@foreach (var activity in Model.Consultations)
{
<div class="timeline-item-modern">
<div class="border-start border-2 border-primary-subtle ps-3 pb-4 position-relative">
<!-- 타임라인 아이콘 -->
<div class="position-absolute start-0 translate-middle-x bg-primary rounded-circle"
style="width: 10px; height: 10px; margin-left: -1px; top: 6px;"></div>
<div class="d-flex justify-content-between align-items-center mb-1">
<span class="badge bg-primary-subtle text-primary small">@activity.ActivityType</span>
<small class="text-muted">@activity.ActivityDate.ToString("yyyy-MM-dd")</small>
+1 -39
View File
@@ -4,20 +4,7 @@
ViewData["Description"] = "사업자 세무, 부동산 세금, 종합소득세 등 전문 상담 서비스";
}
<!-- Breadcrumb Navigation -->
<nav aria-label="breadcrumb" class="py-3" style="background: #F9F7F3; border-bottom: 1px solid #D9D3C4;">
<div class="container">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="/taxbaik/" class="text-decoration-none">홈</a></li>
<li class="breadcrumb-item active">서비스</li>
</ol>
</div>
</nav>
<div class="container py-5">
<div class="mb-4">
<a href="/taxbaik/" class="btn btn-sm btn-outline-secondary">← 홈으로 돌아가기</a>
</div>
<h1 class="fw-bold mb-5 text-center">주요 서비스</h1>
<!-- 사업자 세무 -->
@@ -137,36 +124,11 @@
</section>
<!-- CTA -->
<section class="bg-primary text-white py-5 rounded mt-5 mb-5">
<section class="bg-primary text-white py-5 rounded mt-5">
<div class="text-center">
<h2 class="fw-bold mb-3">전문 상담받으세요</h2>
<p class="lead mb-4">정확한 진단 후 맞춤형 솔루션을 제시합니다</p>
<a href="/taxbaik/contact" class="btn btn-warning btn-lg">무료 상담 신청</a>
</div>
</section>
<!-- 관련 페이지 네비게이션 -->
<section class="text-center py-5">
<h4 class="fw-bold mb-4">다른 페이지 보기</h4>
<div class="row g-3 justify-content-center">
<div class="col-md-4">
<a href="/taxbaik/" class="btn btn-outline-primary btn-sm w-100 py-3">
🏠 홈<br/>
<small class="text-muted">최신 정보 및 블로그</small>
</a>
</div>
<div class="col-md-4">
<a href="/taxbaik/about" class="btn btn-outline-primary btn-sm w-100 py-3">
👤 세무사 소개<br/>
<small class="text-muted">자격 및 상담 철학</small>
</a>
</div>
<div class="col-md-4">
<a href="/taxbaik/blog" class="btn btn-outline-primary btn-sm w-100 py-3">
📝 세무 정보<br/>
<small class="text-muted">절세팁 및 신고 가이드</small>
</a>
</div>
</div>
</section>
</div>
+16 -32
View File
@@ -25,13 +25,11 @@
<!-- <meta name="google-site-verification" content="구글_서치콘솔_토큰_입력" /> -->
<meta name="robots" content="index, follow" />
<meta name="theme-color" content="#C89D6E" />
<link rel="icon" type="image/svg+xml" href="/taxbaik/favicon.svg" />
<link rel="alternate icon" href="/taxbaik/favicon.ico" />
<meta name="theme-color" content="#1B4F8A" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net" />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+KR:wght@400;500;700&family=Outfit:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap" rel="stylesheet" />
<link rel="canonical" href="@(ViewData["CanonicalUrl"] ?? "http://178.104.200.7/taxbaik/")" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
@@ -62,51 +60,37 @@
<main role="main" class="pb-5">
@RenderBody()
</main>
<footer class="bg-light border-top mt-5 py-5">
<footer class="bg-light border-top mt-5 py-4">
<div class="container">
<div class="row g-5">
<div class="col-md-3">
<h6 class="fw-bold mb-3">백원숙 세무회계</h6>
<div class="row g-4">
<div class="col-md-4">
<h6 class="fw-bold">백원숙 세무회계</h6>
<p class="small text-muted">
사업자 기장, 부동산 양도세·증여세,<br />
종합소득세 전문 상담
</p>
</div>
<div class="col-md-3">
<h6 class="fw-bold mb-3">메뉴</h6>
<ul class="list-unstyled small">
<li class="mb-2"><a href="/taxbaik/" class="text-decoration-none text-muted">홈</a></li>
<li class="mb-2"><a href="/taxbaik/about" class="text-decoration-none text-muted">세무사 소개</a></li>
<li class="mb-2"><a href="/taxbaik/services" class="text-decoration-none text-muted">전문 서비스</a></li>
<li class="mb-2"><a href="/taxbaik/blog" class="text-decoration-none text-muted">세무 정보</a></li>
<li><a href="/taxbaik/contact" class="text-decoration-none text-muted">상담 신청</a></li>
</ul>
</div>
<div class="col-md-3">
<h6 class="fw-bold mb-3">연락처</h6>
<div class="col-md-4">
<h6 class="fw-bold">연락처</h6>
<p class="small">
📞 <a href="tel:010-4122-8268" class="text-decoration-none text-muted">010-4122-8268</a><br />
📧 <a href="mailto:taxbaik5668@gmail.com" class="text-decoration-none text-muted">taxbaik5668@gmail.com</a>
📞 <a href="tel:010-4122-8268" class="text-decoration-none">010-4122-8268</a><br />
📧 <a href="mailto:taxbaik5668@gmail.com" class="text-decoration-none">taxbaik5668@gmail.com</a>
</p>
</div>
<div class="col-md-3">
<h6 class="fw-bold mb-3">채널</h6>
<div class="col-md-4">
<h6 class="fw-bold">채널</h6>
<p class="small">
<a href="http://pf.kakao.com/_xoxchTX" target="_blank" class="btn btn-sm btn-warning me-2">카카오톡</a>
<a href="https://www.instagram.com/taxtory5668/" target="_blank" class="btn btn-sm btn-outline-secondary">Instagram</a>
</p>
</div>
</div>
<hr class="my-4" />
<hr class="my-3" />
<div class="text-center small text-muted">
<p>© 2026 백원숙 세무회계. All rights reserved.</p>
<div class="mb-2">
<a href="/taxbaik/privacy" class="text-decoration-none text-muted me-2">개인정보처리방침</a>
<span class="text-muted">|</span>
<a href="/taxbaik/terms" class="text-decoration-none text-muted ms-2 me-2">이용약관</a>
<span class="text-muted">|</span>
<a href="/taxbaik/portal" class="text-decoration-none text-muted ms-2">고객 포털</a>
</div>
<a href="/taxbaik/privacy" class="text-decoration-none text-muted me-2">개인정보처리방침</a>
<a href="/taxbaik/terms" class="text-decoration-none text-muted">이용약관</a>
<a href="/taxbaik/portal" class="text-decoration-none text-muted ms-2">고객 포털</a>
@if (Context.RequestServices.GetService(typeof(VersionInfo)) is VersionInfo version)
{
<div class="mt-2 text-muted" style="font-size: 0.75rem; opacity: 0.6;">
+11 -31
View File
@@ -210,65 +210,59 @@ var apiBaseUrl = builder.Configuration["ApiClient:BaseUrl"]
builder.Services.AddHttpClient<IAdminDashboardClient, AdminDashboardClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
});
builder.Services.AddHttpClient<IInquiryBrowserClient, InquiryBrowserClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
});
builder.Services.AddHttpClient<IClientBrowserClient, ClientBrowserClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
});
builder.Services.AddHttpClient<ITaxFilingBrowserClient, TaxFilingBrowserClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
});
builder.Services.AddHttpClient<IFaqBrowserClient, FaqBrowserClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
});
builder.Services.AddHttpClient<IAnnouncementBrowserClient, AnnouncementBrowserClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
});
// Phase 5: Tax Accounting & CRM Browser Clients
builder.Services.AddHttpClient<ITaxProfileBrowserClient, TaxProfileBrowserClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
});
builder.Services.AddHttpClient<ITaxFilingScheduleBrowserClient, TaxFilingScheduleBrowserClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
});
builder.Services.AddHttpClient<IConsultingActivityBrowserClient, ConsultingActivityBrowserClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
});
builder.Services.AddHttpClient<IContractBrowserClient, ContractBrowserClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
});
builder.Services.AddHttpClient<IRevenueTrackingBrowserClient, RevenueTrackingBrowserClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
builder.Services.AddHttpClient<ICommonCodeBrowserClient, CommonCodeBrowserClient>(client =>
{
client.BaseAddress = new Uri(apiBaseUrl);
}).AddHttpMessageHandler<TokenRefreshHandler>();
});
// UI & 캐시 (MudBlazor Theme Customization)
builder.Services.AddMudServices(config =>
{
config.SnackbarConfiguration.HideTransitionDuration = 400;
config.SnackbarConfiguration.ShowTransitionDuration = 300;
config.PopoverOptions.ThrowOnDuplicateProvider = false;
});
builder.Services.AddMemoryCache();
builder.Services.AddResponseCompression(opts => {
@@ -315,20 +309,6 @@ app.UseForwardedHeaders(new ForwardedHeadersOptions
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});
app.Use(async (context, next) =>
{
var path = context.Request.Path.Value ?? string.Empty;
if (path.Equals("/favicon.ico", StringComparison.OrdinalIgnoreCase) ||
path.Equals("/taxbaik/favicon.ico", StringComparison.OrdinalIgnoreCase))
{
context.Response.ContentType = "image/svg+xml";
await context.Response.SendFileAsync(Path.Combine(app.Environment.WebRootPath ?? "wwwroot", "favicon.svg"));
return;
}
await next();
});
// Run migrations on startup (non-blocking for development)
try
{
@@ -1,7 +1,6 @@
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using Microsoft.AspNetCore.Components.Authorization;
using TaxBaik.Application.Services;
namespace TaxBaik.Web.Services;
@@ -9,18 +8,18 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
{
private readonly ILocalStorageService _localStorage;
private readonly ITokenStore _tokenStore;
private readonly IApiClient _apiClient;
private readonly AuthService _authService;
private readonly ILogger<CustomAuthenticationStateProvider> _logger;
public CustomAuthenticationStateProvider(
ILocalStorageService localStorage,
ITokenStore tokenStore,
IApiClient apiClient,
AuthService authService,
ILogger<CustomAuthenticationStateProvider> logger)
{
_localStorage = localStorage;
_tokenStore = tokenStore;
_apiClient = apiClient;
_authService = authService;
_logger = logger;
}
@@ -65,9 +64,8 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
if (!string.IsNullOrEmpty(_tokenStore.RefreshToken) && ShouldRefreshToken())
{
_logger.LogInformation("토큰 만료 5분 전 - 자동 갱신 시작");
var request = new { RefreshToken = _tokenStore.RefreshToken };
var newTokenPair = await _apiClient.PostAsync<WasmAuthTokenPair>("auth/refresh", request);
if (newTokenPair != null && !string.IsNullOrEmpty(newTokenPair.AccessToken))
var newTokenPair = await _authService.RefreshAccessTokenAsync(_tokenStore.RefreshToken);
if (newTokenPair != null)
{
await LoginAsync(newTokenPair.AccessToken, newTokenPair.RefreshToken, newTokenPair.ExpiresIn);
_logger.LogInformation("토큰 자동 갱신 성공");
@@ -81,7 +79,7 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
}
}
var principal = ValidateTokenWithoutDb(accessToken ?? string.Empty);
var principal = _authService.ValidateToken(accessToken);
if (principal == null)
{
await LogoutAsync();
@@ -97,22 +95,6 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
}
}
private ClaimsPrincipal? ValidateTokenWithoutDb(string token)
{
try
{
var handler = new JwtSecurityTokenHandler();
var jwtToken = handler.ReadJwtToken(token);
var identity = new ClaimsIdentity(jwtToken.Claims, "jwt");
return new ClaimsPrincipal(identity);
}
catch
{
return null;
}
}
public async Task LoginAsync(string accessToken, string refreshToken, int expiresIn)
{
var tokenExpiryTicks = DateTime.UtcNow.AddSeconds(expiresIn).Ticks;
@@ -133,13 +115,13 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
private bool ShouldRefreshToken()
{
// 토큰이 5분 이내로 만료되면 갱신 (300초 = 5분)
if (!_tokenStore.TokenExpiryTicks.HasValue || _tokenStore.TokenExpiryTicks.Value <= 0)
if (_tokenStore.TokenExpiryTicks <= 0)
return false;
const int refreshThresholdSeconds = 300;
try
{
var expiryTime = new DateTime(_tokenStore.TokenExpiryTicks.Value, DateTimeKind.Utc);
var expiryTime = new DateTime((long)_tokenStore.TokenExpiryTicks, DateTimeKind.Utc);
var timeUntilExpiry = expiryTime - DateTime.UtcNow;
return timeUntilExpiry.TotalSeconds <= refreshThresholdSeconds && timeUntilExpiry.TotalSeconds > 0;
}
@@ -176,17 +158,3 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
}
}
}
public class WasmAuthTokenPair
{
public WasmAuthTokenPair() { }
public WasmAuthTokenPair(string accessToken, string refreshToken, int expiresIn)
{
AccessToken = accessToken;
RefreshToken = refreshToken;
ExpiresIn = expiresIn;
}
public string AccessToken { get; set; } = "";
public string RefreshToken { get; set; } = "";
public int ExpiresIn { get; set; }
}
@@ -15,28 +15,17 @@ public class TelegramReportBackgroundService(
{
using var timer = new PeriodicTimer(TimeSpan.FromMinutes(30));
try
while (await timer.WaitForNextTickAsync(stoppingToken))
{
while (await timer.WaitForNextTickAsync(stoppingToken))
try
{
try
{
var now = TimeZoneInfo.ConvertTime(DateTimeOffset.UtcNow, KoreaTimeZone);
await TrySendReportsAsync(now, stoppingToken);
}
catch (OperationCanceledException) when (stoppingToken.IsCancellationRequested)
{
break;
}
catch (Exception ex)
{
logger.LogError(ex, "Telegram report background loop failed");
}
var now = TimeZoneInfo.ConvertTime(DateTimeOffset.UtcNow, KoreaTimeZone);
await TrySendReportsAsync(now, stoppingToken);
}
catch (Exception ex)
{
logger.LogError(ex, "Telegram report background loop failed");
}
}
catch (OperationCanceledException) when (stoppingToken.IsCancellationRequested)
{
// Normal shutdown path.
}
}
@@ -62,7 +62,7 @@ public class TokenRefreshHandler : DelegatingHandler
return response;
}
private async Task<WasmAuthTokenPair?> RefreshTokenAsync(string refreshToken, HttpRequestMessage originalRequest, CancellationToken ct)
private async Task<AuthTokenPair?> RefreshTokenAsync(string refreshToken, HttpRequestMessage originalRequest, CancellationToken ct)
{
try
{
@@ -87,7 +87,7 @@ public class TokenRefreshHandler : DelegatingHandler
new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
return result != null
? new WasmAuthTokenPair(result.AccessToken, result.RefreshToken, result.ExpiresIn)
? new AuthTokenPair(result.AccessToken, result.RefreshToken, result.ExpiresIn)
: null;
}
catch (Exception ex)
-1
View File
@@ -23,7 +23,6 @@
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Markdig" Version="0.38.0" />
</ItemGroup>
</Project>
+25 -108
View File
@@ -64,35 +64,35 @@
/* Spacing Scale */
--space-0: 0;
--space-1: 3px;
--space-2: 6px;
--space-3: 10px;
--space-4: 12px;
--space-5: 16px;
--space-6: 20px;
--space-7: 24px;
--space-8: 28px;
--space-10: 34px;
--space-12: 40px;
--space-16: 52px;
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--space-7: 28px;
--space-8: 32px;
--space-10: 40px;
--space-12: 48px;
--space-16: 64px;
/* Border Radius */
--radius-sm: 3px;
--radius-md: 6px;
--radius-lg: 8px;
--radius-xl: 12px;
--radius-sm: 4px;
--radius-md: 8px;
--radius-lg: 12px;
--radius-xl: 16px;
--radius-full: 9999px;
/* Typography Scale */
--font-family-base: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
--font-size-xs: 0.7rem;
--font-size-sm: 0.75rem;
--font-size-base: 0.82rem;
--font-size-lg: 0.95rem;
--font-size-xl: 1.1rem;
--font-size-2xl: 1.3rem;
--font-size-3xl: 1.6rem;
--font-size-4xl: 2rem;
--font-size-xs: 0.75rem;
--font-size-sm: 0.875rem;
--font-size-base: 1rem;
--font-size-lg: 1.125rem;
--font-size-xl: 1.25rem;
--font-size-2xl: 1.5rem;
--font-size-3xl: 1.875rem;
--font-size-4xl: 2.25rem;
--font-weight-regular: 400;
--font-weight-medium: 500;
@@ -445,12 +445,11 @@ textarea:focus-visible {
display: flex;
align-items: center;
gap: 12px;
padding: 0px 12px;
height: 38px !important;
padding: 6px 16px;
background-color: var(--bg-primary);
border-bottom: 1px solid var(--border-color);
z-index: var(--z-dropdown);
box-shadow: none !important;
box-shadow: var(--shadow-xs);
}
.admin-menu-button {
@@ -572,33 +571,6 @@ textarea:focus-visible {
color: var(--text-tertiary);
}
.admin-drawer-version {
margin-top: auto;
padding: var(--space-4);
border-top: 1px solid var(--border-color-light);
font-size: 0.72rem;
color: var(--text-tertiary);
line-height: 1.35;
}
.admin-drawer-version-label {
text-transform: uppercase;
letter-spacing: 0.08em;
margin-bottom: 4px;
color: var(--text-secondary);
font-weight: var(--font-weight-semibold);
}
.admin-drawer-version-value {
font-weight: var(--font-weight-semibold);
color: var(--text-primary);
}
.admin-drawer-version-built {
margin-top: 2px;
word-break: break-word;
}
.admin-main {
flex: 1;
overflow-y: auto;
@@ -1669,58 +1641,3 @@ textarea:focus-visible {
margin-right: -8px;
}
}
/* ============================================================================
더존 ERP 스타일 최적화 (Douzone ERP High-Density Desktop Style)
- 프레임워크 고유 레이아웃과 이벤트를 방해하는 와일드카드 및 강제 강하 스타일 제거
- MudBlazor 테마 설정을 기반으로 하며 레이아웃 및 서체 스택만 안전하게 제어
============================================================================ */
html, body {
background-color: #E2E8F0 !important;
color: #1E293B !important;
font-family: 'Malgun Gothic', '맑은 고딕', 'Segoe UI', sans-serif !important;
}
/* 어드민 드로워 및 탑바 테마 컬러 보완 */
.mud-drawer {
border-right: 1px solid #CBD5E1 !important;
}
.mud-drawer-header {
border-bottom: 1px solid #1E293B !important;
padding: 8px 12px !important;
}
.mud-nav-link {
font-size: 12px !important;
}
/* 데이터그리드 헤더 가시성 보완 */
.mud-table-head th {
background-color: #F1F5F9 !important;
font-weight: bold !important;
color: #0F172A !important;
}
/* 페이지 헤더 영역 */
.admin-page-hero {
padding: 12px 16px !important;
background-color: #F8FAFC !important;
border-bottom: 1px solid #E2E8F0 !important;
margin-bottom: 12px !important;
}
.admin-page-title {
font-size: 16px !important;
font-weight: bold !important;
}
.admin-page-subtitle {
font-size: 12px !important;
color: #64748B !important;
}
.admin-eyebrow {
display: none !important;
}
+121 -356
View File
@@ -1,18 +1,22 @@
/* TaxBaik — 워밍-프로페셔널 디자인 시스템 */
/* TaxBaik — Navy Blue 디자인 시스템 */
:root {
/* 워밍-프로페셔널 팔레트 */
--color-primary: #C89D6E; /* 따뜻한 골드/브론즈 */
--color-primary-dark: #A67C52; /* 진한 브론즈 */
--color-secondary: #2E5C4E; /* 따뜻한 초록 */
--color-secondary-dark: #1F3A30; /* 어두운 초록 */
--color-accent: #E8E4D8; /* 따뜻한 베이지 */
--color-accent-dark: #D9D3C4; /* 더 진한 베이지 */
--color-bg: #F9F7F3; /* 따뜻한 화이트 */
--color-bg-alt: #EFE9DD; /* 대체 배경 */
--color-text: #3D2817; /* 따뜻한 갈색 */
--color-text-light: #6B5D4F; /* 밝은 갈색 */
--color-border: #D9D3C4; /* 경계선 */
/* Navy Blue 팔레트 */
--color-primary: #1B4F8A; /* 네이비 */
--color-primary-dark: #133970; /* 진한 네이비 */
--color-primary-light: #2E5FA3; /* 밝은 네이비 */
--color-secondary: #2E5FA3; /* 보조 (밝은 네이비) */
--color-secondary-dark: #1B4F8A; /* 보조 진한 */
--color-accent: #E8F1F8; /* 연한 블루 배경 */
--color-accent-dark: #D8E2EE; /* 더 진한 연블루 */
--color-bg: #F7F9FC; /* 차가운 화이트 */
--color-bg-alt: #EAF1F8; /* 대체 배경 */
--color-text: #1A1A2E; /* 본문 텍스트 */
--color-text-light: #5A6A7A; /* 보조 텍스트 */
--color-border: #D8E2EE; /* 경계선 */
--color-cta: #E05A2B; /* 오렌지 CTA */
--color-cta-dark: #D45A1F; /* 진한 오렌지 */
--color-gold: #C9A227; /* 골드 액센트 */
--color-success: #2E7D32;
--color-warning: #F57C00;
--color-danger: #C62828;
@@ -30,10 +34,10 @@
--radius-lg: 12px;
--radius-xl: 16px;
--shadow-sm: 0 1px 3px rgba(61, 40, 23, 0.08);
--shadow-md: 0 4px 12px rgba(61, 40, 23, 0.12);
--shadow-lg: 0 8px 24px rgba(61, 40, 23, 0.15);
--shadow-xl: 0 12px 48px rgba(61, 40, 23, 0.18);
--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
--shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.15);
--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
--transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
@@ -52,10 +56,9 @@ html {
body {
color: var(--color-text);
background-color: var(--color-bg);
line-height: 1.8;
font-size: clamp(0.9rem, 2.5vw, 1rem);
letter-spacing: 0.3px;
background-color: #fff;
line-height: 1.75;
font-size: clamp(0.875rem, 2.5vw, 1rem);
}
/* ===== 타이포그래피 ===== */
@@ -64,12 +67,11 @@ h1, h2, h3, h4, h5, h6 {
line-height: 1.3;
color: var(--color-text);
margin-bottom: var(--spacing-lg);
letter-spacing: -0.5px;
}
h1 { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 4vw, 2rem); }
h1 { font-size: clamp(1.75rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3.5vw, 2rem); }
h4 { font-size: 1.35rem; }
h5 { font-size: 1.15rem; }
h6 { font-size: 1rem; }
@@ -77,17 +79,17 @@ h6 { font-size: 1rem; }
p {
margin-bottom: var(--spacing-md);
color: var(--color-text-light);
line-height: 1.85;
line-height: 1.8;
}
a {
color: var(--color-primary);
text-decoration: none;
transition: all var(--transition-fast);
transition: color var(--transition-fast);
}
a:hover {
color: var(--color-secondary);
color: var(--color-primary-dark);
text-decoration: none;
}
@@ -95,12 +97,11 @@ a:hover {
.btn {
border-radius: var(--radius-md);
font-weight: 600;
transition: all var(--transition-normal);
transition: all var(--transition-fast);
cursor: pointer;
border: none;
padding: 0.75rem 2rem;
font-size: 1rem;
letter-spacing: 0.3px;
display: inline-block;
text-align: center;
text-decoration: none;
@@ -111,27 +112,29 @@ a:hover {
}
.btn-primary {
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
background-color: var(--color-primary);
border-color: var(--color-primary);
color: white;
box-shadow: var(--shadow-md);
}
.btn-primary:hover {
background: linear-gradient(135deg, var(--color-primary-dark) 0%, #8B5E3C 100%);
box-shadow: var(--shadow-lg);
transform: translateY(-2px);
background-color: var(--color-primary-dark);
border-color: var(--color-primary-dark);
color: white;
box-shadow: 0 4px 12px rgba(27, 79, 138, 0.25);
}
.btn-warning {
background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
background-color: var(--color-cta);
border-color: var(--color-cta);
color: white;
box-shadow: var(--shadow-md);
}
.btn-warning:hover {
background: linear-gradient(135deg, var(--color-secondary-dark) 0%, #0D1E1A 100%);
box-shadow: var(--shadow-lg);
transform: translateY(-2px);
background-color: var(--color-cta-dark);
border-color: var(--color-cta-dark);
color: white;
box-shadow: 0 4px 12px rgba(224, 90, 43, 0.25);
}
.btn-outline-primary {
@@ -158,7 +161,7 @@ a:hover {
/* ===== 카드 ===== */
.card {
border: 1px solid var(--color-border);
border-radius: var(--radius-xl);
border-radius: var(--radius-lg);
transition: all var(--transition-normal);
box-shadow: var(--shadow-sm);
background: white;
@@ -166,7 +169,7 @@ a:hover {
}
.card:hover {
transform: translateY(-6px);
transform: translateY(-4px);
box-shadow: var(--shadow-lg);
border-color: var(--color-primary);
}
@@ -176,8 +179,8 @@ a:hover {
}
.card-title {
font-weight: 700;
color: var(--color-text);
font-weight: 600;
color: var(--color-primary);
margin-bottom: var(--spacing-md);
font-size: 1.25rem;
}
@@ -189,39 +192,28 @@ a:hover {
/* ===== 히어로 섹션 ===== */
.hero-section {
padding: clamp(3rem, 20vh, 6rem) 0;
background: linear-gradient(135deg, var(--color-secondary) 0%, #1F3A30 100%);
padding: clamp(2rem, 15vh, 5rem) 0;
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
color: white;
position: relative;
overflow: hidden;
border-bottom: 4px solid var(--color-primary);
}
.hero-section::before {
content: '';
position: absolute;
top: -50%;
right: -10%;
width: 600px;
height: 600px;
background: rgba(200, 157, 110, 0.1);
border-radius: 50%;
}
.hero-section::after {
content: '';
position: absolute;
bottom: -30%;
left: -10%;
top: 0;
right: 0;
width: 500px;
height: 500px;
background: rgba(232, 228, 216, 0.05);
background: rgba(255, 255, 255, 0.05);
border-radius: 50%;
transform: translate(30%, -30%);
}
.hero-section h1 {
font-size: clamp(2rem, 8vw, 3.5rem);
font-weight: 800;
font-size: clamp(1.75rem, 6vw, 3rem);
font-weight: 700;
margin-bottom: var(--spacing-lg);
position: relative;
z-index: 1;
@@ -243,12 +235,12 @@ a:hover {
}
.bg-primary {
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
background-color: var(--color-primary) !important;
}
.section-title {
font-size: clamp(1.75rem, 5vw, 2.75rem);
font-weight: 800;
font-size: clamp(1.5rem, 4vw, 2.5rem);
font-weight: 700;
color: var(--color-text);
margin-bottom: var(--spacing-xl);
text-align: center;
@@ -264,11 +256,39 @@ a:hover {
display: block;
width: 60px;
height: 4px;
background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
background: var(--color-primary);
margin: var(--spacing-md) auto 0;
border-radius: 2px;
}
/* ===== 신뢰도 스트립 ===== */
.trust-strip {
background-color: var(--color-accent);
padding: var(--spacing-3xl) 0;
border-top: 1px solid var(--color-border);
border-bottom: 1px solid var(--color-border);
}
.trust-item {
text-align: center;
}
.trust-icon {
font-size: 3.5rem;
margin-bottom: var(--spacing-md);
display: block;
}
.trust-item h3 {
color: var(--color-text);
margin-bottom: var(--spacing-sm);
font-size: 1.35rem;
}
.trust-item p {
color: var(--color-text-light);
font-size: 0.95rem;
}
/* ===== 배지 ===== */
.badge {
@@ -277,11 +297,10 @@ a:hover {
font-size: 0.85rem;
font-weight: 600;
display: inline-block;
letter-spacing: 0.2px;
}
.bg-primary-badge {
background-color: rgba(200, 157, 110, 0.15);
background-color: rgba(27, 79, 138, 0.1);
color: var(--color-primary);
}
@@ -298,7 +317,7 @@ a:hover {
.form-control:focus, .form-select:focus {
border-color: var(--color-primary);
box-shadow: 0 0 0 3px rgba(200, 157, 110, 0.1);
box-shadow: 0 0 0 3px rgba(27, 79, 138, 0.1);
outline: none;
}
@@ -312,31 +331,28 @@ a:hover {
border-top: 2px solid var(--color-primary);
padding: var(--spacing-md);
z-index: 1000;
box-shadow: 0 -4px 12px rgba(61, 40, 23, 0.1);
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}
.btn-kakao-mobile {
display: block;
width: 100%;
padding: 0.85rem;
background: linear-gradient(135deg, #FFE812 0%, #FDD835 100%);
background: #FFE812;
color: #000;
text-decoration: none;
border-radius: var(--radius-md);
font-weight: 700;
font-weight: 600;
text-align: center;
border: none;
cursor: pointer;
font-size: 0.95rem;
transition: all var(--transition-fast);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
letter-spacing: 0.3px;
transition: background var(--transition-fast);
}
.btn-kakao-mobile:hover {
background: linear-gradient(135deg, #FDD835 0%, #FBC02D 100%);
background: #FDD835;
text-decoration: none;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
body.with-mobile-cta {
@@ -351,24 +367,26 @@ body.with-mobile-cta {
}
.navbar-brand {
font-weight: 800;
font-weight: 700;
color: var(--color-primary) !important;
font-size: 1.35rem;
letter-spacing: -0.5px;
font-size: 1.25rem;
}
.nav-link {
color: var(--color-text) !important;
font-weight: 600;
transition: all var(--transition-fast);
font-weight: 500;
transition: color var(--transition-fast);
margin: 0 var(--spacing-sm);
letter-spacing: 0.2px;
}
.nav-link:hover {
color: var(--color-primary) !important;
}
.nav-link.active {
color: var(--color-cta) !important;
}
/* ===== 반응형 ===== */
@media (max-width: 767.98px) {
h1 { font-size: 1.75rem; }
@@ -391,6 +409,10 @@ body.with-mobile-cta {
font-size: 0.95rem;
}
.trust-icon {
font-size: 2.5rem;
}
.container {
padding: 0 var(--spacing-md);
}
@@ -452,6 +474,10 @@ body.with-mobile-cta {
}
/* ===== 일반 유틸리티 ===== */
.text-primary {
color: var(--color-primary) !important;
}
.text-muted {
color: var(--color-text-light) !important;
}
@@ -490,7 +516,7 @@ img {
.service-card .card-title {
font-size: 1.4rem;
margin-bottom: 1rem;
color: var(--color-text);
color: var(--color-primary);
}
.service-card ul li {
@@ -506,20 +532,20 @@ img {
.blog-placeholder {
height: 180px;
background: linear-gradient(135deg, rgba(200, 157, 110, 0.1) 0%, rgba(46, 92, 78, 0.1) 100%);
background: rgba(27, 79, 138, 0.08);
display: flex;
align-items: center;
justify-content: center;
font-size: 4rem;
color: rgba(200, 157, 110, 0.3);
color: rgba(27, 79, 138, 0.3);
}
.blog-card:hover .blog-placeholder {
background: linear-gradient(135deg, rgba(200, 157, 110, 0.2) 0%, rgba(46, 92, 78, 0.2) 100%);
background: rgba(27, 79, 138, 0.14);
}
.bg-primary-badge {
background-color: rgba(200, 157, 110, 0.15) !important;
background-color: rgba(27, 79, 138, 0.1) !important;
color: var(--color-primary) !important;
}
@@ -549,7 +575,7 @@ img {
/* ===== 시즌 Hero ===== */
.hero-section--seasonal {
background: linear-gradient(135deg, #1F3A30 0%, #2E5C4E 60%, #3D7A68 100%);
background: linear-gradient(135deg, #133970 0%, #1B4F8A 60%, #2E5FA3 100%);
}
.bg-danger-badge {
background-color: rgba(198, 40, 40, 0.85) !important;
@@ -567,9 +593,8 @@ img {
height: 220px;
border-radius: 50%;
border: 4px solid rgba(255,255,255,0.25);
background: rgba(255,255,255,0.08);
background: rgba(255,255,255,0.1);
color: white;
backdrop-filter: blur(4px);
}
.deadline-label {
font-size: 0.85rem;
@@ -617,7 +642,7 @@ img {
}
.seasonal-blog-tag {
display: inline-block;
background: linear-gradient(135deg, #C62828 0%, #B71C1C 100%);
background: var(--color-cta);
color: white;
font-size: 0.82rem;
font-weight: 700;
@@ -691,7 +716,7 @@ img {
padding: 1.1rem 1.5rem;
}
.faq-question:not(.collapsed) {
color: var(--color-secondary);
color: var(--color-primary);
background: white;
box-shadow: none;
}
@@ -699,10 +724,10 @@ img {
filter: none;
}
.faq-question:focus {
box-shadow: 0 0 0 3px rgba(200, 157, 110, 0.2);
box-shadow: 0 0 0 3px rgba(27, 79, 138, 0.2);
}
.faq-answer {
background: #fdfcfa;
background: #F7F9FC;
color: var(--color-text-light);
line-height: 1.85;
padding: 1rem 1.5rem 1.25rem;
@@ -714,263 +739,3 @@ img {
.faq-answer ul li {
margin-bottom: 0.4rem;
}
/* ===== 프리미엄 고도화 & 마이크로 인터랙션 (2026-06-30) ===== */
/* 영어/숫자용 폰트 클래스 */
.font-numeric, .font-heading-en {
font-family: 'Outfit', 'Inter', 'Noto Sans KR', sans-serif;
}
/* 히어로 섹션 프리미엄 개편 (메쉬 그라데이션 및 CSS 애니메이션) */
.hero-section {
background: radial-gradient(circle at 10% 20%, rgba(46, 92, 78, 1) 0%, rgba(31, 58, 48, 1) 44%, rgba(13, 30, 26, 1) 100%) !important;
position: relative;
overflow: hidden;
}
.hero-section::before {
content: '';
position: absolute;
top: -30%;
right: -10%;
width: 600px;
height: 600px;
background: radial-gradient(circle, rgba(200, 157, 110, 0.25) 0%, rgba(200, 157, 110, 0) 70%);
border-radius: 50%;
animation: floatAnimation 8s ease-in-out infinite;
pointer-events: none;
}
.hero-section::after {
content: '';
position: absolute;
bottom: -20%;
left: -10%;
width: 500px;
height: 500px;
background: radial-gradient(circle, rgba(232, 228, 216, 0.15) 0%, rgba(232, 228, 216, 0) 70%);
border-radius: 50%;
animation: floatAnimation2 12s ease-in-out infinite alternate;
pointer-events: none;
}
@keyframes floatAnimation {
0% { transform: translateY(0px) scale(1); }
50% { transform: translateY(-30px) scale(1.05); }
100% { transform: translateY(0px) scale(1); }
}
@keyframes floatAnimation2 {
0% { transform: translateX(0px) rotate(0deg); }
50% { transform: translateX(20px) translateY(15px) rotate(10deg); }
100% { transform: translateX(0px) rotate(0deg); }
}
/* 서비스 카드 고도화 */
.service-card {
border: 1px solid rgba(217, 211, 196, 0.6) !important;
box-shadow: 0 10px 25px rgba(61, 40, 23, 0.03) !important;
transition: all var(--transition-normal) !important;
}
.service-card:hover {
transform: translateY(-8px) !important;
box-shadow: 0 20px 40px rgba(61, 40, 23, 0.1) !important;
border-color: var(--color-primary) !important;
}
.service-card--featured {
background: linear-gradient(180deg, #FFFFFF 0%, #FAF8F5 100%) !important;
border-left: 4px solid var(--color-primary) !important;
}
/* 글래스모피즘 포털 클래스 (Glassmorphism Portal Classes) */
.glass-card {
background: rgba(255, 255, 255, 0.7) !important;
backdrop-filter: blur(12px) saturate(180%) !important;
-webkit-backdrop-filter: blur(12px) saturate(180%) !important;
border: 1px solid rgba(255, 255, 255, 0.4) !important;
box-shadow: 0 8px 32px 0 rgba(61, 40, 23, 0.05) !important;
border-radius: var(--radius-lg);
transition: all var(--transition-normal);
}
.glass-card:hover {
background: rgba(255, 255, 255, 0.8) !important;
box-shadow: 0 8px 32px 0 rgba(61, 40, 23, 0.08) !important;
}
.portal-welcome-strip {
background: linear-gradient(135deg, var(--color-secondary-dark) 0%, #152A22 100%);
border-radius: var(--radius-lg);
color: white;
padding: 2.5rem;
box-shadow: var(--shadow-lg);
border-bottom: 3px solid var(--color-primary);
}
/* 타임라인 컴포넌트 뷰티화 */
.timeline-item-modern {
border-left: 2px solid rgba(200, 157, 110, 0.4);
position: relative;
padding-left: 1.5rem;
padding-bottom: 2rem;
}
.timeline-item-modern::after {
content: '';
position: absolute;
width: 12px;
height: 12px;
border-radius: 50%;
background: var(--color-primary);
left: -7px;
top: 6px;
box-shadow: 0 0 0 4px rgba(200, 157, 110, 0.25);
transition: all var(--transition-fast);
}
.timeline-item-modern:hover::after {
background: var(--color-secondary);
box-shadow: 0 0 0 6px rgba(46, 92, 78, 0.3);
transform: scale(1.1);
}
/* ===== 마크다운 스타일 ===== */
.markdown-body {
font-size: 1rem;
line-height: 1.8;
color: var(--color-text);
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
font-weight: 700;
margin-top: 1.5rem;
margin-bottom: 1rem;
color: var(--color-text);
}
.markdown-body h1 {
font-size: 1.8rem;
border-bottom: 2px solid var(--color-primary);
padding-bottom: 0.5rem;
}
.markdown-body h2 {
font-size: 1.5rem;
border-bottom: 1px solid var(--color-border);
padding-bottom: 0.3rem;
}
.markdown-body h3 {
font-size: 1.25rem;
}
.markdown-body h4 {
font-size: 1.1rem;
}
.markdown-body p {
margin-bottom: 1rem;
}
.markdown-body strong {
font-weight: 700;
color: var(--color-primary-dark);
}
.markdown-body em {
font-style: italic;
color: var(--color-text-light);
}
.markdown-body code {
background: var(--color-bg-alt);
border: 1px solid var(--color-border);
border-radius: var(--radius-sm);
padding: 0.15rem 0.4rem;
font-family: 'Courier New', monospace;
font-size: 0.9rem;
color: #d63384;
}
.markdown-body pre {
background: var(--color-text);
color: #f8f8f8;
padding: 1rem;
border-radius: var(--radius-lg);
overflow-x: auto;
margin-bottom: 1rem;
line-height: 1.4;
}
.markdown-body pre code {
background: none;
border: none;
padding: 0;
color: inherit;
font-size: 0.9rem;
}
.markdown-body ul,
.markdown-body ol {
margin-bottom: 1rem;
margin-left: 2rem;
}
.markdown-body li {
margin-bottom: 0.5rem;
}
.markdown-body blockquote {
border-left: 4px solid var(--color-primary);
padding-left: 1rem;
margin: 1rem 0;
color: var(--color-text-light);
font-style: italic;
}
.markdown-body table {
border-collapse: collapse;
width: 100%;
margin-bottom: 1rem;
}
.markdown-body table th,
.markdown-body table td {
border: 1px solid var(--color-border);
padding: 0.75rem;
text-align: left;
}
.markdown-body table th {
background: var(--color-bg-alt);
font-weight: 700;
}
.markdown-body table tr:nth-child(even) {
background: var(--color-bg);
}
.markdown-body a {
color: var(--color-primary-dark);
text-decoration: none;
border-bottom: 1px solid var(--color-primary);
transition: color var(--transition-fast);
}
.markdown-body a:hover {
color: var(--color-primary);
}
.markdown-body hr {
border: none;
border-top: 1px solid var(--color-border);
margin: 2rem 0;
}
-12
View File
@@ -1,12 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="TaxBaik">
<defs>
<linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#1f3c88"/>
<stop offset="100%" stop-color="#d7a86e"/>
</linearGradient>
</defs>
<rect width="64" height="64" rx="16" fill="url(#g)"/>
<path d="M18 24h28v6H18zM22 32h20v6H22zM26 40h12v6H26z" fill="#fff" opacity="0.95"/>
<path d="M16 18h32v2H16z" fill="#ffffff" opacity="0.35"/>
<circle cx="46" cy="18" r="5" fill="#fff" opacity="0.9"/>
</svg>

Before

Width:  |  Height:  |  Size: 564 B

-109
View File
@@ -11,9 +11,6 @@ window.taxbaikAdminSession = {
clearAuthToken: function () {
try {
localStorage.removeItem('accessToken');
localStorage.removeItem('refreshToken');
localStorage.removeItem('tokenExpiry');
localStorage.removeItem('auth_token');
} catch {
// Ignore storage errors; redirect still recovers the session.
@@ -21,11 +18,6 @@ window.taxbaikAdminSession = {
},
showLoading: function () {
if (document.documentElement.classList.contains('admin-login-route')) {
window.taxbaikAdminSession.hideLoading();
return;
}
const overlay = document.getElementById('blazor-loading');
if (!overlay) return;
@@ -89,10 +81,6 @@ window.taxbaikAdminSession = {
window.taxbaikAdminSession.syncRouteClass();
window.addEventListener('popstate', window.taxbaikAdminSession.syncRouteClass);
if (document.documentElement.classList.contains('admin-login-route')) {
window.taxbaikAdminSession.hideLoading();
}
// Show loading on initial page load — overlay has 'show' from HTML,
// but we still need to set up the observer to detect when to hide it.
window.taxbaikAdminSession.showLoading();
@@ -110,102 +98,5 @@ window.taxbaikAdminSession = {
new MutationObserver(reloadOnRejectedCircuit)
.observe(modal, { attributes: true, attributeFilter: ['class'] });
},
bindLoginForm: function () {
const form = document.getElementById('admin-login-form');
if (!form || form.dataset.bound === '1') return;
form.dataset.bound = '1';
form.addEventListener('submit', async function (event) {
event.preventDefault();
const username = form.querySelector('input[placeholder="사용자명"]')?.value?.trim() || '';
const password = form.querySelector('input[placeholder="비밀번호"]')?.value || '';
const rememberMe = form.querySelector('input[type="checkbox"]')?.checked || false;
const existing = form.parentElement.querySelector('.login-error-message');
const submitButton = form.querySelector('button[type="submit"]');
if (existing) existing.remove();
if (submitButton) submitButton.disabled = true;
try {
const response = await fetch('/taxbaik/api/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ username, password })
});
if (!response.ok) {
throw new Error('login failed');
}
const data = await response.json();
if (!data?.accessToken || !data?.refreshToken) {
throw new Error('invalid response');
}
localStorage.setItem('accessToken', data.accessToken);
localStorage.setItem('refreshToken', data.refreshToken);
localStorage.setItem('tokenExpiry', String(Date.now() + (data.expiresIn || 3600) * 1000));
if (rememberMe) {
localStorage.setItem('admin-remembered-username', username);
} else {
localStorage.removeItem('admin-remembered-username');
}
window.location.href = '/taxbaik/admin/dashboard';
} catch {
const error = document.createElement('div');
error.className = 'mud-alert mud-alert-filled-error login-error-message mb-4';
error.textContent = '로그인 중 오류가 발생했습니다.';
form.parentElement.insertBefore(error, form);
} finally {
if (submitButton) submitButton.disabled = false;
}
});
}
};
// 더존 ERP 스타일 엔터 키 포커스 이동 및 단축키 바인딩
document.addEventListener('keydown', function (e) {
if (e.key === 'Enter') {
const active = document.activeElement;
if (!active) return;
// 특정 영역(편집 폼 또는 다이얼로그) 내의 입력 필드만 포커스 이동 처리
const container = active.closest('.admin-editor-panel, .mud-form, .mud-dialog');
if (!container) return;
// textarea나 button, submit 타입 등은 기본 동작(줄바꿈/제출) 유지
if (active.tagName === 'TEXTAREA' ||
active.tagName === 'BUTTON' ||
active.getAttribute('type') === 'submit' ||
active.classList.contains('mud-button-root')) {
return;
}
e.preventDefault();
// 포커스 이동 가능한 모든 입력 요소 수집
const focusables = Array.from(container.querySelectorAll('input, select, textarea, button'))
.filter(el => {
const style = window.getComputedStyle(el);
return el.tabIndex >= 0 &&
!el.disabled &&
el.getAttribute('aria-disabled') !== 'true' &&
style.display !== 'none' &&
style.visibility !== 'hidden';
});
const index = focusables.indexOf(active);
if (index > -1 && index < focusables.length - 1) {
const nextEl = focusables[index + 1];
nextEl.focus();
if (typeof nextEl.select === 'function') {
nextEl.select();
}
}
}
});
+10 -10
View File
@@ -8,8 +8,8 @@
<style>
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif; }
body {
background: #F9F7F3;
color: #3D2817;
background: #F7F9FC;
color: #1A1A2E;
display: flex;
align-items: center;
justify-content: center;
@@ -23,12 +23,12 @@
background: #fff;
border-radius: 16px;
padding: 3rem 2.5rem;
box-shadow: 0 8px 32px rgba(61,40,23,.10);
box-shadow: 0 8px 32px rgba(0,0,0,.10);
}
.icon { font-size: 3.5rem; margin-bottom: 1.25rem; }
.badge {
display: inline-block;
background: #C89D6E;
background: #1B4F8A;
color: #fff;
font-size: 0.78rem;
font-weight: 700;
@@ -37,13 +37,13 @@
border-radius: 20px;
margin-bottom: 1.5rem;
}
h1 { font-size: 1.6rem; color: #2E5C4E; font-weight: 800; margin-bottom: 1rem; line-height: 1.35; }
p { color: #6B5D4F; line-height: 1.85; font-size: 0.95rem; }
.divider { border: none; border-top: 1px solid #EFE9DD; margin: 1.75rem 0; }
h1 { font-size: 1.6rem; color: #1B4F8A; font-weight: 800; margin-bottom: 1rem; line-height: 1.35; }
p { color: #5A6A7A; line-height: 1.85; font-size: 0.95rem; }
.divider { border: none; border-top: 1px solid #D8E2EE; margin: 1.75rem 0; }
.kakao-btn {
display: inline-block;
background: #FEE500;
color: #3D2817;
color: #1A1A2E;
text-decoration: none;
font-weight: 700;
padding: 0.65rem 1.5rem;
@@ -51,8 +51,8 @@
font-size: 0.95rem;
margin-top: 0.5rem;
}
.timer { font-size: 0.78rem; color: #A09080; margin-top: 1.5rem; }
.footer { font-size: 0.75rem; color: #C0ADA0; margin-top: 2rem; }
.timer { font-size: 0.78rem; color: #8A99A8; margin-top: 1.5rem; }
.footer { font-size: 0.75rem; color: #A8B5C2; margin-top: 2rem; }
</style>
</head>
<body>
+13 -13
View File
@@ -13,7 +13,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TaxBaik.Web", "TaxBaik.Web\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TaxBaik.Application.Tests", "TaxBaik.Application.Tests\TaxBaik.Application.Tests.csproj", "{47D1F07D-F11B-4343-A3C3-1872F0C46AE3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TaxBaik.Web.Client", "TaxBaik.Web.Client\TaxBaik.Web.Client.csproj", "{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TaxBaik.Web.Client", "TaxBaik.Web.Client\TaxBaik.Web.Client.csproj", "{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -85,18 +85,18 @@ Global
{47D1F07D-F11B-4343-A3C3-1872F0C46AE3}.Release|x64.Build.0 = Release|Any CPU
{47D1F07D-F11B-4343-A3C3-1872F0C46AE3}.Release|x86.ActiveCfg = Release|Any CPU
{47D1F07D-F11B-4343-A3C3-1872F0C46AE3}.Release|x86.Build.0 = Release|Any CPU
{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}.Debug|x64.ActiveCfg = Debug|Any CPU
{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}.Debug|x64.Build.0 = Debug|Any CPU
{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}.Debug|x86.ActiveCfg = Debug|Any CPU
{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}.Debug|x86.Build.0 = Debug|Any CPU
{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}.Release|Any CPU.Build.0 = Release|Any CPU
{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}.Release|x64.ActiveCfg = Release|Any CPU
{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}.Release|x64.Build.0 = Release|Any CPU
{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}.Release|x86.ActiveCfg = Release|Any CPU
{C46C51D4-9E87-47DF-AB76-2E794F64FD5F}.Release|x86.Build.0 = Release|Any CPU
{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}.Debug|x64.ActiveCfg = Debug|Any CPU
{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}.Debug|x64.Build.0 = Debug|Any CPU
{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}.Debug|x86.ActiveCfg = Debug|Any CPU
{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}.Debug|x86.Build.0 = Debug|Any CPU
{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}.Release|Any CPU.Build.0 = Release|Any CPU
{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}.Release|x64.ActiveCfg = Release|Any CPU
{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}.Release|x64.Build.0 = Release|Any CPU
{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}.Release|x86.ActiveCfg = Release|Any CPU
{F3DEFE23-E849-4BE6-9E18-C1AF1CDDC7EB}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
-1603
View File
File diff suppressed because it is too large Load Diff
-514
View File
@@ -1,514 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="./support.js"></script>
</head>
<body>
<x-dc>
<helmet>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Hahmlet:wght@600;700;900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pretendard@latest/dist/web/static/pretendard.css">
<style>
@keyframes fadeUp { from{opacity:0;transform:translateY(36px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:'Pretendard',-apple-system,BlinkMacSystemFont,sans-serif;background:#fafaf8;color:#1a2232;overflow-x:hidden;line-height:1.7}
::selection{background:rgba(201,168,76,0.22)}
a{text-decoration:none;color:inherit}
button{cursor:pointer;font-family:inherit;border:none;background:none}
@media(max-width:768px){
.nav-links{display:none!important}
.section-px{padding-left:24px!important;padding-right:24px!important}
}
</style>
</helmet>
<!-- ── NAV ── -->
<nav style="{{ navStyle }}">
<div style="{{ navLogoStyle }}">백원숙 세무사</div>
<div style="display:flex;gap:28px;align-items:center;" class="nav-links">
<a href="#about" style="{{ navLinkStyle }}" style-hover="color:#c9a84c;">소개</a>
<a href="#services" style="{{ navLinkStyle }}" style-hover="color:#c9a84c;">서비스</a>
<a href="#customers" style="{{ navLinkStyle }}" style-hover="color:#c9a84c;">고객유형</a>
<a href="#faq" style="{{ navLinkStyle }}" style-hover="color:#c9a84c;">FAQ</a>
<a href="#contact" style="background:#c9a84c;color:#0d2340;padding:10px 22px;border-radius:5px;font-size:0.875rem;font-weight:700;transition:filter 0.2s;" style-hover="filter:brightness(0.92);">상담 예약</a>
</div>
</nav>
<!-- ── HERO ── -->
<section style="min-height:100vh;background:#0d2340;display:flex;align-items:center;position:relative;overflow:hidden;">
<div style="position:absolute;top:-180px;right:-180px;width:760px;height:760px;border-radius:50%;border:1px solid rgba(201,168,76,0.12);pointer-events:none;"></div>
<div style="position:absolute;top:-80px;right:-80px;width:460px;height:460px;border-radius:50%;border:1px solid rgba(201,168,76,0.07);pointer-events:none;"></div>
<div style="position:absolute;bottom:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,rgba(201,168,76,0.25),transparent);"></div>
<div style="max-width:1200px;margin:0 auto;width:100%;padding:140px 60px 90px;" class="section-px">
<div style="animation:fadeIn 0.7s ease both;margin-bottom:18px;">
<span style="font-size:0.72rem;letter-spacing:0.22em;color:#c9a84c;font-weight:600;text-transform:uppercase;">공인 세무사 · 부동산중개사 · 보험설계사</span>
</div>
<h1 style="font-family:'Hahmlet',serif;font-size:clamp(2.4rem,5.5vw,5rem);font-weight:900;color:white;line-height:1.18;letter-spacing:-0.035em;margin-bottom:28px;animation:fadeUp 0.8s ease 0.08s both;">
사업의 숫자와<br>
가족의 자산을<br>
<span style="color:#c9a84c;">함께 지키는 세무사</span>
</h1>
<p style="font-size:clamp(0.95rem,1.8vw,1.1rem);color:rgba(255,255,255,0.65);max-width:540px;line-height:2;margin-bottom:44px;animation:fadeUp 0.8s ease 0.18s both;">
스마트스토어·프리랜서·개인사업자부터 부동산·가족자산까지 —<br>전국 어디서나 <strong style="color:rgba(255,255,255,0.9);font-weight:600;">비대면 온라인 상담</strong>으로 시작하세요.
</p>
<div style="display:flex;gap:14px;flex-wrap:wrap;animation:fadeUp 0.8s ease 0.28s both;">
<a href="https://pf.kakao.com/_xoxchTX" target="_blank" style="background:#FEE500;color:#3C1E1E;padding:16px 30px;border-radius:6px;font-weight:700;font-size:1rem;display:inline-flex;align-items:center;gap:8px;transition:filter 0.2s;" style-hover="filter:brightness(0.95);">💬 카카오로 상담하기</a>
<a href="tel:010-4122-8268" style="background:rgba(255,255,255,0.08);color:white;padding:16px 30px;border-radius:6px;font-weight:500;font-size:1rem;border:1px solid rgba(255,255,255,0.2);transition:background 0.2s;" style-hover="background:rgba(255,255,255,0.14);">📞 010-4122-8268</a>
</div>
<div style="display:flex;gap:28px;margin-top:60px;animation:fadeUp 0.8s ease 0.38s both;flex-wrap:wrap;padding-top:32px;border-top:1px solid rgba(255,255,255,0.08);">
<div style="display:flex;align-items:center;gap:9px;"><div style="width:5px;height:5px;border-radius:50%;background:#c9a84c;flex-shrink:0;"></div><span style="color:rgba(255,255,255,0.45);font-size:0.8rem;font-weight:300;">세무사 자격 (2015)</span></div>
<div style="display:flex;align-items:center;gap:9px;"><div style="width:5px;height:5px;border-radius:50%;background:#c9a84c;flex-shrink:0;"></div><span style="color:rgba(255,255,255,0.45);font-size:0.8rem;font-weight:300;">공인 부동산중개사</span></div>
<div style="display:flex;align-items:center;gap:9px;"><div style="width:5px;height:5px;border-radius:50%;background:#c9a84c;flex-shrink:0;"></div><span style="color:rgba(255,255,255,0.45);font-size:0.8rem;font-weight:300;">보험설계사 자격</span></div>
<div style="display:flex;align-items:center;gap:9px;"><div style="width:5px;height:5px;border-radius:50%;background:#c9a84c;flex-shrink:0;"></div><span style="color:rgba(255,255,255,0.45);font-size:0.8rem;font-weight:300;">전국 비대면 온라인 상담</span></div>
</div>
</div>
</section>
<!-- ── ONLINE TRUST BAR ── -->
<div style="background:#1a3a5c;padding:20px 60px;" class="section-px">
<div style="max-width:1200px;margin:0 auto;display:flex;align-items:center;justify-content:center;gap:48px;flex-wrap:wrap;">
<div style="display:flex;align-items:center;gap:10px;">
<span style="font-size:1.1rem;">💻</span>
<span style="font-size:0.85rem;color:rgba(255,255,255,0.85);font-weight:500;">전국 비대면 온라인 상담</span>
</div>
<div style="width:1px;height:18px;background:rgba(255,255,255,0.15);"></div>
<div style="display:flex;align-items:center;gap:10px;">
<span style="font-size:1.1rem;">💬</span>
<span style="font-size:0.85rem;color:rgba(255,255,255,0.85);font-weight:500;">카카오 당일 응답</span>
</div>
<div style="width:1px;height:18px;background:rgba(255,255,255,0.15);"></div>
<div style="display:flex;align-items:center;gap:10px;">
<span style="font-size:1.1rem;">📂</span>
<span style="font-size:0.85rem;color:rgba(255,255,255,0.85);font-weight:500;">자료 공유 후 온라인 검토</span>
</div>
<div style="width:1px;height:18px;background:rgba(255,255,255,0.15);"></div>
<div style="display:flex;align-items:center;gap:10px;">
<span style="font-size:1.1rem;"></span>
<span style="font-size:0.85rem;color:rgba(255,255,255,0.85);font-weight:500;">방문 없이 신고·기장 가능</span>
</div>
</div>
</div>
<!-- ── ABOUT ── -->
<section id="about" style="padding:100px 60px;background:white;" class="section-px">
<div style="max-width:1200px;margin:0 auto;">
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:60px;align-items:start;">
<div style="background:#0d2340;border-radius:20px;padding:52px 44px;">
<div style="font-size:0.72rem;letter-spacing:0.18em;color:#c9a84c;font-weight:600;margin-bottom:20px;text-transform:uppercase;">About</div>
<h2 style="font-family:'Hahmlet',serif;font-size:1.9rem;font-weight:700;color:white;line-height:1.35;margin-bottom:24px;">안녕하세요.<br>백원숙 세무사입니다.</h2>
<p style="color:rgba(255,255,255,0.7);line-height:1.95;font-size:0.9rem;margin-bottom:18px;">세무사 자격과 함께 부동산중개사, 보험설계사 자격을 보유하고 있습니다. 사업자 세무, 종합소득세, 부가가치세, 양도세, 증여·상속 상담을 중심으로 운영합니다.</p>
<p style="color:rgba(255,255,255,0.7);line-height:1.95;font-size:0.9rem;">저도 집을 사업장으로 등록하고 작게 시작해 본 사람입니다. 처음 사업을 시작하는 대표님의 막막함을 직접 압니다.</p>
<div style="margin-top:36px;padding-top:28px;border-top:1px solid rgba(255,255,255,0.1);display:flex;gap:36px;">
<div>
<div style="font-size:0.76rem;color:rgba(255,255,255,0.38);margin-bottom:6px;">세무사 자격 취득</div>
<div style="font-size:1.2rem;font-family:'Hahmlet',serif;font-weight:700;color:#c9a84c;">2015년</div>
</div>
<div>
<div style="font-size:0.76rem;color:rgba(255,255,255,0.38);margin-bottom:6px;">활동 지역</div>
<div style="font-size:1.2rem;font-family:'Hahmlet',serif;font-weight:700;color:#c9a84c;">성북구</div>
</div>
</div>
</div>
<div>
<div style="font-size:0.72rem;letter-spacing:0.18em;color:#c9a84c;font-weight:600;margin-bottom:16px;text-transform:uppercase;">Expertise</div>
<h2 style="font-family:'Hahmlet',serif;font-size:2rem;font-weight:700;color:#0d2340;margin-bottom:36px;line-height:1.3;">세 가지 자격의<br>시너지</h2>
<div style="display:flex;flex-direction:column;gap:16px;">
<div style="display:flex;gap:18px;padding:24px;border:1.5px solid #ede9e0;border-radius:14px;transition:border-color 0.2s;" style-hover="border-color:#c9a84c;background:#fffdf7;">
<div style="width:48px;height:48px;background:#f5f3ee;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1.4rem;flex-shrink:0;">⚖️</div>
<div>
<div style="font-weight:700;font-size:0.975rem;color:#0d2340;margin-bottom:5px;">공인 세무사</div>
<div style="font-size:0.845rem;color:#6b7e8f;line-height:1.75;">세무신고·장부관리·조세 자문 등 세무 업무 전반을 공식 대리합니다.</div>
</div>
</div>
<div style="display:flex;gap:18px;padding:24px;border:1.5px solid #ede9e0;border-radius:14px;transition:border-color 0.2s;" style-hover="border-color:#c9a84c;background:#fffdf7;">
<div style="width:48px;height:48px;background:#f5f3ee;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1.4rem;flex-shrink:0;">🏠</div>
<div>
<div style="font-weight:700;font-size:0.975rem;color:#0d2340;margin-bottom:5px;">공인 부동산중개사</div>
<div style="font-size:0.845rem;color:#6b7e8f;line-height:1.75;">부동산 거래 구조를 이해해 양도·증여·임대 세무상담에 현실감을 더합니다.</div>
</div>
</div>
<div style="display:flex;gap:18px;padding:24px;border:1.5px solid #ede9e0;border-radius:14px;transition:border-color 0.2s;" style-hover="border-color:#c9a84c;background:#fffdf7;">
<div style="width:48px;height:48px;background:#f5f3ee;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1.4rem;flex-shrink:0;">🛡️</div>
<div>
<div style="font-weight:700;font-size:0.975rem;color:#0d2340;margin-bottom:5px;">보험설계사 자격</div>
<div style="font-size:0.845rem;color:#6b7e8f;line-height:1.75;">상속·증여·대표자 리스크 관점에서 가족 현금흐름과 보험 구조를 함께 설명합니다.</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- ── SERVICES ── -->
<section id="services" style="padding:100px 60px;background:#f2f5f9;" class="section-px">
<div style="max-width:1200px;margin:0 auto;">
<div style="text-align:center;margin-bottom:64px;">
<div style="font-size:0.72rem;letter-spacing:0.18em;color:#c9a84c;font-weight:600;margin-bottom:14px;text-transform:uppercase;">Services</div>
<h2 style="font-family:'Hahmlet',serif;font-size:2.2rem;font-weight:700;color:#0d2340;margin-bottom:14px;">주요 서비스</h2>
<p style="color:#6b7e8f;font-size:0.925rem;max-width:460px;margin:0 auto;">신고만 하는 세무가 아니라, 사업과 자산의 흐름을 함께 봅니다.</p>
</div>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:22px;">
<div style="background:white;border-radius:14px;padding:32px;box-shadow:0 2px 16px rgba(13,35,64,0.06);transition:transform 0.25s ease,box-shadow 0.25s ease;" style-hover="transform:translateY(-5px);box-shadow:0 20px 48px rgba(13,35,64,0.13);">
<div style="width:48px;height:48px;background:#edf2f7;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1.4rem;margin-bottom:20px;">📊</div>
<div style="font-size:0.68rem;letter-spacing:0.14em;color:#c9a84c;font-weight:600;margin-bottom:8px;text-transform:uppercase;">기장 서비스</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.15rem;font-weight:700;color:#0d2340;margin-bottom:12px;">월 기장 관리</h3>
<p style="color:#6b7e8f;font-size:0.855rem;line-height:1.85;">장부 작성, 부가세, 원천세, 인건비, 예상세액까지 — 매월 세금 리스크를 함께 점검합니다.</p>
<div style="margin-top:22px;padding-top:18px;border-top:1px solid #eef0f3;font-size:0.775rem;color:#9db0bc;">대상: 매출 발생 사업자</div>
</div>
<div style="background:white;border-radius:14px;padding:32px;box-shadow:0 2px 16px rgba(13,35,64,0.06);transition:transform 0.25s ease,box-shadow 0.25s ease;" style-hover="transform:translateY(-5px);box-shadow:0 20px 48px rgba(13,35,64,0.13);">
<div style="width:48px;height:48px;background:#edf2f7;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1.4rem;margin-bottom:20px;">📋</div>
<div style="font-size:0.68rem;letter-spacing:0.14em;color:#c9a84c;font-weight:600;margin-bottom:8px;text-transform:uppercase;">소득세</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.15rem;font-weight:700;color:#0d2340;margin-bottom:12px;">종합소득세 신고</h3>
<p style="color:#6b7e8f;font-size:0.855rem;line-height:1.85;">사업자, 프리랜서, 보험설계사, 부동산중개사의 소득 유형에 맞는 경비처리와 신고를 안내합니다.</p>
<div style="margin-top:22px;padding-top:18px;border-top:1px solid #eef0f3;font-size:0.775rem;color:#9db0bc;">대상: 개인사업자·프리랜서·영업직</div>
</div>
<div style="background:white;border-radius:14px;padding:32px;box-shadow:0 2px 16px rgba(13,35,64,0.06);transition:transform 0.25s ease,box-shadow 0.25s ease;" style-hover="transform:translateY(-5px);box-shadow:0 20px 48px rgba(13,35,64,0.13);">
<div style="width:48px;height:48px;background:#fdf8ec;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1.4rem;margin-bottom:20px;">🏡</div>
<div style="font-size:0.68rem;letter-spacing:0.14em;color:#c9a84c;font-weight:600;margin-bottom:8px;text-transform:uppercase;">부동산 세무</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.15rem;font-weight:700;color:#0d2340;margin-bottom:12px;">양도세 사전진단</h3>
<p style="color:#6b7e8f;font-size:0.855rem;line-height:1.85;">계약 전 보유기간·비과세 여부·필요경비·장기보유특별공제를 검토합니다. 계약 전 상담이 선택지를 넓힙니다.</p>
<div style="margin-top:22px;padding-top:18px;border-top:1px solid #eef0f3;font-size:0.775rem;color:#9db0bc;">대상: 부동산 매도 예정자</div>
</div>
<div style="background:white;border-radius:14px;padding:32px;box-shadow:0 2px 16px rgba(13,35,64,0.06);transition:transform 0.25s ease,box-shadow 0.25s ease;" style-hover="transform:translateY(-5px);box-shadow:0 20px 48px rgba(13,35,64,0.13);">
<div style="width:48px;height:48px;background:#fdf8ec;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1.4rem;margin-bottom:20px;">👨‍👩‍👧</div>
<div style="font-size:0.68rem;letter-spacing:0.14em;color:#c9a84c;font-weight:600;margin-bottom:8px;text-transform:uppercase;">자산이전</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.15rem;font-weight:700;color:#0d2340;margin-bottom:12px;">증여·상속 상담</h3>
<p style="color:#6b7e8f;font-size:0.855rem;line-height:1.85;">증여 시기, 증여재산 평가, 세부담, 자금출처, 보험 활용 가능성까지 — 가족 자산이전을 사전에 설계합니다.</p>
<div style="margin-top:22px;padding-top:18px;border-top:1px solid #eef0f3;font-size:0.775rem;color:#9db0bc;">대상: 자산이전 예정 가족</div>
</div>
<div style="background:white;border-radius:14px;padding:32px;box-shadow:0 2px 16px rgba(13,35,64,0.06);transition:transform 0.25s ease,box-shadow 0.25s ease;" style-hover="transform:translateY(-5px);box-shadow:0 20px 48px rgba(13,35,64,0.13);">
<div style="width:48px;height:48px;background:#edf2f7;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1.4rem;margin-bottom:20px;">🌱</div>
<div style="font-size:0.68rem;letter-spacing:0.14em;color:#c9a84c;font-weight:600;margin-bottom:8px;text-transform:uppercase;">첫 세무</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.15rem;font-weight:700;color:#0d2340;margin-bottom:12px;">신규 사업자 세무정리</h3>
<p style="color:#6b7e8f;font-size:0.855rem;line-height:1.85;">사업자 유형 확인, 부가세·종소세·증빙관리·세금계좌 분리까지. 처음 사업을 시작하는 대표님을 위한 패키지.</p>
<div style="margin-top:22px;padding-top:18px;border-top:1px solid #eef0f3;font-size:0.775rem;color:#9db0bc;">대상: 신규 사업자·프리랜서</div>
</div>
<div style="background:#0d2340;border-radius:14px;padding:32px;display:flex;flex-direction:column;justify-content:space-between;">
<div>
<div style="font-size:0.68rem;letter-spacing:0.14em;color:#c9a84c;font-weight:600;margin-bottom:16px;text-transform:uppercase;">상담 안내</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.25rem;font-weight:700;color:white;line-height:1.45;margin-bottom:16px;">어떤 세금이<br>걱정이신가요?</h3>
<p style="color:rgba(255,255,255,0.6);font-size:0.84rem;line-height:1.85;">세금은 계약·매출·명의·자금 이동 전에 검토할수록 선택지가 많습니다.</p>
</div>
<a href="https://pf.kakao.com/_xoxchTX" target="_blank" style="display:block;margin-top:28px;background:#c9a84c;color:#0d2340;padding:14px;border-radius:8px;text-align:center;font-weight:700;font-size:0.875rem;transition:filter 0.2s;" style-hover="filter:brightness(1.08);">카카오로 문의하기 →</a>
</div>
</div>
</div>
</section>
<!-- ── CUSTOMER TYPES ── -->
<section id="customers" style="padding:100px 60px;background:#1a3a5c;" class="section-px">
<div style="max-width:1200px;margin:0 auto;">
<div style="text-align:center;margin-bottom:64px;">
<div style="font-size:0.72rem;letter-spacing:0.18em;color:#c9a84c;font-weight:600;margin-bottom:14px;text-transform:uppercase;">Who We Help</div>
<h2 style="font-family:'Hahmlet',serif;font-size:2.2rem;font-weight:700;color:white;margin-bottom:14px;">전국 어디서나, 온라인으로 시작하세요</h2>
<p style="color:rgba(255,255,255,0.52);font-size:0.925rem;">방문 없이 카카오·이메일로 상담부터 신고까지 — 온라인 사업자에게 최적화된 세무관리.</p>
</div>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:22px;">
<div style="background:rgba(201,168,76,0.12);border:1px solid rgba(201,168,76,0.35);border-radius:18px;padding:38px;transition:background 0.2s;" style-hover="background:rgba(201,168,76,0.18);">
<div style="display:flex;align-items:center;gap:10px;margin-bottom:16px;">
<span style="font-size:1.8rem;">💻</span>
<span style="background:#c9a84c;color:#0d2340;font-size:0.65rem;font-weight:700;padding:3px 10px;border-radius:20px;letter-spacing:0.08em;">핵심 타깃</span>
</div>
<div style="font-size:0.68rem;letter-spacing:0.14em;color:#c9a84c;font-weight:600;margin-bottom:10px;text-transform:uppercase;">1순위 · 온라인 사업자</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.2rem;font-weight:700;color:white;margin-bottom:14px;">스마트스토어 · 크리에이터 · 프리랜서</h3>
<p style="color:rgba(255,255,255,0.75);font-size:0.855rem;line-height:1.85;margin-bottom:20px;">스마트스토어·쿠팡마켓·유튜버·인스타셀러·크몽 프리랜서 — 플랫폼 정산 구조와 부가세·종소세 경비처리를 체계적으로 관리합니다. 전국 어디서나 비대면 상담 가능합니다.</p>
<div style="display:flex;flex-wrap:wrap;gap:7px;">
<span style="background:rgba(201,168,76,0.28);color:#e0c87a;padding:4px 12px;border-radius:20px;font-size:0.745rem;">스마트스토어</span>
<span style="background:rgba(201,168,76,0.28);color:#e0c87a;padding:4px 12px;border-radius:20px;font-size:0.745rem;">크리에이터</span>
<span style="background:rgba(201,168,76,0.28);color:#e0c87a;padding:4px 12px;border-radius:20px;font-size:0.745rem;">비대면 상담</span>
</div>
</div>
<div style="background:rgba(255,255,255,0.07);border:1px solid rgba(255,255,255,0.1);border-radius:18px;padding:38px;transition:background 0.2s;" style-hover="background:rgba(255,255,255,0.12);">
<div style="font-size:1.8rem;margin-bottom:16px;">💼</div>
<div style="font-size:0.68rem;letter-spacing:0.14em;color:#c9a84c;font-weight:600;margin-bottom:10px;text-transform:uppercase;">2순위 · 영업직·독립사업자</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.2rem;font-weight:700;color:white;margin-bottom:14px;">보험설계사·부동산중개사·영업직</h3>
<p style="color:rgba(255,255,255,0.62);font-size:0.855rem;line-height:1.85;margin-bottom:20px;">소득 변동이 크고 경비처리 기준이 애매한 분들. 업계 구조를 직접 경험한 세무사로서 종소세·경비처리·세금 예측을 온라인으로 관리합니다.</p>
<div style="display:flex;flex-wrap:wrap;gap:7px;">
<span style="background:rgba(201,168,76,0.18);color:#e0c87a;padding:4px 12px;border-radius:20px;font-size:0.745rem;">종합소득세</span>
<span style="background:rgba(201,168,76,0.18);color:#e0c87a;padding:4px 12px;border-radius:20px;font-size:0.745rem;">경비처리</span>
<span style="background:rgba(201,168,76,0.18);color:#e0c87a;padding:4px 12px;border-radius:20px;font-size:0.745rem;">세금 예측</span>
</div>
</div>
<div style="background:rgba(255,255,255,0.07);border:1px solid rgba(255,255,255,0.1);border-radius:18px;padding:38px;transition:background 0.2s;" style-hover="background:rgba(255,255,255,0.12);">
<div style="font-size:1.8rem;margin-bottom:16px;">🏘️</div>
<div style="font-size:0.68rem;letter-spacing:0.14em;color:#c9a84c;font-weight:600;margin-bottom:10px;text-transform:uppercase;">3순위 · 고단가 상담</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.2rem;font-weight:700;color:white;margin-bottom:14px;">부동산 매도 · 증여 · 상속 예정자</h3>
<p style="color:rgba(255,255,255,0.62);font-size:0.855rem;line-height:1.85;margin-bottom:20px;">계약 전 양도세 사전검토, 증여·상속 사전설계, 임대사업자 세무관리. 자료 공유 후 온라인 검토로 계약 전 선택지를 최대화합니다.</p>
<div style="display:flex;flex-wrap:wrap;gap:7px;">
<span style="background:rgba(201,168,76,0.18);color:#e0c87a;padding:4px 12px;border-radius:20px;font-size:0.745rem;">양도세 검토</span>
<span style="background:rgba(201,168,76,0.18);color:#e0c87a;padding:4px 12px;border-radius:20px;font-size:0.745rem;">증여·상속</span>
<span style="background:rgba(201,168,76,0.18);color:#e0c87a;padding:4px 12px;border-radius:20px;font-size:0.745rem;">임대사업자</span>
</div>
</div>
<div style="background:rgba(255,255,255,0.07);border:1px solid rgba(255,255,255,0.1);border-radius:18px;padding:38px;transition:background 0.2s;" style-hover="background:rgba(255,255,255,0.12);">
<div style="font-size:1.8rem;margin-bottom:16px;">🔑</div>
<div style="font-size:0.68rem;letter-spacing:0.14em;color:#c9a84c;font-weight:600;margin-bottom:10px;text-transform:uppercase;">4순위 · 자산관리</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.2rem;font-weight:700;color:white;margin-bottom:14px;">임대사업자 · 상가 보유자</h3>
<p style="color:rgba(255,255,255,0.62);font-size:0.855rem;line-height:1.85;margin-bottom:20px;">주택·상가·오피스텔 임대 소득의 종합소득세, 부가가치세, 양도 시점 세무까지 — 보유부터 매도까지 단계별로 관리합니다.</p>
<div style="display:flex;flex-wrap:wrap;gap:7px;">
<span style="background:rgba(201,168,76,0.18);color:#e0c87a;padding:4px 12px;border-radius:20px;font-size:0.745rem;">임대소득세</span>
<span style="background:rgba(201,168,76,0.18);color:#e0c87a;padding:4px 12px;border-radius:20px;font-size:0.745rem;">상가·오피스텔</span>
<span style="background:rgba(201,168,76,0.18);color:#e0c87a;padding:4px 12px;border-radius:20px;font-size:0.745rem;">매도 세무</span>
</div>
</div>
</div>
</div>
</section>
<!-- ── PROCESS ── -->
<section style="padding:100px 60px;background:white;" class="section-px">
<div style="max-width:960px;margin:0 auto;">
<div style="text-align:center;margin-bottom:64px;">
<div style="font-size:0.72rem;letter-spacing:0.18em;color:#c9a84c;font-weight:600;margin-bottom:14px;text-transform:uppercase;">Process</div>
<h2 style="font-family:'Hahmlet',serif;font-size:2.2rem;font-weight:700;color:#0d2340;">상담 진행 과정</h2>
</div>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:40px;text-align:center;">
<div>
<div style="width:72px;height:72px;border-radius:50%;background:white;border:2px solid #c9a84c;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;font-family:'Hahmlet',serif;font-size:1.35rem;font-weight:700;color:#c9a84c;">01</div>
<div style="font-size:0.7rem;color:#c9a84c;font-weight:600;letter-spacing:0.1em;margin-bottom:8px;text-transform:uppercase;">카카오 · 전화 · 이메일</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.05rem;font-weight:700;color:#0d2340;margin-bottom:10px;">온라인으로 상담 신청</h3>
<p style="color:#6b7e8f;font-size:0.845rem;line-height:1.85;">전국 어디서나 카카오채널·전화·이메일로 문의하시면 상담 분야와 상황을 파악합니다. 방문 불필요.</p>
</div>
<div>
<div style="width:72px;height:72px;border-radius:50%;background:white;border:2px solid #c9a84c;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;font-family:'Hahmlet',serif;font-size:1.35rem;font-weight:700;color:#c9a84c;">02</div>
<div style="font-size:0.7rem;color:#c9a84c;font-weight:600;letter-spacing:0.1em;margin-bottom:8px;text-transform:uppercase;">자료 공유 → 온라인 검토</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.05rem;font-weight:700;color:#0d2340;margin-bottom:10px;">비대면 자료 검토 & 방향 안내</h3>
<p style="color:#6b7e8f;font-size:0.845rem;line-height:1.85;">이메일·카카오로 자료를 공유하시면 세금 리스크와 선택 가능한 방향을 정리해 안내드립니다.</p>
</div>
<div>
<div style="width:72px;height:72px;border-radius:50%;background:#0d2340;border:2px solid #0d2340;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;font-family:'Hahmlet',serif;font-size:1.35rem;font-weight:700;color:#c9a84c;">03</div>
<div style="font-size:0.7rem;color:#c9a84c;font-weight:600;letter-spacing:0.1em;margin-bottom:8px;text-transform:uppercase;">온라인 신고 · 기장 · 자문</div>
<h3 style="font-family:'Hahmlet',serif;font-size:1.05rem;font-weight:700;color:#0d2340;margin-bottom:10px;">비대면으로 세무관리 시작</h3>
<p style="color:#6b7e8f;font-size:0.845rem;line-height:1.85;">신고대리·기장·자문 중 맞는 방식으로 진행합니다. 이후 관리도 모두 온라인으로 이루어집니다.</p>
</div>
</div>
</div>
</section>
<!-- ── FAQ ── -->
<section id="faq" style="padding:100px 60px;background:#f8f7f4;" class="section-px">
<div style="max-width:800px;margin:0 auto;">
<div style="text-align:center;margin-bottom:56px;">
<div style="font-size:0.72rem;letter-spacing:0.18em;color:#c9a84c;font-weight:600;margin-bottom:14px;text-transform:uppercase;">FAQ</div>
<h2 style="font-family:'Hahmlet',serif;font-size:2.2rem;font-weight:700;color:#0d2340;">자주 묻는 질문</h2>
</div>
<div style="display:flex;flex-direction:column;gap:10px;">
<sc-for list="{{ faqs }}" as="faq" hint-placeholder-count="5">
<div style="background:white;border-radius:10px;overflow:hidden;">
<button onClick="{{ faq.toggle }}" style="width:100%;padding:22px 26px;background:white;display:flex;justify-content:space-between;align-items:center;text-align:left;border-radius:10px;transition:background 0.15s;" style-hover="background:#f5f3ee;">
<span style="font-family:'Hahmlet',serif;font-size:0.975rem;font-weight:600;color:#0d2340;flex:1;padding-right:16px;line-height:1.5;">{{ faq.q }}</span>
<span style="font-size:1.5rem;color:#c9a84c;font-weight:300;line-height:1;flex-shrink:0;">{{ faq.icon }}</span>
</button>
<div style="{{ faq.bodyStyle }}">
<p style="color:#6b7e8f;font-size:0.875rem;line-height:1.95;padding:4px 26px 24px;">{{ faq.a }}</p>
</div>
</div>
</sc-for>
</div>
</div>
</section>
<!-- ── BLOG ── -->
<section style="padding:100px 60px;background:white;" class="section-px">
<div style="max-width:1200px;margin:0 auto;">
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:72px;align-items:center;">
<div>
<div style="font-size:0.72rem;letter-spacing:0.18em;color:#c9a84c;font-weight:600;margin-bottom:16px;text-transform:uppercase;">Blog</div>
<h2 style="font-family:'Hahmlet',serif;font-size:2rem;font-weight:700;color:#0d2340;margin-bottom:20px;line-height:1.35;">세금, 미리 알면<br>달라집니다</h2>
<p style="color:#6b7e8f;line-height:1.9;margin-bottom:32px;font-size:0.9rem;">사업자 세무, 부동산 세금, 종합소득세까지 — 실제 사례와 체크리스트로 알기 쉽게 설명합니다.</p>
<a href="#" style="display:inline-flex;align-items:center;gap:8px;background:#0d2340;color:white;padding:13px 22px;border-radius:6px;font-weight:600;font-size:0.875rem;transition:background 0.2s;" style-hover="background:#1a3a5c;">블로그 바로가기 →</a>
</div>
<div style="display:flex;flex-direction:column;gap:12px;">
<div style="padding:18px 22px;background:#f8f7f4;border-radius:10px;border-left:3px solid #c9a84c;transition:background 0.2s;" style-hover="background:#fffdf5;">
<div style="font-size:0.68rem;color:#c9a84c;font-weight:600;margin-bottom:7px;text-transform:uppercase;">부동산</div>
<div style="font-size:0.875rem;font-weight:600;color:#0d2340;line-height:1.5;">집 팔기 전 양도세 상담을 먼저 받아야 하는 이유</div>
</div>
<div style="padding:18px 22px;background:#f8f7f4;border-radius:10px;border-left:3px solid #c9a84c;transition:background 0.2s;" style-hover="background:#fffdf5;">
<div style="font-size:0.68rem;color:#c9a84c;font-weight:600;margin-bottom:7px;text-transform:uppercase;">종합소득세</div>
<div style="font-size:0.875rem;font-weight:600;color:#0d2340;line-height:1.5;">보험설계사 종소세 신고 전 준비자료</div>
</div>
<div style="padding:18px 22px;background:#f8f7f4;border-radius:10px;border-left:3px solid #c9a84c;transition:background 0.2s;" style-hover="background:#fffdf5;">
<div style="font-size:0.68rem;color:#c9a84c;font-weight:600;margin-bottom:7px;text-transform:uppercase;">사업자 세무</div>
<div style="font-size:0.875rem;font-weight:600;color:#0d2340;line-height:1.5;">사업자 통장 꼭 따로 써야 할까? 세무사가 보는 기준</div>
</div>
<div style="padding:18px 22px;background:#f8f7f4;border-radius:10px;border-left:3px solid #c9a84c;transition:background 0.2s;" style-hover="background:#fffdf5;">
<div style="font-size:0.68rem;color:#c9a84c;font-weight:600;margin-bottom:7px;text-transform:uppercase;">증여·상속</div>
<div style="font-size:0.875rem;font-weight:600;color:#0d2340;line-height:1.5;">부모님 집을 자녀에게 증여하기 전 체크할 것</div>
</div>
</div>
</div>
</div>
</section>
<!-- ── CONTACT CTA ── -->
<section id="contact" style="padding:100px 60px;background:#c9a84c;" class="section-px">
<div style="max-width:1100px;margin:0 auto;">
<div style="text-align:center;margin-bottom:56px;">
<h2 style="font-family:'Hahmlet',serif;font-size:2.4rem;font-weight:700;color:#0d2340;margin-bottom:14px;line-height:1.3;">세금 걱정, 지금 바로<br>상담하세요</h2>
<p style="color:rgba(13,35,64,0.62);font-size:0.95rem;max-width:480px;margin:0 auto;">세금은 계약·매출·명의·자금 이동 전에 검토할수록 선택지가 많습니다.</p>
</div>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px;max-width:840px;margin:0 auto;">
<a href="https://pf.kakao.com/_xoxchTX" target="_blank" style="background:white;border-radius:14px;padding:36px 26px;text-align:center;display:block;transition:transform 0.2s,box-shadow 0.2s;" style-hover="transform:translateY(-3px);box-shadow:0 10px 28px rgba(0,0,0,0.1);">
<div style="font-size:2rem;margin-bottom:12px;">💬</div>
<div style="font-weight:700;font-size:0.975rem;color:#0d2340;margin-bottom:6px;">카카오 상담</div>
<div style="font-size:0.815rem;color:#6b7e8f;margin-bottom:16px;">편하게 문의하세요</div>
<div style="font-size:0.78rem;color:#c9a84c;font-weight:700;">바로 연결 →</div>
</a>
<a href="tel:010-4122-8268" style="background:white;border-radius:14px;padding:36px 26px;text-align:center;display:block;transition:transform 0.2s,box-shadow 0.2s;" style-hover="transform:translateY(-3px);box-shadow:0 10px 28px rgba(0,0,0,0.1);">
<div style="font-size:2rem;margin-bottom:12px;">📞</div>
<div style="font-weight:700;font-size:0.975rem;color:#0d2340;margin-bottom:6px;">전화 상담</div>
<div style="font-size:0.815rem;color:#6b7e8f;margin-bottom:16px;">010-4122-8268</div>
<div style="font-size:0.78rem;color:#c9a84c;font-weight:700;">바로 연결 →</div>
</a>
<a href="mailto:taxbaik5668@gmail.com" style="background:white;border-radius:14px;padding:36px 26px;text-align:center;display:block;transition:transform 0.2s,box-shadow 0.2s;" style-hover="transform:translateY(-3px);box-shadow:0 10px 28px rgba(0,0,0,0.1);">
<div style="font-size:2rem;margin-bottom:12px;">✉️</div>
<div style="font-weight:700;font-size:0.975rem;color:#0d2340;margin-bottom:6px;">이메일 문의</div>
<div style="font-size:0.815rem;color:#6b7e8f;margin-bottom:16px;">taxbaik5668@gmail.com</div>
<div style="font-size:0.78rem;color:#c9a84c;font-weight:700;">이메일 보내기 →</div>
</a>
</div>
<p style="text-align:center;margin-top:44px;color:rgba(13,35,64,0.48);font-size:0.8rem;line-height:1.9;">사업자 기장, 종합소득세, 부가세, 양도세, 증여·상속세 상담이 필요하시면 언제든 연락주세요.</p>
</div>
</section>
<!-- ── FOOTER ── -->
<footer style="background:#0d2340;padding:64px 60px 40px;" class="section-px">
<div style="max-width:1200px;margin:0 auto;">
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:52px;margin-bottom:48px;">
<div>
<div style="font-family:'Hahmlet',serif;font-size:1.2rem;font-weight:700;color:white;margin-bottom:14px;">백원숙 세무사</div>
<p style="color:rgba(255,255,255,0.42);font-size:0.845rem;line-height:1.9;margin-bottom:16px;">사업과 부동산, 가족의 돈 흐름까지 함께 보는 생활자산 세무 파트너</p>
<div style="font-size:0.76rem;color:rgba(255,255,255,0.28);">세무사 · 부동산중개사 · 보험설계사</div>
</div>
<div>
<div style="font-size:0.72rem;letter-spacing:0.14em;color:#c9a84c;font-weight:600;margin-bottom:18px;text-transform:uppercase;">서비스</div>
<div style="display:flex;flex-direction:column;gap:10px;">
<a href="#services" style="color:rgba(255,255,255,0.45);font-size:0.845rem;transition:color 0.2s;" style-hover="color:rgba(255,255,255,0.85);">월 기장 관리</a>
<a href="#services" style="color:rgba(255,255,255,0.45);font-size:0.845rem;transition:color 0.2s;" style-hover="color:rgba(255,255,255,0.85);">종합소득세 신고</a>
<a href="#services" style="color:rgba(255,255,255,0.45);font-size:0.845rem;transition:color 0.2s;" style-hover="color:rgba(255,255,255,0.85);">양도세 사전진단</a>
<a href="#services" style="color:rgba(255,255,255,0.45);font-size:0.845rem;transition:color 0.2s;" style-hover="color:rgba(255,255,255,0.85);">증여·상속 상담</a>
<a href="#services" style="color:rgba(255,255,255,0.45);font-size:0.845rem;transition:color 0.2s;" style-hover="color:rgba(255,255,255,0.85);">신규 사업자 세무정리</a>
</div>
</div>
<div>
<div style="font-size:0.72rem;letter-spacing:0.14em;color:#c9a84c;font-weight:600;margin-bottom:18px;text-transform:uppercase;">연락처</div>
<div style="display:flex;flex-direction:column;gap:12px;">
<div style="color:rgba(255,255,255,0.52);font-size:0.845rem;">📞 010-4122-8268</div>
<div style="color:rgba(255,255,255,0.52);font-size:0.845rem;">✉️ taxbaik5668@gmail.com</div>
<a href="https://pf.kakao.com/_xoxchTX" target="_blank" style="color:#c9a84c;font-size:0.845rem;">💬 카카오채널 상담</a>
<div style="color:rgba(255,255,255,0.52);font-size:0.845rem;">📍 성북구</div>
</div>
</div>
</div>
<div style="border-top:1px solid rgba(255,255,255,0.07);padding-top:24px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;">
<div style="color:rgba(255,255,255,0.25);font-size:0.775rem;">© 2025 백원숙세무회계. All rights reserved.</div>
<div style="color:rgba(255,255,255,0.25);font-size:0.72rem;">세무사·부동산중개사·보험설계사 자격 보유</div>
</div>
</div>
</footer>
</x-dc>
<script type="text/x-dc" data-dc-script>
class Component extends DCLogic {
state = { navScrolled: false, faqOpen: null };
componentDidMount() {
this._onScroll = () => {
const scrolled = window.scrollY > 60;
if (scrolled !== this.state.navScrolled) {
this.setState({ navScrolled: scrolled });
}
};
window.addEventListener('scroll', this._onScroll, { passive: true });
}
componentWillUnmount() {
window.removeEventListener('scroll', this._onScroll);
}
renderVals() {
const { navScrolled, faqOpen } = this.state;
const navTextColor = navScrolled ? '#1a2232' : '#ffffff';
const faqs = [
{
q: '기장료가 얼마인지 미리 알 수 있나요?',
a: '업종, 매출 규모, 직원 여부, 세금계산서 발행량에 따라 달라집니다. 단순 장부 작성만 필요한지, 예상세액과 증빙관리까지 필요한지 먼저 확인한 뒤 안내드립니다. 카카오채널로 상황을 알려주시면 적합한 구성을 제안해드립니다.',
},
{
q: '양도세 상담은 어떻게 진행되나요?',
a: '양도세는 취득가액, 보유기간, 거주기간, 주택 수, 조정대상지역 여부 등에 따라 달라집니다. 계약 전이라면 선택지가 훨씬 많기 때문에 먼저 상황을 공유해주시면 사전 검토 방식으로 진행합니다.',
},
{
q: '무료 상담도 가능한가요?',
a: '간단한 문의는 카카오채널로 주시면 방향을 안내드립니다. 세액 판단이나 신고 리스크 검토는 사실관계 확인이 필요해 유료상담으로 진행됩니다. 단, 기장·신고 계약으로 이어지는 경우 상담료 일부를 차감해드립니다.',
},
{
q: '처음 상담 시 어떤 자료를 준비해야 하나요?',
a: '분야에 따라 다르지만 일반적으로 사업자등록증, 최근 신고 내역, 매출·매입 자료를 준비하시면 됩니다. 부동산의 경우 등기부등본과 취득가액 관련 자료가 필요합니다. 상담 신청 후 구체적인 준비자료를 먼저 안내드립니다.',
},
{
q: '부동산중개사 자격은 세무상담에 어떻게 활용되나요?',
a: '부동산 거래 구조를 직접 이해하는 세무사로서 매도·증여·임대 단계에서 발생하는 세금 리스크를 현실적으로 설명할 수 있습니다. 단순히 세금 계산에서 끝나는 것이 아니라, 거래 구조 자체를 함께 검토합니다.',
},
].map((item, i) => ({
...item,
icon: faqOpen === i ? '×' : '+',
toggle: () => this.setState(s => ({ faqOpen: s.faqOpen === i ? null : i })),
bodyStyle: {
transition: 'max-height 0.38s ease, opacity 0.38s ease',
maxHeight: faqOpen === i ? '420px' : '0px',
opacity: faqOpen === i ? 1 : 0,
overflow: 'hidden',
},
}));
return {
navStyle: {
position: 'fixed', top: 0, left: 0, right: 0, zIndex: 100,
height: '70px', display: 'flex', alignItems: 'center',
justifyContent: 'space-between', padding: '0 60px',
transition: 'all 0.35s ease',
background: navScrolled ? 'rgba(255,255,255,0.97)' : 'rgba(13,35,64,0.72)',
backdropFilter: 'blur(14px)',
boxShadow: navScrolled ? '0 2px 24px rgba(0,0,0,0.08)' : 'none',
},
navLogoStyle: {
fontFamily: "'Hahmlet', serif",
fontSize: '1.1rem', fontWeight: '700',
color: navTextColor, letterSpacing: '-0.02em',
transition: 'color 0.3s ease',
},
navLinkStyle: {
fontSize: '0.875rem', color: navTextColor,
fontWeight: '500', transition: 'color 0.2s ease',
},
faqs,
};
}
}
</script>
</body>
</html>
-52
View File
@@ -1,52 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"Default": "Host=localhost;Database=taxbaikdb;Username=taxbaik;Password=taxbaik123"
},
"Jwt": {
"SecretKey": "dev-secret-key-change-in-production-min-32-chars!"
},
"App": {
"PublicBaseUrl": "http://178.104.200.7/taxbaik"
},
"ApiClient": {
"BaseUrl": "http://localhost:5001/taxbaik/api/"
},
"Telegram": {
"BotToken": "8679990909:AAGLLRUIAuEbYAZVGOYDu-UuTu4ihroEiX0",
"ChatId": "-5434691215",
"InquiryChatId": "-5434691215",
"SystemChatId": "-5585148480"
},
"Admin": {
"PasswordResetToken": "dev-reset-token-12345"
},
"Authentication": {
"Google": {
"ClientId": "",
"ClientSecret": ""
},
"Naver": {
"ClientId": "",
"ClientSecret": ""
},
"Kakao": {
"ClientId": "",
"ClientSecret": ""
}
},
"SiteSettings": {
"PhoneNumber": "010-4122-8268",
"EmailAddress": "taxbaik5668@gmail.com",
"KakaoChannelUrl": "http://pf.kakao.com/_xoxchTX",
"InstagramUrl": "https://www.instagram.com/taxtory5668/",
"CompanyName": "백원숙 세무회계",
"CompanyDescription": "사업자 기장, 부동산 양도세·증여세, 종합소득세 전문 상담"
},
"AllowedHosts": "*"
}
-48
View File
@@ -1,48 +0,0 @@
-- Create common_codes table
CREATE TABLE IF NOT EXISTS common_codes (
code_group VARCHAR(50) NOT NULL,
code_value VARCHAR(50) NOT NULL,
code_name VARCHAR(100) NOT NULL,
sort_order INT DEFAULT 0,
is_active BOOLEAN DEFAULT TRUE,
PRIMARY KEY (code_group, code_value)
);
-- Seed data for BUSINESS_TYPE
INSERT INTO common_codes (code_group, code_value, code_name, sort_order) VALUES
('BUSINESS_TYPE', '일반제조업', '일반제조업', 10),
('BUSINESS_TYPE', '도소매업', '도소매업', 20),
('BUSINESS_TYPE', '서비스업', '서비스업', 30),
('BUSINESS_TYPE', '정보통신업', '정보통신업', 40),
('BUSINESS_TYPE', '부동산업', '부동산업', 50),
('BUSINESS_TYPE', '건설업', '건설업', 60),
('BUSINESS_TYPE', '음식점업', '음식점업', 70),
('BUSINESS_TYPE', '프리랜서', '프리랜서', 80),
('BUSINESS_TYPE', '기타', '기타', 90)
ON CONFLICT (code_group, code_value) DO NOTHING;
-- Seed data for TAX_RISK_LEVEL
INSERT INTO common_codes (code_group, code_value, code_name, sort_order) VALUES
('TAX_RISK_LEVEL', 'low', '낮음', 10),
('TAX_RISK_LEVEL', 'normal', '보통', 20),
('TAX_RISK_LEVEL', 'high', '높음', 30)
ON CONFLICT (code_group, code_value) DO NOTHING;
-- Seed data for FILING_TYPE
INSERT INTO common_codes (code_group, code_value, code_name, sort_order) VALUES
('FILING_TYPE', '종합소득세', '종합소득세', 10),
('FILING_TYPE', '부가가치세', '부가가치세', 20),
('FILING_TYPE', '법인세', '법인세', 30),
('FILING_TYPE', '원천세', '원천세', 40),
('FILING_TYPE', '양도소득세', '양도소득세', 50),
('FILING_TYPE', '상속/증여세', '상속/증여세', 60)
ON CONFLICT (code_group, code_value) DO NOTHING;
-- Seed data for SERVICE_TYPE
INSERT INTO common_codes (code_group, code_value, code_name, sort_order) VALUES
('SERVICE_TYPE', '개인 기장대리', '개인 기장대리', 10),
('SERVICE_TYPE', '법인 기장대리', '법인 기장대리', 20),
('SERVICE_TYPE', '세무조정', '세무조정', 30),
('SERVICE_TYPE', '세무컨설팅', '세무컨설팅', 40),
('SERVICE_TYPE', '불복청구', '불복청구', 50)
ON CONFLICT (code_group, code_value) DO NOTHING;
@@ -1,420 +0,0 @@
-- V019: Fix blog posts migration (V018 had quote escaping issues)
-- Complete rewrite using $$ quote style to avoid escaping problems
-- Delete posts 6-12 added in V018 (if they exist)
DELETE FROM blog_posts WHERE id >= 6;
-- Re-insert all 12 posts with proper formatting
-- 6. 스마트스토어 판매자를 위한 첫 세무 기장
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'스마트스토어 판매자를 위한 첫 세무 기장 - 이게 매출인가 수익인가?',
'smartstore-accounting-guide',
'스마트스토어에서 물건을 팔 때 세금을 어떻게 내는지 모르겠어요. 기장도 처음 하는 거 같고요.
스마트스토어 판매자는 사업자 등록을 해야 하고, 매달 세금을 내야 합니다. 하지만 물론 정확히 알면 세금을 최소화할 수 있습니다.
## 상황: 스마트스토어로 의류 판매
- 월 판매량: 300개
- 상품 가격: 평균 2만 원 (택배료 포함)
- 월 매출: 600만 원
## 매출 정리
- 신용카드 매출 합계: 400만 원
- 현금 매출 합계: 200만 원
- 월 총 매출: 600만 원
## 경비 정리
- 상품 구매가 (월 300개 × 8,000원): 240만 원
- 배송료 (월 300개 × 2,500원): 75만 원
- 스마트스토어 수수료 (매출의 4%): 24만 원
- 포장재: 5만 원
- 사진 배경/기타: 2만 원
- 통신비 (50% 사업용): 5만 원
총 경비: 351만 원
## 순이익
순이익 = 매출 - 경비 = 600만 - 351만 = 249만 원
## 세금 계산
**부가가치세** (매달): 600만 × 3% = 18만 원 (간이과세)
**소득세** (연 1회, 5월): 약 30만 원/월
매달 내는 세금 = 약 48만 원
## 주의: 사업자 등록 필수!
- 플랫폼이 자동으로 신고합니다 (100% 발각됨)
- 등록 안 하면: 가산세 40~50% + 과태료 수백만 원
- 등록 자체는 무료 (세무서 방문)
## 프리랜서가 놓치는 경비 5가지
1. 휴대폰 비용 (사업용 비율만): 월 6만 × 70% = 4.2만 원
2. 노트북 (50% 공제): 200만 원 × 50% = 100만 원
3. 인터넷 비용 (100%): 월 5만 원
4. 카메라, 조명 (사진 촬영용): 100% 경비
5. 택배비, 포장재비: 모두 100% 경비
## 꼭 해야 할 것들
1. 매달 매출과 경비 기록하기 (엑셀로 충분)
2. 통장 사용하기 (현금 X)
3. 영수증 보관 (5년)
스마트스토어로 제2의 수익을 만들되, 세금은 똑똑하게 내세요!',
1,
true,
NOW()
);
-- 7. 프리랜서가 가장 놓치는 경비 5가지
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'프리랜서가 가장 놓치는 경비 5가지 - 이것도 깎을 수 있다고?',
'freelancer-forgotten-expenses',
'프리랜서 유정이는 연간 3,000만 원을 벌었습니다. 세금이 약 450만 원 나온다고 하는데, 세무사 친구 말로는 경비를 제대로 기록했으면 세금이 200만 원대였을 텐데라고 했어요. 무려 250만 원을 더 낸 겁니다!
프리랜서들이 자주 놓치는 경비는 뭘까요?
## 놓친 경비 1: 인터넷비 & 휴대폰비
❌ 많은 프리랜서: 인터넷은 생활비라고 생각
✅ 똑똑한 프리랜서: 강의 영상을 업로드하고 학생들과 메시지하는데 인터넷이 필수다
계산:
- 인터넷비: 월 5만 원 × 12 = 60만 원
- 휴대폰비: 월 6만 원 × 100% = 72만 원
합계: 132만 원 경비 → 세금 약 20만 원 절약
## 놓친 경비 2: 카페비 (업무용)
❌ 많은 프리랜서: 카페는 개인 취향
✅ 똑똑한 프리랜서: 카페에서 학생 과외를 하고 영상 편집을 하고 고객을 만나는데, 이건 사무실 역할을 하고 있다
계산:
- 월 카페비: 약 20만 원 (1시간 5,000원 × 40시간)
- 연간 카페비: 240만 원
→ 세금 = 240만 × 15% = 36만 원 절약
## 놓친 경비 3: 노트북 & 프로그램 구독료
❌ 많은 프리랜서: 노트북은 개인 컴퓨터
✅ 똑똑한 프리랜서: 강의 자료를 만들고 영상을 편집하고 학생과 화상 통화를 하므로 100% 사업용
계산:
- 노트북: 150만 원 × 100% = 150만 원
- Adobe Creative Cloud: 월 6.5만 × 12 = 78만 원
- 카카오톡 비즈니스: 월 3만 × 12 = 36만 원
총 경비: 264만 원 → 세금 약 40만 원 절약
## 놓친 경비 4: 책 & 강의 수강료
❌ 많은 프리랜서: 교육비는 개인이 얼마를 써도 경비가 아니다
✅ 똑똑한 프리랜서: 내 전문성을 높이기 위해 배우는 거. 이건 사업 투자다
계산:
- 책: 월 5만 × 12 = 60만 원
- 온라인 강의: 월 10만 × 12 = 120만 원
- 교육 앱: 월 3만 × 12 = 36만 원
합계: 216만 원 → 세금 약 32만 원 절약
## 놓친 경비 5: 교통비 & 회의비
❌ 많은 프리랜서: 회의하러 가는 길은 출퇴근이니 교통비가 경비 아니다
✅ 똑똑한 프리랜서: 이 회의는 새 프로젝트를 받기 위한 미팅이다
계산:
- 고객 미팅 교통비: 월 10회 × 2만 = 20만 원
- 협력사 미팅: 월 5회 × 3,000 = 1.5만 원
- 업무 관련 식사: 월 8회 × 3만 = 24만 원
월 경비: 45.5만 원
연간 경비: 546만 원 → 세금 약 82만 원 절약
## 전체 계산
경비를 기록하지 않은 경우:
- 연간 수입: 3,000만 원
- 세금: 약 400만 원
경비를 제대로 기록한 경우:
- 경비 합계: 1,326만 원 (인터넷 + 카페 + 노트북 + 강의 + 교통비)
- 세금: 약 230만 원
절약액: 170만 원!!!
## 꼭 기억하세요!
1. 프리랜서도 많은 경비를 깎을 수 있다
2. 인터넷, 카페, 책, 프로그램 모두 경비다
3. 영수증을 5년 동안 보관해야 한다
4. 엑셀로 분류하면 세무사 비용도 아낀다
5. 처음부터 정확하게 기록하는 게 나중에 편하다
프리랜서 여러분, 놓친 경비를 찾아서 세금을 줄이세요!',
1,
true,
NOW()
);
-- 8-12 추가 포스트들 (간단 버전)
-- 실제 환경에서는 전체 콘텐츠 필요하지만, 테스트용으로 제목과 짧은 내용만 입력
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'월세 받을 때 꼭 신고해야 하나요? - 빌린 사람도 보호받아야 합니다',
'rental-income-tax-guide',
'집을 월세로 빌려주고 있어요. 월세 100만 원을 받는데 세금을 내야 하나요?
네, 세금을 내야 합니다. 하지만 조건이 있습니다.
## 월세 수입 = 사업 소득 (세금 내야 함)
월 100만 원 × 12개월 = 연 1,200만 원 수입
## 필요경비 (공제 가능한 비용)
- 건물 보험료: 연 20만 원
- 수리비: 연 50만 원
- 청소용품: 연 10만 원
- 관리비 (50%): 연 60만 원
공제액 합계: 140만 원
## 세금 계산
과세표준 = 1,200만 - 140만 = 1,060만 원
기본공제 = 150만 원
최종 과세표준 = 910만 원
세율 6% → 세금 약 54.6만 원/년 (월 약 4.5만 원)
## 고지사항
1. 월세도 세금을 내야 한다 (신고 필수)
2. 2,000만 원 이하면 세율이 낮다 (6%)
3. 필요경비를 정확히 기록하면 세금을 줄인다
4. 계좌이체로 받고 증거를 남겨야 한다
5. 전세는 세금이 없다 (전세의 장점)
월세를 받으시는 분들, 똑똑하게 신고하세요!',
1,
true,
NOW()
);
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'자녀에게 주는 용돈은 증여세가 나나요? - 생일 선물도 세금?',
'child-gift-tax-guide',
'아들 생일인데 용돈을 줄까 해요. 그런데 세금이 나오나요?
좋은 소식: 자녀에게 주는 용돈은 거의 세금이 안 나옵니다!
## 부모 → 자녀: 기초공제 5,000만 원
성인 자녀에게 5,000만 원까지는 세금이 안 나옵니다.
## 계산 예시
상황 1: 대학생 아들에게 500만 원
- 기초공제: 5,000만 원
- 용돈액: 500만 원
- 세금: 0원
상황 2: 고등학생 딸에게 2,000만 원
- 미성년 공제: 2,000만 원
- 용돈액: 2,000만 원
- 세금: 0원
## 똑똑한 증여 방법
1. 여러 해에 나눠주기: 10년 기다리고 다시 주면 공제 리셋
2. 부부가 함께 주기: 각각의 공제를 사용하면 더 많이 줄 수 있음
3. 학비는 따로 공제: 학비는 세금이 안 나옴 (별도 공제)
4. 계좌이체로 하기: 증거가 남음
5. 성인되면 바로 주기: 성인은 공제가 5,000만 원
## 꼭 기억하세요!
1. 부모 → 자녀: 기초공제 5,000만 원 (성인)
2. 학비는 세금이 안 나온다 (별도 공제)
3. 계좌이체로 하면 증거가 남는다
4. 10년 기다리고 다시 주면 공제가 리셋된다
5. 여러 해에 나눠주면 세금 절약이 크다
부모 여러분, 자녀에게 세금 없이 듬뿍 주세요!',
1,
true,
NOW()
);
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'사업자 등록, 언제 하는 게 유리할까? - 등록 안 했다가 큰 코 다칩니다',
'business-registration-timing',
'온라인으로 물건을 팔기 시작했어요. 사업자 등록을 해야 하나요? 언제부터?
이건 정말 중요한 질문입니다. 사업자 등록을 모르면 큰 손해를 봅니다.
## 사업자 등록을 안 하면?
상황: 스마트스토어에서 월 500만 원 매출 × 6개월 = 3,000만 원
가산세 폭탄이 옵니다!
- 본래 세금: 약 200만 원
- 가산세 (40%): 80만 원
- 무신고 과태료: 50만 원
실제 낸 세금: 330만 원
평소 신고했으면: 약 200만 원
신고 안 했으면: 약 330만 원
차이: 130만 원!!!
## 사업자 등록 기본 정보
언제: 사업을 시작하면 1개월 이내 하세요!
어디: 가까운 세무서 (당일 완료, 비용 0원)
## 언제가 가장 유리한가?
전략 1: 초기 단계에 등록하기 (추천)
- 월 100만 원 때 등록
- 초기 동안은 세금을 안 냅니다 (부가세 간이과세 덕분)
전략 2: 매출이 많아진 후 등록
- 이전 6개월간 등록 안 함 → 가산세 문제 발생
결론: 사업을 시작하자마자 등록하세요!
## 꼭 기억하세요!
1. 사업을 시작하면 1개월 이내 등록하세요
2. 초기에 등록하면 세금이 거의 안 나옵니다
3. 나중에 적발되면 가산세 폭탄이 옵니다
4. 사업자 등록 자체는 무료입니다
5. 등록 후 기장만 제대로 하면 문제없습니다
사업자 여러분, 처음부터 정확하게 등록하세요!',
1,
true,
NOW()
);
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'간단하게 세무기장하는 법 - 소상공인도 5분이면 끝',
'simple-accounting-guide',
'카페를 하는데 매달 기장이 복잡해서 못하겠다고 말씀하시는 분들이 있어요.
하지만 기장은 생각보다 간단합니다.
## 기장이 뭔가요?
기장 = 돈을 쓰고 벌 때 기록하는 것
예시:
- 아침에 카페에서 음료 600잔 팔았다 → 매출 기록
- 커피콩을 50만 원어치 샀다 → 경비 기록
- 월급을 직원에게 줬다 → 경비 기록
그거 끝입니다!
## 초간단 방법: 엑셀만 사용
준비물:
- 엑셀 (또는 노트)
- 스마트폰 (영수증 사진)
- 펜
틀:
| 날짜 | 항목 | 금액 | 분류 | 비고 |
|------|------|------|------|------|
| 1/1 | 카페 매출 | 500,000 | 매출 | 신용카드 |
| 1/2 | 커피콩 구매 | 250,000 | 원재료 | 영수증 |
이게 끝입니다!
## 한 달 동안 해야 할 것 (총 1시간)
주 1회 (월요일마다 15분):
- 그 주에 일어난 거래를 기록
월말 (30분):
- 매출 합계 계산
- 경비 합계 계산
- 영수증 정렬
세무사/손택스 (15분):
- 엑셀 파일 제출
- 설명
## 꼭 기억하세요!
1. 기장은 생각보다 간단하다 (엑셀로 충분)
2. 매주 15분, 월말 30분만 하면 된다
3. 영수증을 5년 동안 보관해야 한다
4. 통장 거래로 증거를 남긴다
5. 처음부터 정확하게 하면 나중에 편하다
소상공인 여러분, 기장은 어렵지 않습니다. 시작하세요!',
1,
true,
NOW()
);
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'이번달 부가가치세 신고 - 너무 늦지 마세요! (D-day 계산)',
'vat-report-monthly-guide',
'어? 부가가치세 신고가 오늘까지라고?
매달 20일까지 신고해야 하는 부가가치세. 많은 사업자들이 깜빡합니다.
하루만 늦어도 과태료가 나옵니다!
## 부가가치세 신고 일정 (2026년 기준)
1기 (1~2월): 신고 3월 20일, 납부 3월 25일
2기 (3~4월): 신고 5월 20일, 납부 5월 25일
3기 (5~6월): 신고 7월 20일, 납부 7월 25일
4기 (7~8월): 신고 9월 20일, 납부 9월 25일
## 하루만 늦어도 과태료
기한: 5월 20일까지
신고액: 300만 원
5월 21일에 신고한 경우:
- 본래 세금: 300만 원
- 가산세: 약 6,000원
- 과태료: 약 5만 원
총 납부액: 356,000원
하루만 늦어도 56,000원을 더 냅니다!
## 부가세 신고 계산
편의점 매출: 1,000만 원
간이과세 (소매업 3%):
- 부가세 = 1,000만 × 3% = 30만 원 (매달)
## 신고 방법 3가지
1. 손택스 앱 (가장 쉬움): 10분
2. 국세청 홈택스: 20분
3. 세무사에 맡기기 (가장 안전): 0분
## 꼭 기억하세요!
1. 부가세는 매달 20일까지 신고해야 한다
2. 하루만 늦어도 과태료가 나온다
3. 손택스 앱이면 10분이면 끝난다
4. 영수증을 5년 동안 보관해야 한다
5. 모르면 세무사에 맡기는 게 낫다
사업자 여러분, 부가세 신고는 미루지 마세요!',
1,
true,
NOW()
);
-- 커맨트: V019 마이그레이션 완료
-- 12개 블로그 포스트 완성 (5 업데이트 + 7 신규)
-- 모두 중학교 2학년도 이해 가능한 수준
@@ -1,639 +0,0 @@
-- V020: Rewrite sample blog posts with 3-layer template
-- Layer 1: Basics (anyone can learn)
-- Layer 2: Details + Tax law changes (impossible to track alone)
-- Layer 3: Professional value (tax accountants needed)
DELETE FROM blog_posts WHERE id >= 1;
-- 1. 사업자 기장 시 자주 하는 실수 5가지
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'사업자 기장 시 자주 하는 실수 5가지 - 혼자 하다가 50만 원 손해보는 이유',
'accounting-mistakes-5',
$$
# 5 - 50
"사업을 시작했는데 세금이 얼마나 될까요?"
. **"돈이 들어오고 나가는 것을 기록하는 일"** - . .
---
## 📊 : (34, 3)
** **:
- : 3
- : 600 ( 200, 400)
- : 150, 180, 100
### ( )
"너무 바빠서 영수증을 그냥 버렸어요"
****: "소득 누락" 3 ** 70 **
### ( )
1
****: , . . ** 50 **
---
## 🧮
### Step 1:
600 × 12 = 7,200
### Step 2:
| | | |
|------|-----|------|
| | 150 | 1,800 |
| | 180 | 2,160 |
| | 100 | 1,200 |
| | 20 | 240 |
| **** | **450** | **5,400** |
### Step 3:
7,200 - 5,400 = **1,800 **
### Step 4: (2025 )
1,800 × 6% = ** 108 /**
---
## 🎭
### 📄 "영수증을 정리하세요" ...
** **:
** **:
, ()
? ? ()
? ? ()
3 ? ()
** **:
vs
---
### 📊 "매출과 경비를 기록하세요" ...
** **:
** **:
(? ?)
( )
(/ )
()
** **:
vs
---
## 🔄 2025 ( )
### 2025
**📋 **:
- 2025
- 4,8006,000
- :
**📋 **:
- 150160
-
-
** **:
"작년 기준으로 기장했는데 올해 기준이 바뀐 거야?"
"이 새로운 공제가 되는 건지 안 되는 건지 모르겠어"
"처음부터 다시 계산해야 하나?"
** **:
---
## vs
###
1. ** ** -
2. ** ** -
3. ** 1 ** -
4. **** -
###
1. ** ** -
2. ** ** -
3. ** ** -
4. ** ** -
---
## 💡 3 :
### Layer 1:
-
-
-
"이 정도는 자신이 충분히 가능합니다"
### Layer 2:
- ** **: 50
- ** **:
- ** **:
"이 부분은 혼자서는 어렵습니다"
### Layer 3:
- (/ , )
- ( )
- (/ )
- ( )
---
## 📊
| | |
|------|------|
| | -100 |
| ( ) | +150 |
| ( ) | +50 |
| ( 10 × 30,000) | +360 |
| ** ** | **+460 ** |
**"기초는 배울 수 있지만, 디테일과 계속 바뀌는 세법 때문에 세무사가 필수다. 이래서 돈을 쓸 가치가 있다."**
---
## 💡 !
**1. **
**2. **
**3. **
**4. **
. .
$$,
1,
true,
NOW()
);
-- 2. 이번달 부가가치세 신고
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'이번달 부가가치세 신고 - 너무 늦지 마세요! (D-day 계산)',
'vat-report-monthly-guide',
$$
# - ! (D-day )
"어? 부가가치세 신고가 오늘까지라고?"
20 . . ** !**
---
## 📌 : "편의점 톤" (28, 2)
** **:
- :
- : 1,000
- : 600, 200, 100
### ( )
"신고 기한을 깜빡했어요"
5 21
****:
- : 300,000
- (1 0.2%): 6,000
- : 50,000
- ** : 56,000** ( )
### ( )
20
****:
-
- /
- **: 56,000** ( )
---
## 🧮
### 2025 ()
| | | |
|------|----------|----------|
| 1~2 | 3 20 | 3 25 |
| 3~4 | 5 20 | 5 25 |
| 5~6 | 7 20 | 7 25 |
| 7~8 | 9 20 | 9 25 |
### ( )
** 1,000 **:
- : · 3%
- = 1,000 × 3% = **300,000/**
** **:
- : 910
- ( ): 550
- = 910 - 550 = **360 ** ( !)
** **: +
---
## 🎭
### 📄 "매출을 기록하세요" ...
** **:
** **:
(? ?)
?
3 ( ?)
?
3 ()
** **:
vs
//
### 📊 "경비를 정확히 기록하세요" ...
** **:
** **:
? ?
? ( )
? ( )
? ( ?)
** **:
vs
/
---
## 🔄 2025 ( )
### 2025
**📋 **:
- **2025** ( )
- : **4,8006,000**
- :
**📋 **:
- ·: 3% ( )
- /: 4% ( )
- : 1.5% ()
** **:
"기한이 바뀌었다는 것도 몰랐어"
"이건 공제가 되는 건지 안 되는 건지 모르겠어"
"매년 기준이 달라지면 내가 어떻게 알아?"
** **:
( )
D-7, D-1
---
## vs
###
1. ** ** -
2. ** ** - /
3. ** ** - 20( 25)
4. ** ** - /
###
1. ** ** - (56,000)
2. ** ** -
3. ** ** -
4. ** ** -
---
## 💡 3 :
### Layer 1:
- (20 25)
-
-
"이 정도는 자신이 할 수 있습니다"
### Layer 2:
- ** **: //
- ** **: , ,
- ** **:
"하루 늦으면 56,000원 손해"
### Layer 3:
- ( )
- ( )
- (// )
- ( )
---
## 📊
| | |
|------|------|
| | -30 |
| / ( ) | +50 |
| ( ) | +20 |
| ( 3 × 30,000) | +90 |
| ** ()** | **+130 ** |
---
## 💡 !
**1. 20( 25) - 56,000**
**2. **
**3. **
**4. **
. , , ... .
$$,
1,
true,
NOW()
);
-- 3. 프리랜서를 위한 종합소득세 신고
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'프리랜서를 위한 종합소득세 신고 - 170만 원 절약하는 방법',
'freelancer-income-tax-guide',
$$
# - 170
, , , ...
. ** **. ** ** .
** , , .**
---
## 📌 : "김팬더" (28, 4)
** **:
- : 250
- : 3,000
- : (80%), (20%)
### ( )
"유튜브 광고 수익이 월 250만 원이니까 그냥 신고하면 되겠지"
, ,
****:
- : 3,000
- : 450
- :
### ( )
, ,
, ,
****:
- : 2,200 ( 800 )
- : 280
- **: 170 **
---
## 🧮 ()
### Step 1:
| | | |
|---------|-----|------|
| | 200 | 2,400 |
| | 50 | 600 |
| **** | **250** | **3,000** |
### Step 2: ( !)
:
| | | | |
|------|-----|------|------|
| / | 0 | 100 | () |
| | 6 | 72 | Adobe |
| | 5 | 60 | 100% |
| | 20 | 240 | |
| | 0 | 120 | |
| | 3 | 36 | |
| | 10 | 120 | / |
| **** | **44** | **748** |
### Step 3:
- : 3,000
- : 748
- ****: 2,252
- : 150
- ** **: 2,102
### Step 4: (2025 )
| | |
|------|------|
| 1,200 | 6% |
| 1,200~4,600 | 15% |
****:
- 1,200 × 6% = 72
- 902 × 15% = 135
- ** : 207 **
** ?**
- : 450
- ** : 243 **
** 240 !**
---
## 🎭
### 📄 "카메라는 사업 경비다" ...
** **:
100 = 100
** **:
? ? ( )
50% ? ( 50% )
? ?
? ?
** **:
### 📊 "인터넷비는 사업 경비다" ...
** **:
5 × 12 = 60
** **:
100% ? ? ( )
? 50% ? 80% ?
? ( )
? ( )
** **:
---
## 🔄 2025 ( )
### 2025
**📋 **:
- : 150160
- :
- ** **: ,
**📋 **:
- : 5 1~31 ( )
- : 7,5008,000 ( )
**📋 **:
- : 200
- :
** **:
"새로운 공제가 있다는 것도 몰랐어"
"내가 받을 수 있는 지원이 뭔지 모르겠어"
"세법이 계속 변하면 내가 어떻게 다 알아?"
** **:
---
## vs
###
1. ** ** - , , ,
2. ** ** - 50%, 80%
3. ** 1 ** - 5
4. ** ** - 5 1~31
###
1. ** ** -
2. ** ** -
3. ** ** -
4. ** ** - (240 )
---
## 💡 3 :
### Layer 1:
-
-
- (5)
"이 정도는 자신이 할 수 있습니다"
### Layer 2:
- ** **: ,
- ** **: , ,
- ** **: ,
"경비 처리만으로도 240만 원 차이가 난다"
### Layer 3:
- (, , )
- ( )
- ( / )
- ( )
- ( )
---
## 📊
| | |
|------|------|
| | -50 |
| ( ) | +240 |
| / | +20 |
| ( 40 × 40,000) | +160 |
| ** ()** | **+370 ** |
---
## 💡 !
**1. (240 )**
**2. , , , **
**3. **
**4. **
. , , ... **240 .**
$$,
1,
true,
NOW()
);
@@ -1,640 +0,0 @@
-- V021: Fix blog posts to comply with tax association advertising rules
-- Remove absolute claims, replace with past-tense examples
-- Replace guarantee language with possibility statements
DELETE FROM blog_posts WHERE id >= 1;
-- 1. 사업자 기장 시 자주 하는 실수 5가지
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'사업자 기장 시 자주 하는 실수 5가지 - 혼자 하기 어려운 이유',
'accounting-mistakes-5',
$$
# 5 -
"사업을 시작했는데 세금이 얼마나 될까요?"
. **"돈이 들어오고 나가는 것을 기록하는 일"** - . .
---
## 📊 : (34, 3)
** **:
- : 3
- : 600 ( 200, 400)
- : 150, 180, 100
### ( )
"너무 바빠서 영수증을 그냥 버렸어요"
****: "소득 누락" 3 70 .
### ( )
1
****: , . . .
---
## 🧮
### Step 1:
600 × 12 = 7,200
### Step 2:
| | | |
|------|-----|------|
| | 150 | 1,800 |
| | 180 | 2,160 |
| | 100 | 1,200 |
| | 20 | 240 |
| **** | **450** | **5,400** |
### Step 3:
7,200 - 5,400 = **1,800 **
### Step 4: (2025 )
1,800 × 6% = ** 108 /**
---
## 🎭
### 📄 "영수증을 정리하세요" ...
** **:
** **:
, ()
? ? ()
? ? ()
3 ? ()
** **:
vs
---
### 📊 "매출과 경비를 기록하세요" ...
** **:
** **:
(? ?)
( )
(/ )
()
** **:
vs
---
## 🔄 2025 ( )
### 2025
**📋 **:
- 2025
- 4,8006,000
- :
**📋 **:
- 150160
-
-
** **:
"작년 기준으로 기장했는데 올해 기준이 바뀐 거야?"
"이 새로운 공제가 되는 건지 안 되는 건지 모르겠어"
"처음부터 다시 계산해야 하나?"
** **:
---
## vs
###
1. ** ** -
2. ** ** -
3. ** 1 ** -
4. **** -
###
1. ** ** -
2. ** ** -
3. ** ** -
4. ** ** -
---
## 💡 3 :
### Layer 1:
-
-
-
"이 정도는 자신이 충분히 가능합니다"
### Layer 2:
- ** **: 50
- ** **:
- ** **:
"이 부분은 혼자서는 어렵습니다"
### Layer 3:
- (/ , )
- ( )
- (/ )
- ( )
---
## 📊
| | |
|------|------|
| | -100 |
| | +150 |
| ( ) | +50 |
| ( 10 × 30,000) | +360 |
| ** ()** | ** 460 ** |
240 .
**"기초는 배울 수 있지만, 디테일과 계속 바뀌는 세법 때문에 세무사가 필요하다. 이래서 전문가와 함께 하는 것이 효율적입니다."**
---
## 💡 !
**1. **
**2. **
**3. **
**4. **
. .
$$,
1,
true,
NOW()
);
-- 2. 이번달 부가가치세 신고
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'이번달 부가가치세 신고 - 기한을 지켜야 하는 이유 (D-day 계산)',
'vat-report-monthly-guide',
$$
# - (D-day )
"어? 부가가치세 신고가 오늘까지라고?"
20 . . ** !**
---
## 📌 : "편의점 톤" (28, 2)
** **:
- :
- : 1,000
- : 600, 200, 100
### ( )
"신고 기한을 깜빡했어요"
5 21
****:
- : 300,000
- (1 0.2%): 6,000
- : 50,000
- 56,000 .
### ( )
20
****:
-
- /
- .
---
## 🧮
### 2025 ()
| | | |
|------|----------|----------|
| 1~2 | 3 20 | 3 25 |
| 3~4 | 5 20 | 5 25 |
| 5~6 | 7 20 | 7 25 |
| 7~8 | 9 20 | 9 25 |
### ( )
** 1,000 **:
- : · 3%
- = 1,000 × 3% = **300,000/**
** **:
- : 910
- ( ): 550
- = 910 - 550 = **360 ** ( !)
** **: +
---
## 🎭
### 📄 "매출을 기록하세요" ...
** **:
** **:
(? ?)
?
3 ( ?)
?
3 ()
** **:
vs
//
### 📊 "경비를 정확히 기록하세요" ...
** **:
** **:
? ?
? ( )
? ( )
? ( ?)
** **:
vs
/
---
## 🔄 2025 ( )
### 2025
**📋 **:
- **2025** ( )
- : **4,8006,000**
- :
**📋 **:
- ·: 3% ( )
- /: 4% ( )
- : 1.5% ()
** **:
"기한이 바뀌었다는 것도 몰랐어"
"이건 공제가 되는 건지 안 되는 건지 모르겠어"
"매년 기준이 달라지면 내가 어떻게 알아?"
** **:
( )
D-7, D-1
---
## vs
###
1. ** ** -
2. ** ** - /
3. ** ** - 20( 25)
4. ** ** - /
###
1. ** ** -
2. ** ** -
3. ** ** -
4. ** ** -
---
## 💡 3 :
### Layer 1:
- (20 25)
-
-
"이 정도는 자신이 할 수 있습니다"
### Layer 2:
- ** **: //
- ** **: , ,
- ** **:
"기한 관리가 정말 중요"
### Layer 3:
- ( )
- ( )
- (// )
- ( )
---
## 📊
| | |
|------|------|
| | -30 |
| / ( ) | 50 |
| ( ) | 20 |
| ( 3 × 30,000) | +90 |
| ** ()** | ** 130 ** |
---
## 💡 !
**1. 20( 25) - **
**2. **
**3. **
**4. **
. , , ... .
$$,
1,
true,
NOW()
);
-- 3. 프리랜서를 위한 종합소득세 신고
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'프리랜서를 위한 종합소득세 신고 - 경비 처리의 중요성',
'freelancer-income-tax-guide',
$$
# -
, , , ...
. ** **. ** ** .
** , , .**
---
## 📌 : "김팬더" (28, 4)
** **:
- : 250
- : 3,000
- : (80%), (20%)
### ( )
"유튜브 광고 수익이 월 250만 원이니까 그냥 신고하면 되겠지"
, ,
****:
- : 3,000
- : 450
- .
### ( )
, ,
, ,
****:
- : 2,200 ( 800 )
- : 280
- 170 .
---
## 🧮 ()
### Step 1:
| | | |
|---------|-----|------|
| | 200 | 2,400 |
| | 50 | 600 |
| **** | **250** | **3,000** |
### Step 2: ( !)
:
| | | | |
|------|-----|------|------|
| / | 0 | 100 | () |
| | 6 | 72 | Adobe |
| | 5 | 60 | 100% |
| | 20 | 240 | |
| | 0 | 120 | |
| | 3 | 36 | |
| | 10 | 120 | / |
| **** | **44** | **748** |
### Step 3:
- : 3,000
- : 748
- ****: 2,252
- : 150
- ** **: 2,102
### Step 4: (2025 )
| | |
|------|------|
| 1,200 | 6% |
| 1,200~4,600 | 15% |
****:
- 1,200 × 6% = 72
- 902 × 15% = 135
- ** : 207 **
** ?**
- : 450
- 243 .
** **
---
## 🎭
### 📄 "카메라는 사업 경비다" ...
** **:
100 = 100
** **:
? ? ( )
50% ? ( 50% )
? ?
? ?
** **:
### 📊 "인터넷비는 사업 경비다" ...
** **:
5 × 12 = 60
** **:
100% ? ? ( )
? 50% ? 80% ?
? ( )
? ( )
** **:
---
## 🔄 2025 ( )
### 2025
**📋 **:
- : 150160
- :
- ** **: ,
**📋 **:
- : 5 1~31 ( )
- : 7,5008,000 ( )
**📋 **:
- : 200
- :
** **:
"새로운 공제가 있다는 것도 몰랐어"
"내가 받을 수 있는 지원이 뭔지 모르겠어"
"세법이 계속 변하면 내가 어떻게 다 알아?"
** **:
---
## vs
###
1. ** ** - , , ,
2. ** ** - 50%, 80%
3. ** 1 ** - 5
4. ** ** - 5 1~31
###
1. ** ** -
2. ** ** -
3. ** ** -
4. ** ** - ( )
---
## 💡 3 :
### Layer 1:
-
-
- (5)
"이 정도는 자신이 할 수 있습니다"
### Layer 2:
- ** **: ,
- ** **: , ,
- ** **: ,
"경비 처리에서 약 170만 원 정도의 차이가 났던 사례도 있습니다"
### Layer 3:
- (, , )
- ( )
- ( / )
- ( )
- ( )
---
## 📊
| | |
|------|------|
| | -50 |
| | 240 |
| / | 20 |
| ( 40 × 40,000) | +160 |
| ** ()** | ** 370 ** |
---
## 💡 !
**1. ( )**
**2. , , , **
**3. **
**4. **
. , , ... .
$$,
1,
true,
NOW()
);
@@ -1,677 +0,0 @@
-- V022: Apply accuracy principle (law/fact/data based) to blog posts
-- Add tax law citations, 2025 standards, data sources
-- Remove speculation, assumptions, opinions
DELETE FROM blog_posts WHERE id >= 1;
-- 1. 사업자 기장 시 자주 하는 실수 5가지
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'사업자 기장 시 자주 하는 실수 5가지 - 혼자 하기 어려운 이유',
'accounting-mistakes-5',
$$
# 5 -
"사업을 시작했는데 세금이 얼마나 될까요?"
. **"돈이 들어오고 나가는 것을 기록하는 일"** - . .
---
## 📊 : (34, 3)
** ** ( ):
- : 3
- : 600 ( 200, 400)
- : 150, 180, 100
### ( )
"너무 바빠서 영수증을 그냥 버렸어요"
****:
- 29( )
- 47()
- 70 .
### ( )
1
****:
- 29
- 47
- .
---
## 🧮 (2025 )
### Step 1:
600 × 12 = 7,200
### Step 2: ( 34 )
| | | |
|------|-----|------|
| | 150 | 1,800 |
| | 180 | 2,160 |
| | 100 | 1,200 |
| | 20 | 240 |
| **** | **450** | **5,400** |
### Step 3:
7,200 - 5,400 = **1,800 **
### Step 4: (2025 )
- : 160 (2025 , 50)
- : 1,800 - 160 = 1,640
- : 6% (2025 , )
- : 98 /
---
## 🎭
### 📄 "영수증을 정리하세요" ...
** **:
** ** ( 34 ):
** **: 34 "사업의 수행을 위해 직접 필요한 지출"
- : () vs ()
- :
** **: ,
** **: ,
** **: 163, 160 5
** **:
34
163
vs ( )
---
### 📊 "매출과 경비를 기록하세요" ...
** **:
** ** ( ):
** **: 20
-
- : ,
** **: 46, 54
** **:
** **:
46
47
---
## 🔄 2025 ( )
### 2025 ( )
**📋 ** ( 50 ):
- : 150160
- : 1 50 ( )
- : ( )
**📋 ** ( 25 ):
- : 2025 (2025)
- : 4,8006,000 ( )
- : 1 0.2% ( 47)
** **:
"작년 기준으로 기장했는데 올해 기준이 바뀐 거야?"
"이 새로운 공제가 되는 건지 안 되는 건지 모르겠어"
"부가세 신고 기한이 정확히 언제지?"
** **:
---
## vs
### ( )
1. ** ** - 163( ) 5
2. ** ** - 164( )
3. ** 1 ** - 29
4. ** ** - 46()
### ( )
1. ** ** - 163 (5 )
2. ** ** - 34 ( )
3. ** ** - 47 (1 0.2%)
4. ** ** - 46 (10%)
---
## 💡 3 :
### Layer 1:
- 29
- 163
-
### Layer 2:
- ** **: 34 ,
- ** **: 2025 ,
- ** **: ,
"국세기본법 제47조 가산세" 70 "
### Layer 3:
- 34
- 163
-
-
-
- 46
---
## 📊 (2025 )
| | |
|------|------|
| | -100 |
| 47 | +70 |
| 34 | +50 |
| ( 10 × 30,000) | +360 |
| ** ** | **+380 ** |
---
## 💡 !
**1. 29( ) **
**2. 163 5 **
**3. 34 **
**4. 2025 160 ( 50) **
**5. 47 (1 0.2%) **
. , , .
$$,
1,
true,
NOW()
);
-- 2. 이번달 부가가치세 신고
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'이번달 부가가치세 신고 - 너무 늦지 마세요! (D-day 계산)',
'vat-report-monthly-guide',
$$
# - ! (D-day )
"어? 부가가치세 신고가 오늘까지라고?"
25 ( 25 , 2025). . ** 47 !**
---
## 📌 : "편의점 톤" (28, 2)
** ** ( ):
- :
- : 1,000
- : 600, 200, 100
### ( )
"신고 기한을 깜빡했어요"
5 21
****:
- 25( ) : 5 20( 25)
- 47(): 1 0.2% = 1 6,000
- 1 6,000 .
### ( )
25
****:
- 25
- 47
- .
---
## 🧮 (2025 )
### 2025 ( 25)
| | | |
|------|----------|----------|
| 1~2 | 3 25 | 3 31 |
| 3~4 | 5 25 | 5 31 |
| 5~6 | 7 25 | 7 31 |
| 7~8 | 9 25 | 9 30 |
### ( 13 )
** 1,000 ** (2025 ):
- : · 3% ( 13)
- = 1,000 × 3% = **300,000/**
- = 300,000 - =
** **:
- : ( 910 ) - ( 550 ) = 360 ( )
- : 3% = 300,000
** **:
---
## 🎭
### 📄 "매출을 기록하세요" ...
** **:
** ** ( ):
** **: 13
** **: 15
** **: 18
** vs **: 21
**3 **: 18
** **:
13
15~18 /
21
47
### 📊 "경비를 정확히 기록하세요" ...
** **:
** ** ( ):
** **: 21
** **: 17 /
** vs **: 21
** **: 106( )
** **: 2025
** **:
21
17 /
106
---
## 🔄 2025 ( )
### 2025 ( )
**📋 ** ( 25 ):
- : **2025** (2025)
- : ( 31 30)
- : 2025 1
**📋 ** ( 21 ):
- : 4,800**6,000 **
-
**📋 ** ( 47):
- : 1 0.2% ( )
- : 10% ( 47)
** **:
"기한이 바뀌었다는 것도 몰랐어"
"이건 공제가 되는 건지 안 되는 건지 모르겠어"
"부가가치세법이 매년 바뀌면 내가 어떻게 알아?"
** **:
25
( )
2025
D-7, D-1
47
---
## vs
### ( )
1. ** ** - 21
2. ** ** - 17 /
3. ** ** - 25 (25 )
4. ** ** - 47
### ( )
1. ** ** - 47 (1 0.2%)
2. ** ** - 21
3. ** ** - 83
4. ** ** -
---
## 💡 3 :
### Layer 1:
- 25 (25)
-
-
"이 정도는 자신이 할 수 있습니다"
### Layer 2:
- ** **: 17 , 21
- ** **: 2025 (25), (6,000 )
- ** **: ,
"부가가치세법 개정 하나 놓쳤다가 하루 늦으면 6,000원 손해"
### Layer 3:
- 25
- 17
-
- 47
-
---
## 📊 (2025 )
| | |
|------|------|
| | -30 |
| 47 ( 6,000 × 12) | +72 |
| 17 | +20 |
| ( 3 × 30,000) | +90 |
| ** ()** | **+152 ** |
---
## 💡 !
**1. 25: 25 (2025 )**
**2. 47: 0.2% **
**3. 17: **
**4. 21: **
**5. 2025 : 6,000 **
. , , , ... .
$$,
1,
true,
NOW()
);
-- 3. 프리랜서를 위한 종합소득세 신고
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'프리랜서를 위한 종합소득세 신고 - 170만 원 절약하는 방법',
'freelancer-income-tax-guide',
$$
# -
, , , ...
. ** **. ** **( 20) .
** , , .**
---
## 📌 : "김팬더" (28, 4)
** ** ( ):
- : 250
- : 3,000
- : (80%), (20%)
### ( )
"유튜브 광고 수익이 월 250만 원이니까 그냥 신고하면 되겠지"
34
, ,
****:
- : 3,000
- : 160 ( 50, 2025 )
- : 450
- 34
### ( )
34 "사업의 수행을 위해 직접 필요한 지출"
, ,
, ,
34
****:
- : 2,200 ( 800 )
- : 160
- : 280
- 170 .
---
## 🧮 (2025 )
### Step 1: ( 20)
| | | |
|---------|-----|------|
| | 200 | 2,400 |
| | 50 | 600 |
| **** | **250** | **3,000** |
### Step 2: ( 34 )
( 34 "사업의 수행을 위해 직접 필요한 지출"):
| | | | |
|------|-----|------|------------|
| / | 0 | 100 | 34: |
| | 6 | 72 | 34: |
| | 5 | 60 | 34: (100%) |
| | 20 | 240 | 34: |
| | 0 | 120 | 34: |
| | 3 | 36 | 34: |
| | 10 | 120 | 34: / |
| **** | **44** | **748** | 34 |
### Step 3: ( 29)
- : 3,000 ( 20)
- : 748 ( 34)
- ****: 2,252
- : 160 ( 50, 2025 )
- ** **: 2,092
### Step 4: (2025 )
| | | |
|------|------|------|
| 1,200 | 6% | 1,200 × 6% = 72 |
| 1,200~4,600 | 15% | 892 × 15% = 134 |
| ** ** | | ** 206 ** |
** ?**
- : 450
- ** : 244 **
** 240 !** ( 34 )
---
## 🎭
### 📄 "카메라는 사업 경비다" ... ( 34)
** **:
100 = 100
** ** ( 34 ):
** ? ?**:
- : 4 ( 25 )
- :
** 50% ?**: 34 (50%)
- : /
** ? ?**: 160
-
** ?**: 21
- - = ( )
** ?**: 81 , 46 (10%)
** **:
34
160
81
### 📊 "인터넷비는 사업 경비다" ... ( 34)
** **:
5 × 12 = 60
** ** ( 34 ):
**100% ?**: 34
- : (: 80%) × 60 = 48
- : ,
** ? ?**: 34
- :
- :
** ?**: 34
-
** **: 2025
** **:
34
83
---
## 🔄 2025 ( )
### 2025 ( )
**📋 ** ( 50 ):
- : 150**160 **
- : 1 50 ( )
- : (2025)
**📋 ** ( ):
- : (, )
- :
- :
**📋 ** ( 46):
- : 5 1~31 ( )
- : 10% ( 46)
** **:
"새로운 공제가 있다는 것도 몰랐어"
"내가 받을 수 있는 특별공제가 뭔지 모르겠어"
"소득세법이 계속 변하면 내가 어떻게 다 알아?"
** **:
( 50 )
( )
---
## vs
### ( )
1. ** ** - 160 5
- , , ,
2. ** ** - 34
- 80%, 100%
3. ** 1 ** - 46
- 5 4
4. ** ** - 46
- 5 1~31
### ( )
1. ** ** - 34 ( )
2. ** ** - 34 "사업의 수행을 위해"
3. ** ** - 160 (5 )
4. ** ** - 46 (10%)
---
## 💡 3 :
### Layer 1:
- 20
- ( 34)
- ( 46)
"이 정도는 자신이 할 수 있습니다"
### Layer 2:
- ** **: 34 ,
- ** **: 2025 ,
- ** **: ,
"경비 처리만으로도 240만 원 차이가 난다" ( 34 )
### Layer 3:
- 34
- 50
- 46
- 160
- 83
---
## 📊 (2025 )
| | |
|------|-----|
| | -50 |
| 34 | +240 |
| 50 | +20 |
| ( 40 × 40,000) | +160 |
| ** ()** | **+370 ** |
---
## 💡 !
**1. 34: (240 )**
**2. 34: , , , **
**3. 50: 2025 160 **
**4. : 2025 **
**5. 46: 5 1~31 ( )**
. :
- 34
-
-
-
... **240 .**
$$,
1,
true,
NOW()
);
@@ -1,461 +0,0 @@
-- V023: Customer-friendly language update
-- Remove internal jargon (Layer 1-3, "3층 구조", etc.)
-- Replace with customer perspective: "할 수 있어요" → "복잡하네" → "세무사가 필요하네"
DELETE FROM blog_posts WHERE id >= 1;
-- 1. 사업자 기장 시 자주 하는 실수 5가지
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'사업자 기장 시 자주 하는 실수 5가지 - 혼자 하기 어려운 이유',
'accounting-mistakes-5',
$$
# 5 -
"사업을 시작했는데 세금이 얼마나 될까요?"
. **"돈이 들어오고 나가는 것을 기록하는 일"** - . .
---
## 📊 : (34, 3)
** ** ( ):
- : 3
- : 600 ( 200, 400)
- : 150, 180, 100
### ( )
"너무 바빠서 영수증을 그냥 버렸어요"
****:
- 29( )
- 47()
- 70 .
### ( )
1
****:
- 29
- 47
- .
---
## 🧮 (2025 )
### Step 1:
600 × 12 = 7,200
### Step 2:
| | | |
|------|-----|------|
| | 150 | 1,800 |
| | 180 | 2,160 |
| | 100 | 1,200 |
| | 20 | 240 |
| **** | **450** | **5,400** |
### Step 3:
7,200 - 5,400 = **1,800 **
### Step 4:
1,800 × 6% = ** 108 /**
---
## 1
** **:
-
-
-
.
---
## 2
### ...
** **:
- 29
-
- ,
-
** **:
-
- vs
-
- ( )
** **:
- (2025 )
- ( 47)
- vs
****: .
---
## 3
### vs
** **:
-
- 1
** **:
-
-
-
-
###
| | | |
|------|----------|-----------|
| **** | ( ) | ( ) |
| **** | 10 | 1 |
| **** | | |
| **** | | |
| ** ** | 0 | 100 |
| ** ** | | + |
** , .**
---
## 💡 !
**1. **
**2. **
**3. **
, .
$$,
1,
true,
NOW()
);
-- 2. 이번달 부가가치세 신고
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'이번달 부가가치세 신고 - 너무 늦지 마세요! (D-day 계산)',
'vat-report-monthly-guide',
$$
# - ! (D-day )
"어? 부가가치세 신고가 오늘까지라고?"
20 . ** .**
---
## 📌 : "편의점 톤" (28, 2)
** **:
- :
- : 1,000
- : 600, 200, 100
### ( )
"신고 기한을 깜빡했어요"
5 21
****:
- 25
- 83 : 50,000
- 50,000
### ( )
20
****:
-
-
-
---
## 🧮 (2025 )
### 2025
| | | |
|------|----------|----------|
| 1~2 | 3 20 | 3 25 |
| 3~4 | 5 20 | 5 25 |
| 5~6 | 7 20 | 7 25 |
| 7~8 | 9 20 | 9 25 |
### ( )
** 1,000 **:
- : · 3%
- = 1,000 × 3% = **300,000/**
---
## 1
** **:
- 20
-
-
.
---
## 2
### ...
** **:
- 25
- 2025
-
** **:
- 17
- vs
- /
-
** **:
- 2025 (2025?)
-
-
****: .
---
## 3
###
** **:
-
-
** **:
- ( )
-
-
###
| | | |
|------|----------|-----------|
| ** ** | | 100% |
| ** ** | | |
| ** ** | | |
| **** | (50k+) | |
| **** | 3 | 30 |
| ** ** | 0 | 30 |
** . .**
---
## 💡 !
**1. **
**2. **
**3. **
, .
$$,
1,
true,
NOW()
);
-- 3. 프리랜서를 위한 종합소득세 신고
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'프리랜서를 위한 종합소득세 신고 - 170만 원 절약하는 방법',
'freelancer-income-tax-guide',
$$
# - 170
, , , ...
. ** **. ** ** .
** , , .**
---
## 📌 : "김팬더" (28, 4)
** **:
- : 250
- : 3,000
- : (80%), (20%)
### ( )
"유튜브 광고 수익이 월 250만 원이니까 그냥 신고하면 되겠지"
, ,
****:
- : 3,000
- : 450
-
### ( )
, ,
, ,
****:
- : 2,200 ( 800 )
- : 280
- 170 .
---
## 🧮 ()
### Step 1:
| | | |
|---------|-----|------|
| | 200 | 2,400 |
| | 50 | 600 |
| **** | **250** | **3,000** |
### Step 2: ( !)
:
| | | | |
|------|-----|------|------|
| / | 0 | 100 | () |
| | 6 | 72 | Adobe |
| | 5 | 60 | 100% |
| | 20 | 240 | |
| | 0 | 120 | |
| | 3 | 36 | |
| | 10 | 120 | / |
| **** | **44** | **748** |
### Step 3:
- : 3,000
- : 748
- ****: 2,252
- : 160 (2025 )
- ** **: 2,092
### Step 4: (2025 )
| | |
|------|------|
| 1,200 | 6% |
| 1,200~4,600 | 15% |
****:
- 1,200 × 6% = 72
- 892 × 15% = 134
- ** : 206 **
** ?**
- : 450
- **: 244 **
---
## 1
** **:
-
-
- (5)
.
---
## 2
### ...
** **:
- 34()
- ?
- 50%, 50%?
- ?
- ?
** **:
- 20()
- 46() - 2025
- 50( ) -
** **:
- 2025:
- 2025: 200
-
****: .
---
## 3
###
** **:
-
-
** **:
-
-
- 2025
-
###
| | | |
|------|----------|-----------|
| ** ** | ( ) | 100% |
| **** | 450 () | 206 () |
| **** | 0 () | 244 ( ) |
| **** | 40 | 4 |
| **** | | |
| ** ** | 0 | 50 |
| ** ** | - | +194 |
** 244 .**
---
## 💡 !
**1. (244 )**
**2. , , **
**3. **
**4. **
, ** .**
$$,
1,
true,
NOW()
);
@@ -1,467 +0,0 @@
-- V024: Apply latest BLOG_TEMPLATE guidelines
-- Convert tables to readable lists
-- Simplify emojis (remove section headers like 📊, 🧮)
-- Keep customer-friendly language (1️⃣ 2️⃣ 3️⃣)
DELETE FROM blog_posts WHERE id >= 1;
-- 1. 사업자 기장 시 자주 하는 실수 5가지
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'사업자 기장 시 자주 하는 실수 5가지 - 혼자 하기 어려운 이유',
'accounting-mistakes-5',
$$
# 5 -
"사업을 시작했는데 세금이 얼마나 될까요?"
. **"돈이 들어오고 나가는 것을 기록하는 일"** - . .
---
## : (34, 3)
** ** ( ):
- : 3
- : 600 ( 200, 400)
- : 150, 180, 100
### ( )
"너무 바빠서 영수증을 그냥 버렸어요"
****:
- 29( )
- 47()
- 70 .
### ( )
1
****:
- 29
- 47
- .
---
## (2025 )
### Step 1:
600 × 12 = 7,200
### Step 2:
:
- : 150 ( 1,800 )
- : 180 ( 2,160 )
- : 100 ( 1,200 )
- : 20 ( 240 )
- ** : 450 **
- ** : 5,400 **
### Step 3:
7,200 - 5,400 = **1,800 **
### Step 4:
1,800 × 6% = ** 108 /**
---
## 1
** **:
-
-
-
.
---
## 2
### ...
** **:
- 29
-
- ,
-
** **:
-
- vs
-
- ( )
** **:
- (2025 )
- ( 47)
- vs
****: .
---
## 3
### vs
** **:
-
- 1
** **:
-
-
-
-
###
****:
- : ( )
- : ( )
****:
- : 10
- : 1
** **:
- :
- :
** **:
- :
- :
****:
- : 0
- : 100
****: , .
---
## !
**1. **
**2. **
**3. **
, .
$$,
1,
true,
NOW()
);
-- 2. 이번달 부가가치세 신고
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'이번달 부가가치세 신고 - 꼭 해야 할 일 정리',
'vat-filing-guide',
$$
# -
"부가가치세 신고가 다음 주예요. 뭘 준비해야 하나요?"
**"3개월간 벌어들인 세금을 국가에 내는 일"** - . 25 , .
---
## : (29, 2)
** ** ( ):
- : 1,500
- : 900, 150, 100
- : 3
### ( )
"신고 기한이 언제인지 몰랐어요"
****:
- 25
- ( )
- 50
### ( )
1
****:
- 25
-
- .
---
## (2025 )
### Step 1:
3 : 4,500
### Step 2:
:
- : 900 (3 2,700 )
- : 150 (3 450 )
- : 100 (3 300 )
- **3 : 3,450 **
### Step 3:
=
** **:
- ( 17)
-
- ( )
** **:
-
### Step 4:
4,500 × 10% = 450 ()
345 × 10% = 34.5 ()
****: 450 - 34.5 **415.5 **
---
## 1
** **:
-
-
-
.
---
## 2
** **:
- 25
-
-
** **:
-
- 83
-
** **:
- ?
-
-
****: .
---
## 3
### vs
** **:
-
-
** **:
- ( 17)
-
-
-
###
** **:
- :
- : 100%
** **:
- :
- :
** **:
- : (50~100 )
- :
** **:
- : 0 ( )
- : 30
****: .
---
## !
**1. **
**2. **
**3. **
.
$$,
1,
true,
NOW()
);
-- 3. 프리랜서를 위한 종합소득세 신고
INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at)
VALUES (
'프리랜서를 위한 종합소득세 신고 - 이것만 알면 충분합니다',
'freelancer-income-tax-guide',
$$
# -
"작년에 벌어들인 돈이 얼마인데, 세금을 얼마나 내야 하나요?"
**"본인이 일한 만큼 벌어들인 소득에 세금을 내는"** . 20 , 5 .
---
## : (31, 4)
** ** ( ):
- : 350
- : 4,200
- : 50, 30
### ( )
"수입은 기록했는데 경비는 안 챙겼어요"
"이 정도는 작은 금액이니까..."
****:
- 46
- 50
- 100
### ( )
****:
- 46
-
- .
---
## (2025 )
### Step 1:
350 × 12 = 4,200
### Step 2:
:
- : 50 × 12 = 600
- : 30 × 12 = 360
- (, ): 100
- ** : 1,060 **
### Step 3:
4,200 - 1,060 = **3,140 **
### Step 4:
50
: 150
****: 3,140 - 150 = 2,990
** **: 300 ~350 ( 6~15%)
---
## 1
** **:
-
-
-
.
---
## 2
** **:
- 46
-
-
-
** **:
- 50
-
-
-
** **:
- vs
-
-
****: , .
---
## 3
### vs
** **:
-
-
-
** **:
- ( 46)
-
- ( 50)
-
###
** **:
- : (100 )
- : ( )
** **:
- :
- :
** **:
- : ,
- :
** **:
- : 0
- : 100~150
****: .
---
## !
**1. **
**2. ( 46)**
**3. **
5 . .
$$,
1,
true,
NOW()
);
-552
View File
@@ -1,552 +0,0 @@
-- V025: Add 9 new blog posts with correct SQL structure
-- All posts follow BLOG_TEMPLATE.md guidelines: 3-step structure, accuracy principle, list format
DELETE FROM blog_posts WHERE id >= 4;
INSERT INTO blog_posts (title, content, slug, category_id, is_published, seo_title, seo_description, tags, created_at, updated_at) VALUES
-- 1. 프리랜서가 놓친 경비 5가지
(
'프리랜서가 놓친 경비 5가지 - 이것도 인정될까요?',
$$# 5
"프리랜서인데 경비로 인정되는 게 뭐고 안 되는 게 뭐죠?"
. 34 .
1
:
- : ,
- : ,
- :
- : ,
- : ,
.
2
?
- (: 60% )
-
?
-
- ( )
- ( )
?
- : ()
- : ( )
- : ( )
50% ?
- 2025 30~40%
- 50%
3
:
- /
-
-
-
: 34
$$,
'freelancer-expenses',
NULL,
true,
'Freelancer Expenses - Tax Deduction Guide',
'5 common expenses freelancers overlook, with tax law basis (소득세법 제34조)',
'프리랜서,경비,필요경비,소득세,세무',
NOW(),
NOW()
),
-- 2. 월세 신고하는 방법
(
'월세 신고하는 방법 - 환급받을 수 있는 금액이 있습니다',
$$#
"월세를 낼 때 세금 환급이 있다던데 정말인가요?"
592 . .
1
(2025 ):
- : 750
- : ,
- : 10% ( 75 )
( 60 ):
- : 720
- : 72
2
?
- :
- : ? ? ?
- ?
?
- vs : ?
- ? ?
- ? ?
2 ?
- 2023 2025
- ? 5
3
:
-
- vs
- /
-
: 592
$$,
'monthly-rent-tax-credit',
NULL,
true,
'Monthly Rent Tax Credit Guide',
'How to claim rental tax deduction (월세세액공제) under Income Tax Act Article 59-2',
'월세,세액공제,환급,소득세',
NOW(),
NOW()
),
-- 3. 자녀 증여세 계산하기
(
'자녀 증여세 계산하기 - 기초공제를 모르면 손해봅니다',
$$#
"자녀에게 돈을 주면 세금을 내야 하나요?"
13 . 0.
1
(2025 ):
- 1 5,000 (10)
- : 2,000 (10)
( 1, ):
- 5,000 = 0
- 6,000 = 1,000
:
- 10
- 2015 1,000 + 2025 4,000 = 500 × 10
2
10 ?
- 10
- 9 11
-
?
- 5,000
-
- ? vs
?
- 10~50% ( )
- 1,000 10%
-
3
:
-
-
-
-
: 13
$$,
'gift-tax-calculation',
NULL,
true,
'Gift Tax for Children Calculation',
'How to calculate inheritance and gift tax with basic deduction (상속세및증여세법 제13조)',
'증여세,자녀,기초공제,상속세',
NOW(),
NOW()
),
-- 4. 사업자 등록 타이밍
(
'사업자 등록 타이밍 - 너무 빨라도, 늦어도 손해입니다',
$$#
"언제 사업자등록을 해야 세금을 절약할 수 있나요?"
2 .
1
:
- 20
- (10%)
:
-
-
:
- 1 1 , 1 20 = OK
- 1 1 , 2 15 = +
2
?
- 500
- 3
-
?
- ?
- ( )
?
- : (, )
- : 100
- :
3
:
-
-
-
-
: 2
$$,
'business-registration-timing',
NULL,
true,
'Business Registration Timing Guide',
'When to register business for tax optimization (소득세법 제2조)',
'사업자등록,사업소득,세무,등록시기',
NOW(),
NOW()
),
-- 5. 소상공인 간단 기장
(
'소상공인 간단 기장 - 엑셀 + 영수증으로 충분합니다',
$$#
"복식부기는 너무 복잡한데, 정말 간편장부로 가능한가요?"
29 .
1
:
- 8,000
- ,
:
-
-
- ( )
-
:
-
-
-
2
?
- 365
-
-
?
-
- : ( % )
- ( vs )
?
-
-
-
3
:
-
-
- /
-
: 29
$$,
'small-business-bookkeeping',
NULL,
true,
'Simple Bookkeeping for Small Business',
'Easy accounting for small business owners under Income Tax Act Article 29',
'소상공인,간편장부,기장,세무',
NOW(),
NOW()
),
-- 6. 스마트스토어 판매자 세무
(
'스마트스토어 판매자 세무 - 플랫폼 수입도 세금이 필요합니다',
$$#
"온라인에서 판매한 수입도 신고해야 하나요?"
20 .
1
:
- 100 :
- 100 :
:
- ( )
- ( )
- ()
:
-
-
-
-
2
?
- :
- :
-
?
- :
- : ? ( )
-
vs ?
-
-
-
3
:
-
- /
-
-
: 20 /
$$,
'smartstore-seller-tax',
NULL,
true,
'Online Seller Tax Guide',
'Tax reporting for online marketplace sellers (소득세법 제20조)',
'스마트스토어,온라인판매,사업소득,세무',
NOW(),
NOW()
),
-- 7. 부가가치세 신고 기한
(
'부가가치세 신고 기한 - 2일만 늦어도 가산세입니다',
$$#
"부가가치세는 언제까지 신고해야 하나요?"
25 .
1
(2025):
- 1 (1~4): 5 25
- 2 (5~8): 9 25
:
- ( )
:
- 8,000 :
- 8,000 :
2
/ ?
- /
- :
-
?
-
-
-
?
- ,
-
-
3
:
-
- /
-
-
: 25
$$,
'vat-reporting-deadline',
NULL,
true,
'Value Added Tax Reporting Deadline',
'VAT filing deadline and calculation (부가가치세법 제25조)',
'부가가치세,신고기한,세무',
NOW(),
NOW()
),
-- 8. 종합소득세 신고 완벽 가이드
(
'종합소득세 신고 완벽 가이드 - 5월 신고로 연간 세금 결정됩니다',
$$#
"종합소득세는 무엇이고, 정말 모두 신고해야 하나요?"
19 .
1
:
- (, )
- ()
- ( )
- ( )
- ( )
:
- 4,000
:
- 5 31
:
-
-
-
2
?
- , ,
-
-
?
- , ,
- ( )
-
?
- 6~45% ()
-
-
3
:
-
-
-
-
: 19
$$,
'comprehensive-income-tax-guide',
NULL,
true,
'Comprehensive Income Tax Filing Guide',
'Complete guide to filing comprehensive income tax (종합소득세) (소득세법 제19조)',
'종합소득세,신고,공제,소득세',
NOW(),
NOW()
),
-- 9. 연말정산 환급 최대화
(
'연말정산 환급 최대화 - 놓친 공제 하나가 수십만 원입니다',
$$#
"연말정산으로 환금을 받으려면 뭘 꼭 챙겨야 하나요?"
163 .
1
(2025):
- : 1 150
- : + 900
- : 750
- :
- : 25 15%
:
- 200 (200-250) × 15% = 0
- 300 (300-250) × 15% = 7.5
2
?
-
- (, )
-
-
?
-
- ?
- ? ( )
?
- : ( )
- :
- :
3
:
-
-
- (, )
-
: 163
$$,
'year-end-tax-settlement',
NULL,
true,
'Year-End Tax Settlement Refund Maximization',
'How to maximize tax refund in year-end adjustment (연말정산) (소득세법 제163조)',
'연말정산,환금,공제,세액공제',
NOW(),
NOW()
);
File diff suppressed because it is too large Load Diff
@@ -1,299 +0,0 @@
-- V026: 기초 3개 포스트 추가 + 모든 12개에 카테고리 할당
-- 카테고리 배치 (각 3개씩):
-- cat 1 (사업자 세무): 사업자 기장, 소상공인, 스마트스토어
-- cat 2 (부동산 세금): 월세, 자녀 증여세
-- cat 3 (종합소득세): 프리랜서 종소세, 프리랜서 경비, 종소세 가이드
-- cat 4 (부가가치세): 부가세 신고, 부가세 기한, 사업자 등록
-- cat 5 (가족자산): 연말정산 환급
DELETE FROM blog_posts WHERE id >= 1;
INSERT INTO blog_posts (title, slug, content, category_id, is_published, seo_title, seo_description, tags, created_at, updated_at) VALUES
-- 기초 3개 포스트 (V022, V024)
('사업자 기장 시 자주 하는 실수 5가지 - 혼자 하기 어려운 이유', 'accounting-mistakes', $$# 5
"돈이 들어오고 나가는 것을 기록하는 일" , .
## (2025 )
### Step 1:
600 × 12 = 7,200
### Step 2:
- : 150 ( 1,800 )
- : 180 ( 2,160 )
- : 100 ( 1,200 )
- : 20 ( 240 )
- : 450 / : 5,400
### Step 3:
7,200 - 5,400 = 1,800
### Step 4: (2025 )
- : 160
- : 1,640
- : 6%
- : 98 /
##
### 1.
:
: 34
### 2.
:
: , ,
### 3.
:
: , , ,
## vs
###
1. - 5
2. - 164
3. 1 -
4. - 46
###
1. -
2. -
3. -
4. -
##
, , , .$$, 1, true, 'SEO Title', 'SEO Description', '사업자,기장,세무', NOW(), NOW()),
('이번달 부가가치세 신고 - 너무 늦지 마세요! (D-day 계산)', 'vat-report-guide', $$# - D-day
. 25 25(2025 ). 47 !
## 2025
| | | |
|------|----------|----------|
| 1~2 | 3 25 | 3 31 |
| 3~4 | 5 25 | 5 31 |
| 5~6 | 7 25 | 7 31 |
| 7~8 | 9 25 | 9 30 |
## ( )
1,000 :
- : · 3%
- = 1,000 × 3% = 300,000/
##
-
-
-
- vs
- 3
.$$, 4, true, 'SEO Title', 'SEO Description', '부가가치세,신고,세금', NOW(), NOW()),
('프리랜서를 위한 종합소득세 신고 - 정확한 경비 처리 가이드', 'freelancer-tax-guide', $$#
, , , ... . ( 20).
## : ( 250 )
###
- : 3,000
- : 160
- : 450
### ( )
- : 2,200 ( 800 )
- : 160
- : 280
- **: 170 **
## (2025)
###
| | |
|---------|------|
| | 2,400 |
| | 600 |
| | 3,000 |
### ( 34 )
| | |
|------|------|
| / | 100 |
| | 72 |
| | 60 |
| | 240 |
| | 120 |
| | 36 |
| | 120 |
| | 748 |
###
- : 3,000
- : 748
- : 2,252
- : 160
- : 2,092
##
1. ? ( 34)
2. (2025 160)
3. ?
4.
.$$, 3, true, 'SEO Title', 'SEO Description', '종합소득세,프리랜서,경비', NOW(), NOW()),
-- 추가 9개 포스트 (V025) - category_id 할당
('프리랜서가 놓친 경비 5가지 - 이것도 인정될까요?', 'freelancer-expenses-5', $$# 5
:
- : ,
- : ,
- :
- :
- :
"필요경비" . 34 .$$, 3, true, 'SEO Title', 'SEO Description', '프리랜서,경비', NOW(), NOW()),
('월세 신고하는 방법 - 환급받을 수 있는 금액이 있습니다', 'monthly-rent-deduction', $$#
592 .
## (2025 )
- : 750
- : ,
- : 10% ( 75 )
: 60
- : 720
- : 72
!$$, 2, true, 'SEO Title', 'SEO Description', '월세,세액공제', NOW(), NOW()),
('자녀 증여세 계산하기 - 기초공제를 모르면 손해봅니다', 'child-gift-tax', $$#
13 .
## (2025 )
- : 1
- :
##
- ( )
-
-
.$$, 2, true, 'SEO Title', 'SEO Description', '증여세,상속세', NOW(), NOW()),
('사업자 등록 타이밍 - 너무 빨라도, 늦어도 손해입니다', 'business-registration-timing', $$#
2 .
##
-
-
-
## ?
- :
- :
.$$, 4, true, 'SEO Title', 'SEO Description', '사업자등록', NOW(), NOW()),
('소상공인 간단 기장 - 엑셀 + 영수증으로 충분합니다', 'small-business-accounting', $$#
29 .
##
- /
-
- 1
##
-
-
-
-
.$$, 1, true, 'SEO Title', 'SEO Description', '소상공인,기장', NOW(), NOW()),
('스마트스토어 판매자 세무 - 플랫폼 수입도 세금이 필요합니다', 'smartstore-tax', $$#
.
##
-
- 20
- 300
##
-
-
-
-
.$$, 1, true, 'SEO Title', 'SEO Description', '스마트스토어,세무', NOW(), NOW()),
('부가가치세 신고 기한 - 2일만 늦어도 가산세입니다', 'vat-deadline', $$#
25: 25(2025 ).
##
- 47: 1 0.2%
-
##
-
-
-
.$$, 4, true, 'SEO Title', 'SEO Description', '부가가치세,기한', NOW(), NOW()),
('종합소득세 신고 완벽 가이드 - 5월 신고로 연간 세금이 결정됩니다', 'income-tax-complete-guide', $$#
19: 5.
##
-
- 300
-
##
-
-
-
##
1.
2.
3.
4.
5.
.$$, 3, true, 'SEO Title', 'SEO Description', '종합소득세,신고', NOW(), NOW()),
('연말정산 환급 최대화 - 놓친 공제 하나가 수십만 원입니다', 'year-end-settlement-tips', $$#
163: 2.
##
- : ( 900 )
- : 3%
- : 25%
- :
##
-
-
-
- 2
.$$, 5, true, 'SEO Title', 'SEO Description', '연말정산,환급', NOW(), NOW());
+1 -6
View File
@@ -1,11 +1,6 @@
#!/bin/bash
set -e
if [ "${TAXBAIK_DEPLOY_FROM_CI:-}" != "1" ]; then
echo "❌ This deployment script may only be run from CI." >&2
exit 1
fi
DEPLOY_HOME="/home/kjh2064"
WEB_TIMESTAMP=$(date +%Y%m%d_%H%M%S)
@@ -43,4 +38,4 @@ ps aux | grep TaxBaik.Web | grep -v grep && echo "✓ Web started" || echo "✗
echo ""
echo "===== ✅ 배포 완료 ====="
cat "$DEPLOY_HOME/taxbaik_active/wwwroot/version.json" 2>/dev/null || echo "Version file not found"
cat "$DEPLOY_HOME/taxbaik_active/wwwroot/version.txt" 2>/dev/null || echo "Version file not found"
-138
View File
@@ -1,138 +0,0 @@
# 1. TaxBaik 홈페이지 (taxbaik.com, www.taxbaik.com)
server {
server_name taxbaik.com www.taxbaik.com;
client_max_body_size 512M;
# /admin 하위 요청을 /taxbaik/admin 으로 리다이렉트하여 Blazor Base Path 대응
location /admin {
return 301 $scheme://$host/taxbaik$request_uri;
}
# 루트 경로 요청을 /taxbaik 으로 프록싱하여 base href /taxbaik/ 에 대응
location / {
proxy_pass http://127.0.0.1:5001/taxbaik/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# /taxbaik/ 하위로 들어오는 리소스 및 페이지 요청 처리
location /taxbaik {
proxy_pass http://127.0.0.1:5001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 120s;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/taxbaik.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/taxbaik.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# 2. Gitea (gitea.taxbaik.com)
server {
server_name gitea.taxbaik.com;
client_max_body_size 512M;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/taxbaik.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/taxbaik.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# 3. QuantEngine (quant.taxbaik.com)
server {
server_name quant.taxbaik.com;
location / {
proxy_pass http://127.0.0.1:5000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/taxbaik.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/taxbaik.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.taxbaik.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = taxbaik.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name taxbaik.com www.taxbaik.com;
return 404; # managed by Certbot
}
server {
if ($host = gitea.taxbaik.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name gitea.taxbaik.com;
return 404; # managed by Certbot
}
server {
if ($host = quant.taxbaik.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name quant.taxbaik.com;
return 404; # managed by Certbot
}
-22
View File
@@ -1,22 +0,0 @@
[Unit]
Description=TaxBaik Local TCP Proxy (5001 -> active blue/green port)
After=network.target
[Service]
Type=simple
User=kjh2064
WorkingDirectory=/home/kjh2064/taxbaik_active
ExecStart=/usr/bin/dotnet TaxBaik.Proxy.dll
Restart=always
RestartSec=3
# Proxy는 백엔드 포트(5003/5004) 전환 중에도 살아 있어야 한다.
TimeoutStopSec=15
KillMode=mixed
KillSignal=SIGTERM
SyslogIdentifier=taxbaik-proxy
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target
+2 -2
View File
@@ -1,5 +1,5 @@
[Unit]
Description=TaxBaik Backend App (.NET 10)
Description=TaxBaik Website and Admin (.NET 10)
After=network.target
[Service]
@@ -17,7 +17,7 @@ KillSignal=SIGTERM
SyslogIdentifier=taxbaik
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=ASPNETCORE_URLS=http://127.0.0.1:5004
Environment=ASPNETCORE_URLS=http://127.0.0.1:5001
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
# 아래 줄은 서버에서 직접 편집 (git에 커밋하지 않음)
# Environment=ConnectionStrings__Default=Host=localhost;Database=taxbaikdb;Username=taxbaik;Password=CHANGE_ME

Some files were not shown because too many files have changed in this diff Show More