feat(modules): create cart, catalog, and checkout e-commerce modules
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>
This commit is contained in:
25
app/modules/cart/definition.py
Normal file
25
app/modules/cart/definition.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# app/modules/cart/definition.py
|
||||
"""
|
||||
Cart module definition.
|
||||
|
||||
This module provides shopping cart functionality for customer storefronts.
|
||||
It is session-based and does not require customer authentication.
|
||||
"""
|
||||
|
||||
from app.modules.core.module_registry import ModuleDefinition
|
||||
|
||||
module = ModuleDefinition(
|
||||
code="cart",
|
||||
name="Shopping Cart",
|
||||
description="Session-based shopping cart for storefronts",
|
||||
version="1.0.0",
|
||||
is_self_contained=True,
|
||||
dependencies=["inventory"], # Checks inventory availability
|
||||
provides_models=True,
|
||||
provides_schemas=True,
|
||||
provides_services=True,
|
||||
provides_api_routes=True,
|
||||
provides_page_routes=False,
|
||||
provides_admin_ui=False,
|
||||
provides_vendor_ui=False,
|
||||
)
|
||||
Reference in New Issue
Block a user