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:
@@ -1,11 +1,11 @@
|
||||
# app/modules/billing/routes/api/public.py
|
||||
# app/modules/billing/routes/api/platform.py
|
||||
"""
|
||||
Public pricing API endpoints.
|
||||
Platform pricing API endpoints.
|
||||
|
||||
Provides subscription tier and add-on product information
|
||||
for the marketing homepage and signup flow.
|
||||
|
||||
All endpoints are public (no authentication required).
|
||||
All endpoints are unauthenticated (no authentication required).
|
||||
"""
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# app/modules/billing/routes/pages/public.py
|
||||
# app/modules/billing/routes/pages/platform.py
|
||||
"""
|
||||
Billing Public Page Routes (HTML rendering).
|
||||
Billing Platform Page Routes (HTML rendering).
|
||||
|
||||
Public (unauthenticated) pages for pricing and signup:
|
||||
Platform (unauthenticated) pages for pricing and signup:
|
||||
- Pricing page
|
||||
- Signup wizard
|
||||
- Signup success
|
||||
@@ -14,7 +14,7 @@ from sqlalchemy.orm import Session
|
||||
|
||||
from app.core.database import get_db
|
||||
from app.modules.billing.models import TIER_LIMITS, TierCode
|
||||
from app.modules.core.utils.page_context import get_public_context
|
||||
from app.modules.core.utils.page_context import get_platform_context
|
||||
from app.templates_config import templates
|
||||
|
||||
router = APIRouter()
|
||||
@@ -57,12 +57,12 @@ async def pricing_page(
|
||||
"""
|
||||
Standalone pricing page with detailed tier comparison.
|
||||
"""
|
||||
context = get_public_context(request, db)
|
||||
context = get_platform_context(request, db)
|
||||
context["tiers"] = _get_tiers_data()
|
||||
context["page_title"] = "Pricing"
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"billing/public/pricing.html",
|
||||
"billing/platform/pricing.html",
|
||||
context,
|
||||
)
|
||||
|
||||
@@ -86,14 +86,14 @@ async def signup_page(
|
||||
- tier: Pre-selected tier code
|
||||
- annual: Pre-select annual billing
|
||||
"""
|
||||
context = get_public_context(request, db)
|
||||
context = get_platform_context(request, db)
|
||||
context["page_title"] = "Start Your Free Trial"
|
||||
context["selected_tier"] = tier
|
||||
context["is_annual"] = annual
|
||||
context["tiers"] = _get_tiers_data()
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"billing/public/signup.html",
|
||||
"billing/platform/signup.html",
|
||||
context,
|
||||
)
|
||||
|
||||
@@ -111,11 +111,11 @@ async def signup_success_page(
|
||||
|
||||
Shown after successful account creation.
|
||||
"""
|
||||
context = get_public_context(request, db)
|
||||
context = get_platform_context(request, db)
|
||||
context["page_title"] = "Welcome to Wizamart!"
|
||||
context["vendor_code"] = vendor_code
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"billing/public/signup-success.html",
|
||||
"billing/platform/signup-success.html",
|
||||
context,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user