site_name: Orion Platform Documentation
site_description: Complete documentation for the Orion multi-tenant e-commerce platform
site_author: Orion Team
site_url: https://yourusername.github.io/orion/

repo_name: orion-platform
repo_url: https://github.com/yourusername/orion-platform
edit_uri: edit/main/docs/

nav:
  - Home: index.md

  # ============================================
  # GETTING STARTED
  # ============================================
  - Getting Started:
    - Installation: getting-started/installation.md
    - Quick Start: getting-started/quickstart.md
    - Configuration: getting-started/configuration.md
    - Database Setup:
      - Overview: getting-started/database-setup.md
      - Complete Setup Guide: getting-started/database-setup-guide.md
      - Quick Reference: getting-started/database-quick-reference.md
    - CMS Quick Start: getting-started/cms-quick-start.md
    - Platform Homepage Quick Start: getting-started/platform-homepage-quick-start.md

  # ============================================
  # DOCUMENTATION (All Technical)
  # ============================================
  - Documentation:
    # --- Architecture ---
    - Architecture:
      - Overview: architecture/overview.md
      - Architecture Patterns: architecture/architecture-patterns.md
      - Multi-Tenant System: architecture/multi-tenant.md
      - Marketplace Integration: architecture/marketplace-integration.md
      - Product Architecture: architecture/product-architecture.md
      - Language & i18n: architecture/language-i18n.md
      - Money Handling: architecture/money-handling.md
      - Merchant-Store Management: architecture/merchant-store-management.md
      - Middleware Stack: architecture/middleware.md
      - Module System: architecture/module-system.md
      - Menu Management: architecture/menu-management.md
      - Observability: architecture/observability.md
      - Request Flow: architecture/request-flow.md
      - Authentication & RBAC: architecture/auth-rbac.md
      - Access Control Stack: architecture/access-control-stack.md
      - UserContext Pattern: architecture/user-context-pattern.md
      - Frontend Structure: architecture/frontend-structure.md
      - Models Structure: architecture/models-structure.md
      - Background Tasks: architecture/background-tasks.md
      - Capacity Planning: architecture/capacity-planning.md
      - API Consolidation:
        - Proposal: architecture/api-consolidation-proposal.md
        - Migration Status: architecture/api-migration-status.md
      - Audit Provider Pattern: architecture/audit-provider-pattern.md
      - Cross-Module Import Rules: architecture/cross-module-import-rules.md
      - Cross-Module Migration Plan: architecture/cross-module-migration-plan.md
      - Customer Orders Architecture: architecture/customer-orders-architecture.md
      - Frontend Detection: architecture/frontend-detection.md
      - Media Architecture: architecture/media-architecture.md
      - Metrics Provider Pattern: architecture/metrics-provider-pattern.md
      - Multi-Platform CMS: architecture/multi-platform-cms.md
      - Tenancy Module Migration: architecture/tenancy-module-migration.md
      - Widget Provider Pattern: architecture/widget-provider-pattern.md
      - Architecture Violations Status: architecture/architecture-violations-status.md
      - Diagrams:
        - Multi-Tenant Diagrams: architecture/diagrams/multitenant-diagrams.md
        - Store Domain Diagrams: architecture/diagrams/store-domain-diagrams.md
      - Theme System:
        - Overview: architecture/theme-system/overview.md
        - Theme Presets: architecture/theme-system/presets.md
      - URL Routing:
        - Overview: architecture/url-routing/overview.md

    # --- API Reference ---
    - API Reference:
      - Overview: api/index.md
      - Storefront API Reference: api/storefront-api-reference.md
      - Authentication:
        - Guide: api/authentication.md
        - Quick Reference: api/authentication-quick-reference.md
        - Flow Diagrams: api/authentication-flow-diagrams.md
      - RBAC:
        - Developer Guide: api/rbac.md
        - Visual Guide: api/rbac-visual-guide.md
      - Error Handling: api/error-handling.md
      - Rate Limiting: api/rate-limiting.md

    # --- Backend ---
    - Backend:
      - Overview: backend/overview.md
      - Middleware Reference: backend/middleware-reference.md
      - RBAC Quick Reference: backend/rbac-quick-reference.md
      - Store RBAC: backend/store-rbac.md
      - Store-in-Token Architecture: backend/store-in-token-architecture.md
      - Admin Integration Guide: backend/admin-integration-guide.md
      - Admin Feature Integration: backend/admin-feature-integration.md
      - Soft Delete: backend/soft-delete.md

    # --- Frontend ---
    - Frontend:
      - Overview: frontend/overview.md
      - CDN Fallback Strategy: frontend/cdn-fallback-strategy.md
      - Tailwind CSS Build: frontend/tailwind-css.md
      - Shared Components:
        - Component Standards: frontend/shared/component-standards.md
        - Jinja Macros Library: frontend/shared/jinja-macros.md
        - UI Components: frontend/shared/ui-components.md
        - UI Components Quick Reference: frontend/shared/ui-components-quick-reference.md
        - Pagination: frontend/shared/pagination.md
        - Pagination Quick Start: frontend/shared/pagination-quick-start.md
        - Platform Settings: frontend/shared/platform-settings.md
        - Sidebar Implementation: frontend/shared/sidebar.md
        - Logging System: frontend/shared/logging.md
      - Admin Frontend:
        - Architecture: frontend/admin/architecture.md
        - Page Templates: frontend/admin/page-templates.md
      - Store Frontend:
        - Architecture: frontend/store/architecture.md
        - Page Templates: frontend/store/page-templates.md
      - Storefront:
        - Architecture: frontend/storefront/architecture.md
        - Page Templates: frontend/storefront/page-templates.md
        - E-commerce Components Proposal: frontend/storefront/ecommerce-components-proposal.md
        - Authentication Pages: frontend/storefront/authentication-pages.md
        - Navigation Flow: frontend/storefront/navigation-flow.md

    # --- Development ---
    - Development:
      - Contributing Guide: development/contributing.md
      - Creating Modules: development/creating-modules.md
      - Module Documentation: development/module-documentation.md
      - Code Quality: development/code-quality.md
      - Architecture Rules: development/architecture-rules.md
      - Security Rules: development/security-rules.md
      - Performance Rules: development/performance-rules.md
      - Code Quality Dashboard: development/code-quality-dashboard-implementation.md
      - Icons Guide: development/icons-guide.md
      - Naming Conventions: development/naming-conventions.md
      - Auth Dependencies Guide: development/auth-dependencies-guide.md
      - Customer Authentication:
        - Implementation Guide: development/customer-authentication-implementation.md
        - Quick Summary: development/customer-auth-summary.md
      - Exception Handling: development/exception-handling.md
      - Frontend Exception Handling: development/frontend-exception-handling.md
      - Error Rendering:
        - Developer Documentation: development/error-rendering/error-rendering-developer-documentation.md
        - Flow Diagram: development/error-rendering/html-error-rendering-flow-diagram.md
      - Environment Detection: development/environment-detection.md
      - Diagnostics:
        - Domain Health: development/diagnostics/domain-health.md
      - Database Seeder:
        - Documentation: development/database-seeder/database-seeder-documentation.md
        - Makefile Guide: development/database-seeder/makefile-database-seeder.md
        - Init Guide: development/database-seeder/database-init-guide.md
        - Quick Reference: development/database-seeder/database-quick-reference-guide.md
      - Seed Scripts Audit: development/seed-scripts-audit.md
      - Architecture Fixes (Jan 2026): development/architecture-fixes-2026-01.md
      - PyCharm Setup:
        - Make Configuration: development/pycharm-configuration-make.md
        - Troubleshooting: development/troubleshooting.md
      - Synology Repo: development/synology-github-repo.md

    # --- Modules ---
    - Modules:
      - Core:
        - Contracts: modules/contracts/index.md
        - Core: modules/core/index.md
        - CMS:
          - Overview: modules/cms/index.md
          - Data Model: modules/cms/data-model.md
          - Architecture: modules/cms/architecture.md
          - Implementation: modules/cms/implementation.md
          - Email Templates: modules/cms/email-templates.md
          - Email Templates Guide: modules/cms/email-templates-guide.md
          - Media Library: modules/cms/media-library.md
        - Customers: modules/customers/index.md
        - Tenancy:
          - Overview: modules/tenancy/index.md
          - Data Model: modules/tenancy/data-model.md
          - RBAC System: modules/tenancy/rbac.md
          - Store Onboarding: modules/tenancy/onboarding.md
          - Migration Plan: modules/tenancy/migration.md
        - Billing:
          - Overview: modules/billing/index.md
          - Data Model: modules/billing/data-model.md
          - Subscription System: modules/billing/subscription-system.md
          - Feature Gating: modules/billing/feature-gating.md
          - Tier Management: modules/billing/tier-management.md
          - Subscription Workflow: modules/billing/subscription-workflow.md
          - Stripe Integration: modules/billing/stripe-integration.md
        - Payments: modules/payments/index.md
        - Messaging:
          - Overview: modules/messaging/index.md
          - Data Model: modules/messaging/data-model.md
          - Architecture: modules/messaging/architecture.md
          - Notifications: modules/messaging/notifications.md
          - Email System: modules/messaging/email-system.md
          - Email Settings: modules/messaging/email-settings.md
          - Email Settings Implementation: modules/messaging/email-settings-impl.md
      - Optional:
        - Analytics: modules/analytics/index.md
        - Cart: modules/cart/index.md
        - Catalog:
          - Overview: modules/catalog/index.md
          - Data Model: modules/catalog/data-model.md
          - Architecture: modules/catalog/architecture.md
        - Checkout: modules/checkout/index.md
        - Inventory:
          - Overview: modules/inventory/index.md
          - Data Model: modules/inventory/data-model.md
          - User Guide: modules/inventory/user-guide.md
        - Loyalty:
          - Overview: modules/loyalty/index.md
          - Data Model: modules/loyalty/data-model.md
          - Business Logic: modules/loyalty/business-logic.md
          - Pages & Navigation: modules/loyalty/pages-and-navigation.md
          - User Journeys: modules/loyalty/user-journeys.md
          - Program Analysis: modules/loyalty/program-analysis.md
          - UI Design: modules/loyalty/ui-design.md
        - Marketplace:
          - Overview: modules/marketplace/index.md
          - Data Model: modules/marketplace/data-model.md
          - Architecture: modules/marketplace/architecture.md
          - Integration Guide: modules/marketplace/integration-guide.md
          - Letzshop API: modules/marketplace/api.md
          - Order Integration: modules/marketplace/order-integration.md
          - Admin Guide: modules/marketplace/admin-guide.md
          - Import Improvements: modules/marketplace/import-improvements.md
          - Job Queue: modules/marketplace/job-queue.md
        - Orders:
          - Overview: modules/orders/index.md
          - Data Model: modules/orders/data-model.md
          - Architecture: modules/orders/architecture.md
          - Unified Order View: modules/orders/unified-order-view.md
          - Order Item Exceptions: modules/orders/exceptions.md
          - OMS Feature Plan: modules/orders/oms-features.md
          - VAT Invoicing: modules/orders/vat-invoicing.md
          - Stock Integration: modules/orders/stock-integration.md
        - Hosting:
          - Overview: modules/hosting/index.md
          - User Journeys: modules/hosting/user-journeys.md
      - Internal:
        - Dev Tools: modules/dev_tools/index.md
        - Monitoring: modules/monitoring/index.md
      - Prospecting:
        - Overview: modules/prospecting/index.md
        - Database: modules/prospecting/database.md
        - Scoring: modules/prospecting/scoring.md
        - Research Findings: modules/prospecting/research-findings.md
        - User Journeys: modules/prospecting/user-journeys.md

    # --- Migrations & Implementation ---
    - Migrations:
      - Database Migrations: development/migration/database-migrations.md
      - Language & i18n Implementation: development/migration/language-i18n-implementation.md
      - Tailwind CSS Migration: development/migration/tailwind-migration-plan.md
      - Makefile Refactoring: development/migration/makefile-refactoring-complete.md
      - SVC-006 Migration Plan: development/migration/svc-006-migration-plan.md
      - Store Contact Inheritance: development/migration/store-contact-inheritance.md
      - Multi-Marketplace Product Architecture: development/migration/multi-marketplace-product-architecture.md
      - Product Migration Database Changes: development/migration/product-migration-database-changes.md
      - Store Operations Expansion: development/migration/store-operations-expansion.md
      - Module Autodiscovery: development/migration/module-autodiscovery-migration.md

    - Implementation Plans:
      - Module Migration Plan: archive/module-migration-plan.md
      - Admin Inventory Management: implementation/inventory-admin-migration.md
      - Admin Notification System: implementation/admin-notification-system.md
      - Letzshop Order Import: implementation/letzshop-order-import-improvements.md
      - Letzshop Jobs & Tables: implementation/letzshop-jobs-improvements.md
      - Messaging System: implementation/messaging-system.md
      - Order Item Exceptions: implementation/order-item-exceptions.md
      - Product Suppliers Table: implementation/product-suppliers-table.md
      - Subscription Workflow: implementation/subscription-workflow-plan.md
      - Feature Gating System: implementation/feature-gating-system.md
      - Platform Marketing Homepage: implementation/platform-marketing-homepage.md
      - Unified Order View: implementation/unified-order-view.md
      - VAT Invoice Feature: implementation/vat-invoice-feature.md
      - OMS Feature Plan: implementation/oms-feature-plan.md
      - Store Frontend Parity: implementation/store-frontend-parity-plan.md
      - Stock Management Integration: implementation/stock-management-integration.md
      - Email Templates Architecture: implementation/email-templates-architecture.md
      - Password Reset: implementation/password-reset-implementation.md
      - Email Settings: implementation/email-settings.md

    # --- Testing ---
    - Testing:
      - Testing Guide: testing/testing-guide.md
      - Test Maintenance: testing/test-maintenance.md
      - Test Structure: testing/test-structure.md
      - Store API Testing: testing/store-api-testing.md
      - Admin Frontend Features: testing/admin-frontend-features.md
      - Shop Frontend Features: testing/shop-frontend-features.md
      - Store Frontend Features: testing/store-frontend-features.md

    # --- Deployment & Operations ---
    - Deployment:
      - Overview: deployment/index.md
      - Infrastructure Guide: deployment/infrastructure.md
      - Launch Readiness: deployment/launch-readiness.md
      - Traditional VPS: deployment/production.md
      - Docker: deployment/docker.md
      - CloudFlare Setup: deployment/cloudflare.md
      - Gitea CI/CD: deployment/gitea.md
      - Hetzner Server Setup: deployment/hetzner-server-setup.md
      - Scaling Guide: deployment/scaling-guide.md
      - Environment Variables: deployment/environment.md
      - Incident Response: deployment/incident-response.md
      - Stripe Integration: deployment/stripe-integration.md

    - Operations:
      - Platform Health: operations/platform-health.md
      - Capacity Monitoring: operations/capacity-monitoring.md
      - Image Storage: operations/image-storage.md

    # --- Proposals ---
    - Proposals:
      - Documentation Consolidation: proposals/PLAN_documentation-consolidation.md
      - Module Dependency Redesign: proposals/SESSION_NOTE_2026-02-03_module-dependency-redesign.md
      - Import-002 Cross-Module Deps: proposals/SESSION_NOTE_2026-02-09_import002-cross-module-deps.md
      - Decouple Modules: proposals/decouple-modules.md
      - Decouple Modules Implementation: proposals/decouple-modules-implementation-plan.md
      - Loyalty Phase 2 Interfaces: proposals/loyalty-phase2-interfaces-plan.md
      - Loyalty Program Analysis: proposals/loyalty-program-analysis.md
      - Permissions Plan: proposals/plan-perms.md
      - Validator Noqa & Remaining Findings: proposals/validator-noqa-suppressions-and-remaining-findings.md
      - Backward Compatibility Cleanup: proposals/backward-compatibility-cleanup.md
      - Module Documentation Migration: proposals/module-documentation-migration-plan.md
      - Fix SEC-015 x-html Findings: proposals/fix-1600-sec015-xhtml-findings.md
      - Google Wallet Local Testing: proposals/google-wallet-local-testing.md
      - RBAC Cleanup Two-Phase Plan: proposals/rbac-cleanup-two-phase-plan.md
      - Store Login Platform Detection: proposals/store-login-platform-detection.md
      - Test API Deps Auth Dependencies: proposals/test-api-deps-auth-dependencies.md
      - Post Soft-Delete Follow-ups: proposals/post-soft-delete-followups.md

    # --- Archive ---
    - Archive:
      - Storefront Module Restructure: archive/PLAN_storefront-module-restructure.md
      - "Session: Modular Platform Architecture": archive/SESSION_NOTE_2026-01-25_modular-platform-architecture.md
      - "Session: Self-Contained Modules": archive/SESSION_NOTE_2026-01-26_self-contained-modules.md
      - "Session: Module Reclassification": archive/SESSION_NOTE_2026-01-27_module-reclassification.md
      - "Session: Module Config Migrations": archive/SESSION_NOTE_2026-01-28_module-config-migrations.md
      - "Session: Self-Contained Module Routes": archive/SESSION_NOTE_2026-01-30_self-contained-module-routes.md
      - "Session: Tenancy Module Consolidation": archive/SESSION_NOTE_2026-01-31_tenancy-module-consolidation.md
      - "Session: Middleware Frontend Detection": archive/SESSION_NOTE_2026-02-02_middleware-frontend-detection.md
      - Humble Orbiting Otter: archive/humble-orbiting-otter.md
      - Multi-Platform CMS Architecture: archive/multi-platform-cms-architecture.md
      - Multi-Platform CMS Implementation: archive/multi-platform-cms-architecture-implementation-plan.md
      - Section-Based Homepage Plan: archive/section-based-homepage-plan.md

    - Troubleshooting:
      - Shop Frontend: troubleshooting/shop-frontend.md

  # ============================================
  # BUSINESS (Features, Guides, Marketing)
  # ============================================
  - Business:
    # --- Features ---
    - Features:
      - Content Management System:
        - Overview: features/content-management-system.md
        - Implementation Guide: features/cms-implementation-guide.md
      - Platform Homepage: features/platform-homepage.md
      - Store Landing Pages: features/store-landing-pages.md
      - Store Onboarding: features/store-onboarding.md
      - Subscription & Billing: features/subscription-billing.md
      - Email System: features/email-system.md
      - User Journeys:
        - Prospecting: features/user-journeys/prospecting.md
        - Hosting: features/user-journeys/hosting.md
        - Loyalty: features/user-journeys/loyalty.md

    # --- User Guides ---
    - User Guides:
      - User Management: guides/user-management.md
      - Media Library: guides/media-library.md
      - Inventory Management: guides/inventory-management.md
      - Subscription Tier Management: guides/subscription-tier-management.md
      - Email Settings: guides/email-settings.md
      - Email Templates: guides/email-templates.md
      - Marketplace Integration: guides/marketplace-integration.md
      - Letzshop:
        - Admin Management: guides/letzshop-admin-management.md
        - Order Integration: guides/letzshop-order-integration.md
        - Marketplace API: guides/letzshop-marketplace-api.md

    # --- Marketing ---
    - Marketing:
      - Overview: marketing/index.md
      - Feature List & Roadmap: marketing/features.md
      - Pricing Strategy: marketing/pricing.md
      - Strategy:
        - Back-Office Positioning: marketing/strategy/back-office-positioning.md
        - Customer & Marketing: marketing/strategy/customer-marketing-positioning.md
      - Outreach Templates:
        - Letzshop Automation: marketing/outreach/letzshop-automation.md
        - Website Stores: marketing/outreach/website-stores.md

