Files
orion/app/api/main.py
Samir Boulahtit 3e86d4b58b refactor: rename shop to storefront throughout codebase
Rename "shop" to "storefront" as not all platforms sell items -
storefront is a more accurate term for the customer-facing interface.

Changes:
- Rename app/api/v1/shop/ → app/api/v1/storefront/
- Rename app/routes/shop_pages.py → app/routes/storefront_pages.py
- Rename app/modules/cms/routes/api/shop.py → storefront.py
- Rename tests/integration/api/v1/shop/ → storefront/
- Update API prefix from /api/v1/shop to /api/v1/storefront
- Update route tags from shop-* to storefront-*
- Rename get_shop_context() → get_storefront_context()
- Update architecture rules to reference storefront paths
- Update all test API endpoint paths

This is Phase 2 of the storefront module restructure plan.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 22:42:01 +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)
- Proper route prefixing and tagging
"""
from fastapi import APIRouter
from app.api.v1 import admin, platform, storefront, vendor
from app.api.v1.shared import language, 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 (Public marketing and signup)
# Prefix: /api/v1/platform
# ============================================================================
api_router.include_router(platform.router, prefix="/v1/platform", tags=["platform"])
# ============================================================================
# SHARED ROUTES (Cross-context utilities)
# Prefix: /api/v1
# ============================================================================
api_router.include_router(language.router, prefix="/v1", tags=["language"])
api_router.include_router(webhooks.router, prefix="/v1", tags=["webhooks"])