refactor: complete module-driven architecture migration

This commit completes the migration to a fully module-driven architecture:

## Models Migration
- Moved all domain models from models/database/ to their respective modules:
  - tenancy: User, Admin, Vendor, Company, Platform, VendorDomain, etc.
  - cms: MediaFile, VendorTheme
  - messaging: Email, VendorEmailSettings, VendorEmailTemplate
  - core: AdminMenuConfig
- models/database/ now only contains Base and TimestampMixin (infrastructure)

## Schemas Migration
- Moved all domain schemas from models/schema/ to their respective modules:
  - tenancy: company, vendor, admin, team, vendor_domain
  - cms: media, image, vendor_theme
  - messaging: email
- models/schema/ now only contains base.py and auth.py (infrastructure)

## Routes Migration
- Moved admin routes from app/api/v1/admin/ to modules:
  - menu_config.py -> core module
  - modules.py -> tenancy module
  - module_config.py -> tenancy module
- app/api/v1/admin/ now only aggregates auto-discovered module routes

## Menu System
- Implemented module-driven menu system with MenuDiscoveryService
- Extended FrontendType enum: PLATFORM, ADMIN, VENDOR, STOREFRONT
- Added MenuItemDefinition and MenuSectionDefinition dataclasses
- Each module now defines its own menu items in definition.py
- MenuService integrates with MenuDiscoveryService for template rendering

## Documentation
- Updated docs/architecture/models-structure.md
- Updated docs/architecture/menu-management.md
- Updated architecture validation rules for new exceptions

## Architecture Validation
- Updated MOD-019 rule to allow base.py in models/schema/
- Created core module exceptions.py and schemas/ directory
- All validation errors resolved (only warnings remain)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-01 21:02:56 +01:00
parent 09d7d282c6
commit d7a0ff8818
307 changed files with 5536 additions and 3826 deletions

View File

@@ -1,49 +1,64 @@
{
"title": "Produktkatalog",
"description": "Produktkatalogverwaltung für Händler",
"products": {
"title": "Produkte",
"subtitle": "Verwalten Sie Ihren Produktkatalog",
"create": "Produkt erstellen",
"edit": "Produkt bearbeiten",
"delete": "Produkt löschen",
"empty": "Keine Produkte gefunden",
"empty_search": "Keine Produkte entsprechen Ihrer Suche"
},
"product": {
"name": "Produktname",
"description": "Beschreibung",
"sku": "Artikelnummer",
"product": "Produkt",
"add_product": "Produkt hinzufügen",
"edit_product": "Produkt bearbeiten",
"delete_product": "Produkt löschen",
"product_name": "Produktname",
"product_code": "Produktcode",
"sku": "SKU",
"price": "Preis",
"stock": "Bestand",
"status": "Status",
"active": "Aktiv",
"inactive": "Inaktiv"
},
"media": {
"title": "Produktmedien",
"upload": "Bild hochladen",
"delete": "Bild löschen",
"primary": "Als Hauptbild festlegen",
"error": "Medien-Upload fehlgeschlagen"
},
"validation": {
"name_required": "Produktname ist erforderlich",
"price_required": "Preis ist erforderlich",
"invalid_sku": "Ungültiges Artikelnummernformat",
"duplicate_sku": "Artikelnummer existiert bereits"
"sale_price": "Verkaufspreis",
"cost": "Kosten",
"stock": "Lagerbestand",
"in_stock": "Auf Lager",
"out_of_stock": "Nicht auf Lager",
"low_stock": "Geringer Bestand",
"availability": "Verfügbarkeit",
"available": "Verfügbar",
"unavailable": "Nicht verfügbar",
"brand": "Marke",
"category": "Kategorie",
"categories": "Kategorien",
"image": "Bild",
"images": "Bilder",
"main_image": "Hauptbild",
"gallery": "Galerie",
"weight": "Gewicht",
"dimensions": "Abmessungen",
"color": "Farbe",
"size": "Größe",
"material": "Material",
"condition": "Zustand",
"new": "Neu",
"used": "Gebraucht",
"refurbished": "Generalüberholt",
"no_products": "Keine Produkte gefunden",
"search_products": "Produkte suchen...",
"filter_by_category": "Nach Kategorie filtern",
"filter_by_status": "Nach Status filtern",
"sort_by": "Sortieren nach",
"sort_newest": "Neueste",
"sort_oldest": "Älteste",
"sort_price_low": "Preis: Niedrig bis Hoch",
"sort_price_high": "Preis: Hoch bis Niedrig",
"sort_name_az": "Name: A-Z",
"sort_name_za": "Name: Z-A"
},
"messages": {
"created": "Produkt erfolgreich erstellt",
"updated": "Produkt erfolgreich aktualisiert",
"deleted": "Produkt erfolgreich gelöscht",
"not_found": "Produkt nicht gefunden",
"cannot_delete": "Produkt kann nicht gelöscht werden",
"error_loading": "Fehler beim Laden der Produkte"
},
"filters": {
"all_products": "Alle Produkte",
"active_only": "Nur aktive",
"search_placeholder": "Produkte suchen..."
"product_deleted_successfully": "Product deleted successfully",
"please_fill_in_all_required_fields": "Please fill in all required fields",
"product_updated_successfully": "Product updated successfully",
"failed_to_load_media_library": "Failed to load media library",
"no_vendor_associated_with_this_product": "No vendor associated with this product",
"please_select_an_image_file": "Please select an image file",
"image_must_be_less_than_10mb": "Image must be less than 10MB",
"image_uploaded_successfully": "Image uploaded successfully",
"product_removed_from_vendor_catalog": "Product removed from vendor catalog.",
"please_select_a_vendor": "Please select a vendor",
"please_enter_a_product_title_english": "Please enter a product title (English)",
"product_created_successfully": "Product created successfully",
"please_select_a_vendor_first": "Please select a vendor first"
}
}