Files
orion/app/api/main.py
Samir Boulahtit fb8cb14506 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>
2026-02-02 18:49:39 +01:00

54 lines
2.1 KiB
Python

# app/api/main.py
"""
API router configuration for multi-tenant ecommerce platform.
This module provides:
- API version 1 route aggregation
- Route organization by user type (admin, vendor, storefront)
- Auto-discovery of module routes
"""
from fastapi import APIRouter
from app.api.v1 import admin, platform, storefront, vendor, webhooks
api_router = APIRouter()
# ============================================================================
# ADMIN ROUTES (Platform-level management)
# Prefix: /api/v1/admin
# ============================================================================
api_router.include_router(admin.router, prefix="/v1/admin", tags=["admin"])
# ============================================================================
# VENDOR ROUTES (Vendor-scoped operations)
# Prefix: /api/v1/vendor
# ============================================================================
api_router.include_router(vendor.router, prefix="/v1/vendor", tags=["vendor"])
# ============================================================================
# STOREFRONT ROUTES (Public customer-facing API)
# Prefix: /api/v1/storefront
# Note: Previously /api/v1/shop, renamed as not all platforms sell items
# ============================================================================
api_router.include_router(storefront.router, prefix="/v1/storefront", tags=["storefront"])
# ============================================================================
# PLATFORM ROUTES (Unauthenticated endpoints)
# Prefix: /api/v1/platform
# Includes: /signup, /pricing, /letzshop-vendors, /language
# ============================================================================
api_router.include_router(platform.router, prefix="/v1/platform", tags=["platform"])
# ============================================================================
# WEBHOOK ROUTES (External service callbacks via auto-discovery)
# Prefix: /api/v1/webhooks
# Includes: /stripe
# ============================================================================
api_router.include_router(webhooks.router, prefix="/v1/webhooks", tags=["webhooks"])