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:
2026-01-29 22:53:35 +01:00
parent 3e86d4b58b
commit 0845555413
32 changed files with 1748 additions and 3 deletions

View File

@@ -0,0 +1,17 @@
# app/modules/catalog/definition.py
"""Catalog module definition."""
from app.modules.base import ModuleDefinition
module = ModuleDefinition(
code="catalog",
name="Product Catalog",
description="Product catalog browsing and search for storefronts",
version="1.0.0",
is_self_contained=True,
dependencies=["inventory"],
provides_models=False, # Uses Product model from products module
provides_schemas=True,
provides_services=True,
provides_api_routes=True,
)