After the storefront migration, no live routes mount under /api/v1/shop/. Remove all dead code that detected/handled shop API requests: the is_shop_api_request() method, the shop API dispatch branch in middleware, the RequestContext.SHOP enum member (renamed to STOREFRONT), legacy path prefixes in FrontendDetector, and all associated tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
# Architecture Rules - Naming Convention Rules
|
|
# Rules for consistent naming across the codebase
|
|
|
|
naming_rules:
|
|
|
|
- id: "NAM-001"
|
|
name: "API files use PLURAL names"
|
|
severity: "error"
|
|
description: |
|
|
API endpoint files should use plural names (vendors.py, products.py)
|
|
pattern:
|
|
file_pattern: "app/api/v1/**/*.py"
|
|
check: "plural_naming"
|
|
exceptions:
|
|
- "__init__.py"
|
|
- "auth.py"
|
|
- "health.py"
|
|
|
|
- id: "NAM-002"
|
|
name: "Service files use SINGULAR + 'service' suffix"
|
|
severity: "error"
|
|
description: |
|
|
Service files should use singular name + _service (vendor_service.py)
|
|
pattern:
|
|
file_pattern:
|
|
- "app/services/**/*.py"
|
|
- "app/modules/*/services/**/*.py"
|
|
check: "service_naming"
|
|
|
|
- id: "NAM-003"
|
|
name: "Model files use SINGULAR names"
|
|
severity: "error"
|
|
description: |
|
|
Both database and schema model files use singular names (product.py)
|
|
pattern:
|
|
file_pattern:
|
|
- "models/**/*.py"
|
|
- "app/modules/*/models/**/*.py"
|
|
check: "singular_naming"
|
|
|
|
- id: "NAM-004"
|
|
name: "Use consistent terminology: vendor not shop"
|
|
severity: "warning"
|
|
description: |
|
|
Use 'vendor' consistently, not 'shop' (except for storefront)
|
|
pattern:
|
|
file_pattern: "app/**/*.py"
|
|
discouraged_terms:
|
|
- "shop_id"
|
|
- "shop_service"
|
|
|
|
- id: "NAM-005"
|
|
name: "Use consistent terminology: inventory not stock"
|
|
severity: "warning"
|
|
description: |
|
|
Use 'inventory' consistently, not 'stock'
|
|
pattern:
|
|
file_pattern: "app/**/*.py"
|
|
discouraged_terms:
|
|
- "stock_service"
|