Backend: - Add dashboard API (today stats, inbox count, law alerts, pipeline status) - Add /api/documents/tree endpoint for sidebar domain/sub_group tree - Migrate auth to HttpOnly cookie for refresh token (XSS defense) - Add /api/auth/logout endpoint (cookie cleanup) - Register dashboard router in main.py Frontend (SvelteKit + Tailwind CSS v4): - api.ts: fetch wrapper with refresh queue pattern, 401 single retry, forced logout on refresh failure - Auth store: login/logout/refresh with memory-based access token - UI store: toast system, sidebar state - Login page with TOTP support - Dashboard with 4 stat widgets + recent documents - Document list with hybrid search (debounce, URL query state, mode select) - Document detail with format-aware viewer (markdown/PDF/HWP/Synology/fallback) - Metadata panel (AI summary, tags, processing history) - Inbox triage UI (batch select, confirm dialog, domain override) - Settings page (password change, TOTP status) Infrastructure: - Enable frontend service in docker-compose - Caddy path routing (/api/* → fastapi, / → frontend) + gzip Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
680 B
Caddyfile
36 lines
680 B
Caddyfile
pkm.hyungi.net {
|
|
encode gzip
|
|
|
|
# API + 문서 → FastAPI
|
|
handle /api/* {
|
|
reverse_proxy fastapi:8000
|
|
}
|
|
handle /docs {
|
|
reverse_proxy fastapi:8000
|
|
}
|
|
handle /openapi.json {
|
|
reverse_proxy fastapi:8000
|
|
}
|
|
handle /health {
|
|
reverse_proxy fastapi:8000
|
|
}
|
|
handle /setup {
|
|
reverse_proxy fastapi:8000
|
|
}
|
|
|
|
# 프론트엔드
|
|
handle {
|
|
reverse_proxy frontend:3000
|
|
}
|
|
}
|
|
|
|
# Synology Office 프록시
|
|
office.hyungi.net {
|
|
reverse_proxy https://ds1525.hyungi.net:5001 {
|
|
header_up Host {upstream_hostport}
|
|
transport http {
|
|
tls_insecure_skip_verify
|
|
}
|
|
}
|
|
}
|