# app/api/v1/storefront/__init__.py """ Storefront API router aggregation. This module aggregates all storefront-related JSON API endpoints (public facing). Uses vendor context from middleware - no vendor_id in URLs. Endpoints: - Products: Browse catalog, search products - Cart: Shopping cart operations (session-based) - Orders: Order placement and history (requires auth) - Auth: Customer login, registration, password reset - Content Pages: CMS pages (about, faq, etc.) Authentication: - Products, Cart, Content Pages: No auth required - Orders: Requires customer authentication (get_current_customer_api) - Auth: Public (login, register) Note: Previously named "shop", renamed to "storefront" as not all platforms sell items - storefront is a more accurate term for the customer-facing interface. """ from fastapi import APIRouter # Import storefront routers from . import addresses, auth, carts, messages, orders, products, profile # CMS module router from app.modules.cms.routes.api.storefront import router as cms_storefront_router # Create storefront router router = APIRouter() # ============================================================================ # STOREFRONT API ROUTES (All vendor-context aware via middleware) # ============================================================================ # Addresses (authenticated) router.include_router(addresses.router, tags=["storefront-addresses"]) # Authentication (public) router.include_router(auth.router, tags=["storefront-auth"]) # Products (public) router.include_router(products.router, tags=["storefront-products"]) # Shopping cart (public - session based) router.include_router(carts.router, tags=["storefront-cart"]) # Orders (authenticated) router.include_router(orders.router, tags=["storefront-orders"]) # Messages (authenticated) router.include_router(messages.router, tags=["storefront-messages"]) # Profile (authenticated) router.include_router(profile.router, tags=["storefront-profile"]) # CMS module router (self-contained module) router.include_router( cms_storefront_router, prefix="/content-pages", tags=["storefront-content-pages"] ) __all__ = ["router"]