major refactoring adding vendor and customer features
This commit is contained in:
@@ -1,22 +1,48 @@
|
||||
# app/api/main.py
|
||||
"""Summary description ....
|
||||
"""
|
||||
API router configuration for multi-tenant ecommerce platform.
|
||||
|
||||
This module provides classes and functions for:
|
||||
- ....
|
||||
- ....
|
||||
- ....
|
||||
This module provides:
|
||||
- API version 1 route aggregation
|
||||
- Route organization by user type (admin, vendor, public)
|
||||
- Proper route prefixing and tagging
|
||||
"""
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from app.api.v1 import admin, auth, marketplace, vendor, stats, stock
|
||||
from app.api.v1 import admin, vendor, public
|
||||
|
||||
api_router = APIRouter()
|
||||
|
||||
# Include all route modules
|
||||
api_router.include_router(admin.router, tags=["admin"])
|
||||
api_router.include_router(auth.router, tags=["authentication"])
|
||||
api_router.include_router(marketplace.router, tags=["marketplace"])
|
||||
api_router.include_router(vendor.router, tags=["vendor"])
|
||||
api_router.include_router(stats.router, tags=["statistics"])
|
||||
api_router.include_router(stock.router, tags=["stock"])
|
||||
# ============================================================================
|
||||
# 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"]
|
||||
)
|
||||
|
||||
# ============================================================================
|
||||
# PUBLIC/CUSTOMER ROUTES (Customer-facing)
|
||||
# Prefix: /api/v1/public
|
||||
# ============================================================================
|
||||
|
||||
api_router.include_router(
|
||||
public.router,
|
||||
prefix="/v1/public",
|
||||
tags=["public"]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user