chore: update API routers, validation, and docs for module system
- app/api/v1/admin/__init__.py: Updated router imports - app/api/v1/vendor/__init__.py: Updated router imports - app/exceptions/code_quality.py: Added module exception imports - scripts/validate_architecture.py: Added module validation rules - .architecture-rules/_main.yaml: Include module.yaml rules - docs/proposals/module-migration-plan.md: Updated migration status Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
**Status:** In Progress
|
||||
**Started:** 2026-01-25
|
||||
**Last Updated:** 2026-01-27
|
||||
**Last Updated:** 2026-01-28
|
||||
**Target:** v1.0.0
|
||||
|
||||
This is the unified migration plan for transforming Wizamart into a fully modular architecture.
|
||||
@@ -31,13 +31,13 @@ Transform the platform from a monolithic structure to self-contained modules whe
|
||||
| `payments` | Optional | 🟡 Partial | ✅ | ✅ | - | Done |
|
||||
| `billing` | Optional | ✅ **Complete** | ✅ | ✅ | ✅ | Done |
|
||||
| `marketplace` | Optional | ✅ **Complete** | ✅ | ✅ | ✅ | Done |
|
||||
| `orders` | Optional | 🔴 Shell | ❌ | ❌ | - | Full |
|
||||
| `inventory` | Optional | 🔴 Shell | ❌ | ❌ | - | Full |
|
||||
| `customers` | Core | 🔴 Shell | ❌ | ❌ | - | Full |
|
||||
| `analytics` | Optional | 🔴 Shell | ❌ | ❌ | - | Full |
|
||||
| `messaging` | Optional | 🔴 Shell | ❌ | ❌ | - | Full |
|
||||
| `monitoring` | Internal | 🔴 Shell | ❌ | ❌ | ❌ | Full |
|
||||
| `dev-tools` | Internal | 🔴 Shell | ❌ | ❌ | ❌ | Full |
|
||||
| `orders` | Optional | ✅ **Complete** | ✅ | ✅ | - | Done |
|
||||
| `inventory` | Optional | ✅ **Complete** | ✅ | ✅ | - | Done |
|
||||
| `customers` | Core | ✅ **Complete** | ✅ | ✅ | - | Done |
|
||||
| `analytics` | Optional | ✅ **Complete** | ✅ | - | - | Done |
|
||||
| `messaging` | Optional | ✅ **Complete** | ✅ | ✅ | - | Done |
|
||||
| `monitoring` | Internal | ✅ **Complete** | ✅ | ✅ | - | Done |
|
||||
| `dev-tools` | Internal | ✅ **Complete** | ✅ | ✅ | ✅ | Done |
|
||||
| `tenancy` | Core | 🔴 Shell | ❌ | ❌ | - | Full |
|
||||
| `core` | Core | 🔴 Shell | ❌ | ❌ | - | Minimal |
|
||||
|
||||
@@ -140,6 +140,69 @@ app/tasks/celery_tasks/ # → Move to respective modules
|
||||
- Updated legacy task files to re-export from new location
|
||||
- Removed marketplace/letzshop/export from LEGACY_TASK_MODULES
|
||||
|
||||
### ✅ Phase 7: Dev-Tools Module Migration
|
||||
- Created `app/modules/dev_tools/models/` with:
|
||||
- `architecture_scan.py` - ArchitectureScan, ArchitectureViolation, ArchitectureRule, etc.
|
||||
- `test_run.py` - TestRun, TestResult, TestCollection
|
||||
- Created `app/modules/dev_tools/services/` re-exporting code_quality_service, test_runner_service
|
||||
- Created `app/modules/dev_tools/schemas/` (placeholder for future schemas)
|
||||
- Created `app/modules/dev_tools/tasks/` with:
|
||||
- `code_quality.py` - execute_code_quality_scan
|
||||
- `test_runner.py` - execute_test_run
|
||||
- Created `app/modules/dev_tools/exceptions.py` with test runner exceptions
|
||||
- Created `app/modules/dev_tools/routes/api/` with admin router
|
||||
- Updated `definition.py` with self-contained configuration
|
||||
- Updated legacy model files to re-export from module location
|
||||
- Updated legacy task files to re-export from module location
|
||||
- Used lazy imports in `__init__.py` to avoid circular import issues
|
||||
|
||||
### ✅ Phase 8: Monitoring Module Migration
|
||||
- Created `app/modules/monitoring/models/` re-exporting CapacitySnapshot, AdminNotification
|
||||
- Created `app/modules/monitoring/services/` re-exporting BackgroundTasksService
|
||||
- Created `app/modules/monitoring/schemas/` (placeholder)
|
||||
- Created `app/modules/monitoring/exceptions.py` with monitoring-specific exceptions
|
||||
- Updated `definition.py` with self-contained configuration
|
||||
- Used lazy imports in `__init__.py` to avoid circular import issues
|
||||
|
||||
### ✅ Phase 9: Customers Module Migration
|
||||
- Created `app/modules/customers/models/` re-exporting Customer, CustomerAddress, PasswordResetToken
|
||||
- Created `app/modules/customers/services/` re-exporting customer services
|
||||
- Created `app/modules/customers/schemas/` re-exporting customer schemas
|
||||
- Created `app/modules/customers/exceptions.py` re-exporting customer exceptions
|
||||
- Updated `definition.py` with self-contained configuration
|
||||
- Used lazy imports in `__init__.py` to avoid circular import issues
|
||||
|
||||
### ✅ Phase 10: Orders Module Migration
|
||||
- Created `app/modules/orders/models/` re-exporting Order, OrderItem, Invoice, etc.
|
||||
- Created `app/modules/orders/services/` re-exporting order and invoice services
|
||||
- Created `app/modules/orders/schemas/` re-exporting order and invoice schemas
|
||||
- Created `app/modules/orders/exceptions.py` re-exporting order exceptions
|
||||
- Updated `definition.py` with self-contained configuration
|
||||
- Used lazy imports in `__init__.py` to avoid circular import issues
|
||||
|
||||
### ✅ Phase 11: Inventory Module Migration
|
||||
- Created `app/modules/inventory/models/` re-exporting Inventory, InventoryTransaction
|
||||
- Created `app/modules/inventory/services/` re-exporting inventory services
|
||||
- Created `app/modules/inventory/schemas/` re-exporting inventory schemas
|
||||
- Created `app/modules/inventory/exceptions.py` re-exporting inventory exceptions
|
||||
- Updated `definition.py` with self-contained configuration
|
||||
- Used lazy imports in `__init__.py` to avoid circular import issues
|
||||
|
||||
### ✅ Phase 12: Analytics & Messaging Module Migration
|
||||
- **Analytics Module:**
|
||||
- Created `app/modules/analytics/models/` (empty - uses data from other modules)
|
||||
- Created `app/modules/analytics/services/` re-exporting StatsService, UsageService
|
||||
- Created `app/modules/analytics/schemas/` re-exporting stats schemas
|
||||
- Created `app/modules/analytics/exceptions.py` with reporting exceptions
|
||||
- Updated `definition.py` with self-contained configuration
|
||||
|
||||
- **Messaging Module:**
|
||||
- Created `app/modules/messaging/models/` re-exporting Conversation, Message, etc.
|
||||
- Created `app/modules/messaging/services/` re-exporting messaging services
|
||||
- Created `app/modules/messaging/schemas/` re-exporting messaging schemas
|
||||
- Created `app/modules/messaging/exceptions.py` re-exporting message exceptions
|
||||
- Updated `definition.py` with self-contained configuration
|
||||
|
||||
---
|
||||
|
||||
## Module Migration Phases
|
||||
|
||||
Reference in New Issue
Block a user