Major improvements to shop URL routing and vendor landing page system:
## Landing Page System
- Add template field to ContentPage model for flexible landing page designs
- Create 4 landing page templates: default, minimal, modern, and full
- Implement smart root handler to serve landing pages or redirect to shop
- Add create_landing_page.py script for easy landing page management
- Support both domain/subdomain and path-based vendor access
- Add comprehensive landing page documentation
## Route Fixes
- Fix duplicate /shop prefix in shop_pages.py routes
- Correct product detail page routing (was /shop/shop/products/{id})
- Update all shop routes to work with router prefix mounting
- Remove unused public vendor endpoints (/api/v1/public/vendors)
## Template Link Corrections
- Fix all shop template links to include /shop/ prefix
- Update breadcrumb 'Home' links to point to vendor root (landing page)
- Update header navigation 'Home' link to point to vendor root
- Correct CMS page links in footer navigation
- Fix account, cart, and error page navigation links
## Navigation Architecture
- Establish two-tier navigation: landing page (/) and shop (/shop/)
- Document complete navigation flow and URL hierarchy
- Support for vendors with or without landing pages (auto-redirect fallback)
- Consistent breadcrumb and header navigation behavior
## Documentation
- Add vendor-landing-pages.md feature documentation
- Add navigation-flow.md with complete URL hierarchy
- Update shop architecture docs with error handling section
- Add orphaned docs to mkdocs.yml navigation
- Document multi-access routing patterns
## Database
- Migration f68d8da5315a: add template field to content_pages table
- Support template values: default, minimal, modern, full
This establishes a complete landing page system allowing vendors to have
custom marketing homepages separate from their e-commerce shop, with
flexible template options and proper navigation hierarchy.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
49 lines
1.3 KiB
Python
49 lines
1.3 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, shop)
|
|
- Proper route prefixing and tagging
|
|
"""
|
|
|
|
from fastapi import APIRouter
|
|
from app.api.v1 import admin, vendor, shop
|
|
|
|
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"]
|
|
)
|
|
|
|
# ============================================================================
|
|
# SHOP ROUTES (Public shop frontend API)
|
|
# Prefix: /api/v1/shop
|
|
# ============================================================================
|
|
|
|
api_router.include_router(
|
|
shop.router,
|
|
prefix="/v1/shop",
|
|
tags=["shop"]
|
|
)
|
|
|