feat: implement modular platform architecture (Phase 1)
Add module system for enabling/disabling feature bundles per platform. Module System: - ModuleDefinition dataclass for defining modules - 12 modules: core, platform-admin, billing, inventory, orders, marketplace, customers, cms, analytics, messaging, dev-tools, monitoring - Core modules (core, platform-admin) cannot be disabled - Module dependencies (e.g., marketplace requires inventory) MenuService Integration: - Menu items filtered by module enablement - MenuItemConfig includes is_module_enabled and module_code fields - Module-disabled items hidden from sidebar Platform Configuration: - BasePlatformConfig.enabled_modules property - OMS: all modules enabled (full commerce) - Loyalty: focused subset (no billing/inventory/orders/marketplace) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,15 @@
|
||||
OMS Platform Configuration
|
||||
|
||||
Configuration for the Order Management System platform.
|
||||
|
||||
OMS is a full-featured order management system with:
|
||||
- Inventory and product management
|
||||
- Order processing and fulfillment
|
||||
- Letzshop marketplace integration
|
||||
- Customer management
|
||||
- Billing and subscriptions
|
||||
- Content management
|
||||
- Analytics and reporting
|
||||
"""
|
||||
|
||||
from app.platforms.shared.base_platform import BasePlatformConfig
|
||||
@@ -34,6 +43,32 @@ class OMSPlatformConfig(BasePlatformConfig):
|
||||
"customer_view",
|
||||
]
|
||||
|
||||
@property
|
||||
def enabled_modules(self) -> list[str]:
|
||||
"""
|
||||
OMS enables all major commerce modules.
|
||||
|
||||
Core modules (core, platform-admin) are always included.
|
||||
"""
|
||||
return [
|
||||
# Core modules (always enabled, listed for clarity)
|
||||
"core",
|
||||
"platform-admin",
|
||||
# Commerce modules
|
||||
"billing",
|
||||
"inventory",
|
||||
"orders",
|
||||
"marketplace",
|
||||
"customers",
|
||||
# Content & communication
|
||||
"cms",
|
||||
"analytics",
|
||||
"messaging",
|
||||
# Internal tools
|
||||
"dev-tools",
|
||||
"monitoring",
|
||||
]
|
||||
|
||||
@property
|
||||
def vendor_default_page_slugs(self) -> list[str]:
|
||||
"""Default pages for OMS vendor storefronts."""
|
||||
|
||||
Reference in New Issue
Block a user