"""최상위 URL — 프론트 VITE_API_BASE_URL(/api/v1) 아래에 매닮.""" from django.conf import settings from django.contrib import admin from django.http import JsonResponse from django.urls import include, path from apps.accounts.views import MeView from common.envelope import envelope def health(_request): return JsonResponse( envelope(success=True, status_code=200, data={"app": settings.APP_NAME, "version": settings.APP_VERSION}) ) urlpatterns = [ path("admin/", admin.site.urls), path("api/v1/health", health), path("api/v1/auth/", include("apps.accounts.urls")), path("api/v1/users/me", MeView.as_view()), path("api/v1/chat/", include("apps.chat.urls")), path("api/v1/admin/", include("apps.stats.urls")), # 관리자 대시보드 집계 path("api/v1/snippets", include("apps.snippets.urls")), # 공용 스니펫(PostgreSQL). 슬래시 없이 — 프론트가 /snippets 로 침 path("", include("apps.gateway.urls")), # /api/ito/* — 사내 LLM(FabriX) 중계 ]