# Theme configuration
theme:
  name: material
  palette:
    # Palette toggle for automatic mode
    - media: "(prefers-color-scheme)"
      toggle:
        icon: material/brightness-auto
        name: Switch to light mode

    # Palette toggle for light mode
    - media: "(prefers-color-scheme: light)"
      scheme: default
      primary: blue
      accent: blue
      toggle:
        icon: material/brightness-7
        name: Switch to dark mode

    # Palette toggle for dark mode
    - media: "(prefers-color-scheme: dark)"
      scheme: slate
      primary: blue
      accent: blue
      toggle:
        icon: material/brightness-4
        name: Switch to system preference

  features:
    - navigation.tabs
    - navigation.tabs.sticky
    - navigation.sections
    - navigation.expand
    - navigation.path
    - navigation.indexes
    - toc.follow
    - navigation.top
    - search.suggest
    - search.highlight
    - content.tabs.link
    - content.code.annotation
    - content.code.copy
    - content.action.edit
    - content.action.view

  icon:
    repo: fontawesome/brands/github

# Plugins
plugins:
  - search:
      separator: '[\s\-,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
  - mkdocstrings:
      handlers:
        python:
          options:
            docstring_style: google
            show_source: true
            show_root_heading: true
            show_root_toc_entry: false
            merge_init_into_class: true

