- Created a new `docs/planning/` directory to better organize architecture and implementation planning documents. - Moved existing planning documents into the new directory for improved accessibility. - Updated `README.md` to reflect the new document structure and added references to the organized planning documents. - Enhanced overall documentation management for easier navigation and maintenance.
65 lines
1.7 KiB
Markdown
65 lines
1.7 KiB
Markdown
# FOLDER STRUCTURE REFACTORING PLANS
|
|
|
|
**Purpose**: Documentation for folder structure refactoring and reorganization.
|
|
|
|
---
|
|
|
|
## Current Structure
|
|
|
|
```
|
|
backend/igny8_core/
|
|
├── modules/ # Feature modules
|
|
├── ai/ # AI framework
|
|
├── api/ # API base classes
|
|
└── middleware/ # Custom middleware
|
|
```
|
|
|
|
---
|
|
|
|
## Planned Structure (Domain-Driven)
|
|
|
|
```
|
|
backend/igny8_core/
|
|
├── core/ # Core models (Account, User, Site, Sector)
|
|
├── domain/ # Domain-specific code
|
|
│ ├── content/ # Content domain
|
|
│ ├── planning/ # Planning domain
|
|
│ ├── linking/ # Linking domain
|
|
│ ├── optimization/# Optimization domain
|
|
│ ├── site_building/# Site building domain
|
|
│ ├── integration/ # Integration domain
|
|
│ └── billing/ # Billing domain
|
|
├── infrastructure/ # Infrastructure code
|
|
│ ├── ai/ # AI framework
|
|
│ ├── storage/ # Storage services
|
|
│ └── queue/ # Queue management
|
|
├── modules/ # Module ViewSets (thin layer)
|
|
├── shared/ # Shared utilities
|
|
└── api/ # API base classes
|
|
```
|
|
|
|
---
|
|
|
|
## Migration Strategy
|
|
|
|
1. Create new domain folders
|
|
2. Move models to domain folders
|
|
3. Create service layer in domain folders
|
|
4. Update imports incrementally
|
|
5. Keep modules folder for ViewSets only
|
|
|
|
---
|
|
|
|
## File Organization Rules
|
|
|
|
- **Models**: `domain/{domain}/models.py`
|
|
- **Services**: `domain/{domain}/services/`
|
|
- **Serializers**: `modules/{module}/serializers.py`
|
|
- **ViewSets**: `modules/{module}/views.py`
|
|
- **URLs**: `modules/{module}/urls.py`
|
|
|
|
---
|
|
|
|
**Last Updated**: 2025-01-XX
|
|
|