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:
2026-02-02 18:49:39 +01:00
parent 967f08e4ba
commit fb8cb14506
44 changed files with 980 additions and 327 deletions

View File

@@ -183,9 +183,9 @@ def _discover_routes_in_dir(
"pages_prefix": "/storefront",
"include_in_schema": True if route_type == "api" else False,
},
"public": {
"api_prefix": "/api/v1/public",
"pages_prefix": "/public",
"platform": {
"api_prefix": "/api/v1/platform",
"pages_prefix": "/platform",
"include_in_schema": True,
},
"webhooks": {
@@ -335,16 +335,16 @@ def get_storefront_api_routes() -> list[RouteInfo]:
return sorted(routes, key=lambda r: r.priority)
def get_public_api_routes() -> list[RouteInfo]:
def get_platform_api_routes() -> list[RouteInfo]:
"""
Get public API routes from modules, sorted by priority.
Get platform API routes from modules, sorted by priority.
Public routes are unauthenticated endpoints for marketing pages,
Platform routes are unauthenticated endpoints for marketing pages,
pricing info, and other public-facing features.
"""
routes = [
r for r in discover_module_routes()
if r.route_type == "api" and r.frontend == "public"
if r.route_type == "api" and r.frontend == "platform"
]
return sorted(routes, key=lambda r: r.priority)
@@ -363,11 +363,11 @@ def get_webhooks_api_routes() -> list[RouteInfo]:
return sorted(routes, key=lambda r: r.priority)
def get_public_page_routes() -> list[RouteInfo]:
def get_platform_page_routes() -> list[RouteInfo]:
"""
Get public (marketing) page routes from modules, sorted by priority.
Get platform (marketing) page routes from modules, sorted by priority.
Public pages are unauthenticated marketing pages like:
Platform pages are unauthenticated marketing pages like:
- Homepage (/)
- Pricing (/pricing)
- Signup (/signup)
@@ -379,7 +379,7 @@ def get_public_page_routes() -> list[RouteInfo]:
"""
routes = [
r for r in discover_module_routes()
if r.route_type == "pages" and r.frontend == "public"
if r.route_type == "pages" and r.frontend == "platform"
]
return sorted(routes, key=lambda r: r.priority)
@@ -414,8 +414,8 @@ __all__ = [
"get_admin_api_routes",
"get_vendor_api_routes",
"get_storefront_api_routes",
"get_public_api_routes",
"get_platform_api_routes",
"get_webhooks_api_routes",
"get_public_page_routes",
"get_platform_page_routes",
"get_storefront_page_routes",
]