# Markdown extensions
markdown_extensions:
  - abbr
  - admonition
  - attr_list
  - def_list
  - footnotes
  - md_in_html
  - toc:
      permalink: true
  - pymdownx.arithmatex:
      generic: true
  - pymdownx.betterem:
      smart_enable: all
  - pymdownx.caret
  - pymdownx.details
  - pymdownx.emoji:
      emoji_generator: !!python/name:material.extensions.emoji.to_svg
      emoji_index: !!python/name:material.extensions.emoji.twemoji
  - pymdownx.highlight:
      anchor_linenums: true
      line_spans: __span
      pygments_lang_class: true
  - pymdownx.inlinehilite
  - pymdownx.keys
  - pymdownx.magiclink:
      normalize_issue_symbols: true
      repo_url_shorthand: true
      user: yourusername
      repo: letzshop-import
  - pymdownx.mark
  - pymdownx.smartsymbols
  - pymdownx.snippets
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_code_format
  - pymdownx.tabbed:
      alternate_style: true
      combine_header_slug: true
  - pymdownx.tasklist:
      custom_checkbox: true
  - pymdownx.tilde

# Footer
extra:
  social:
    - icon: fontawesome/brands/github
      link: https://github.com/yourusername

# Copyright
copyright: Copyright &copy; 2024-2025 Orion Team
