feat(merchant): extract merchant portal as first-class frontend with auth, Tailwind fixes, and Gitea CI
Some checks failed
Some checks failed
- Extract login/dashboard from billing module into core (matching admin pattern) - Add merchant auth API with path-isolated cookies (path=/merchants) - Add merchant base layout with sidebar/header partials and Alpine.js init - Add frontend detection and login redirect for MERCHANT type - Wire merchant token in shared api-client.js (get/clear) - Migrate billing templates to merchant base with dark mode support - Fix Tailwind: rename shop→storefront in sources and config - DRY Makefile tailwind targets with TAILWIND_FRONTENDS loop - Rebuild all Tailwind outputs (production minified) - Add Gitea Actions CI workflow (ruff, pytest, architecture, docs) - Add Gitea deployment documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,7 @@ class FrontendDetector:
|
||||
"/api/v1/shop", # Legacy support
|
||||
"/stores/", # Path-based store access
|
||||
)
|
||||
MERCHANT_PATH_PREFIXES = ("/merchants", "/api/v1/merchants")
|
||||
PLATFORM_PATH_PREFIXES = ("/api/v1/platform",)
|
||||
|
||||
@classmethod
|
||||
@@ -94,6 +95,10 @@ class FrontendDetector:
|
||||
logger.debug("[FRONTEND_DETECTOR] Detected ADMIN from path")
|
||||
return FrontendType.ADMIN
|
||||
|
||||
if cls._matches_any(path, cls.MERCHANT_PATH_PREFIXES):
|
||||
logger.debug("[FRONTEND_DETECTOR] Detected MERCHANT from path")
|
||||
return FrontendType.MERCHANT
|
||||
|
||||
# Check storefront BEFORE store since /api/v1/storefront starts with /api/v1/store
|
||||
if cls._matches_any(path, cls.STOREFRONT_PATH_PREFIXES):
|
||||
logger.debug("[FRONTEND_DETECTOR] Detected STOREFRONT from path")
|
||||
|
||||
Reference in New Issue
Block a user