Commit Graph

1 Commits

Author SHA1 Message Date
kjh2064 da8657765f fix: UNIFIED_SERVICE_INTEGRATION - Correct Single Domain Architecture
CORRECTION: Same Domain Integration (Not Subdomain)

User Question: 통합됐다는데 도메인이 왜 다른거야? (Why different domains if integrated?)

Issue: Previous design used separate subdomains
- Frontend: kartsell.taxbaik.com
- API: api.kartsell.taxbaik.com
Problem: Not truly unified

Solution: Single Domain Integration
- kartsell.taxbaik.com/
  ├─ / → Frontend (Vue app)
  └─ /api/ → Backend API (Nginx proxy)

Architecture:

┌────────────────────────────────────────┐
│  kartsell.taxbaik.com (Single Domain)  │
├────────────────────────────────────────┤
│  Nginx (HTTPS, Port 443)               │
│  ├─ / → Frontend (Vue)                 │
│  └─ /api/ → Backend (.NET 5002)        │
└────────────────────────────────────────┘
         ↓
    PostgreSQL DB

Nginx Configuration:

location / {
  root /var/www/kartsell/frontend;
  try_files $uri /index.html;  # SPA routing
}

location /api/ {
  proxy_pass http://localhost:5002/;
  # Headers, buffering, etc.
}

Frontend Code: No changes needed
- Uses relative paths: /api/...
- Nginx handles proxy transparently
- Same domain = no CORS issues

Benefits:

 Single domain: kartsell.taxbaik.com
 Unified service: Users see one website
 No CORS: Same-origin requests
 Industry standard: Nginx reverse proxy pattern
 Professional: Clean architecture

Deployment Flow:

1. Build frontend: pnpm build
2. Deploy: /var/www/kartsell/frontend/dist/*
3. Deploy backend: dotnet publish
4. Configure Nginx: See config in doc
5. Reload: sudo systemctl reload nginx

Status: TRULY UNIFIED SINGLE DOMAIN SERVICE

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-04 15:49:50 +09:00