Phase 3 of storefront restructure plan - create dedicated modules for e-commerce functionality: - cart: Shopping cart management with storefront API routes - CartItem model with cents-based pricing - CartService for cart operations - Storefront routes for cart CRUD operations - catalog: Product catalog browsing for customers - CatalogService for public product queries - Storefront routes for product listing/search/details - checkout: Order creation from cart (placeholder) - CheckoutService stub for future cart-to-order conversion - Schemas for checkout flow These modules separate e-commerce concerns from core platform concerns (customer auth), enabling non-commerce platforms. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
18 lines
515 B
Python
18 lines
515 B
Python
# app/modules/checkout/definition.py
|
|
"""Checkout module definition."""
|
|
|
|
from app.modules.base import ModuleDefinition
|
|
|
|
module = ModuleDefinition(
|
|
code="checkout",
|
|
name="Checkout",
|
|
description="Checkout and order creation for storefronts",
|
|
version="1.0.0",
|
|
is_self_contained=True,
|
|
dependencies=["cart", "orders", "payments", "customers"],
|
|
provides_models=False, # Uses Order model from orders module
|
|
provides_schemas=True,
|
|
provides_services=True,
|
|
provides_api_routes=True,
|
|
)
|