refactor: rename public routes and templates to platform
Complete the public -> platform naming migration across the codebase. This aligns with the naming convention where "platform" refers to the marketing/public-facing pages of the platform itself. Changes: - Update all imports from public to platform modules - Update template references from public/ to platform/ - Update route registrations to use platform prefix - Update documentation to reflect new naming - Update test files for platform API endpoints Files affected: - app/api/main.py - router imports - app/modules/*/routes/*/platform.py - route definitions - app/modules/*/templates/*/platform/ - template files - app/modules/routes.py - route discovery - docs/* - documentation updates - tests/integration/api/v1/platform/ - test files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
18
main.py
18
main.py
@@ -64,7 +64,7 @@ from app.exceptions.handler import setup_exception_handlers
|
||||
# Module route auto-discovery - all page routes now come from modules
|
||||
from app.modules.routes import (
|
||||
get_admin_page_routes,
|
||||
get_public_page_routes,
|
||||
get_platform_page_routes,
|
||||
get_storefront_page_routes,
|
||||
get_vendor_page_routes,
|
||||
)
|
||||
@@ -323,18 +323,18 @@ logger.info("ROUTE REGISTRATION (AUTO-DISCOVERY)")
|
||||
logger.info("=" * 80)
|
||||
|
||||
# =============================================================================
|
||||
# PUBLIC PAGES (Marketing pages - homepage, pricing, signup, etc.)
|
||||
# PLATFORM PAGES (Marketing pages - homepage, pricing, signup, etc.)
|
||||
# =============================================================================
|
||||
# Public pages are served at root level (/) for platform marketing
|
||||
logger.info("Auto-discovering public (marketing) page routes...")
|
||||
public_page_routes = get_public_page_routes()
|
||||
logger.info(f" Found {len(public_page_routes)} public page route modules")
|
||||
# Platform pages are served at root level (/) for platform marketing
|
||||
logger.info("Auto-discovering platform (marketing) page routes...")
|
||||
platform_page_routes = get_platform_page_routes()
|
||||
logger.info(f" Found {len(platform_page_routes)} platform page route modules")
|
||||
|
||||
for route_info in public_page_routes:
|
||||
logger.info(f" Registering {route_info.module_code} public pages (priority={route_info.priority})")
|
||||
for route_info in platform_page_routes:
|
||||
logger.info(f" Registering {route_info.module_code} platform pages (priority={route_info.priority})")
|
||||
app.include_router(
|
||||
route_info.router,
|
||||
prefix="", # Public pages at root
|
||||
prefix="", # Platform pages at root
|
||||
tags=route_info.tags,
|
||||
include_in_schema=route_info.include_in_schema,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user