rearrange

This commit is contained in:
alorig
2025-11-18 04:16:37 +05:00
parent 8040d983de
commit 342d9eab17
17 changed files with 0 additions and 261 deletions

View File

@@ -1,89 +0,0 @@
# REFACTORING DOCUMENTATION
**Purpose**: This directory contains refactoring plans, migration guides, and architectural refactoring documentation.
---
## Directory Structure
```
docs/refactor/
├── README.md # This file
├── routes/ # Route refactoring plans
├── folder-structure/ # Folder structure refactoring plans
└── migrations/ # Migration guides for refactoring
```
---
## Refactoring Plans
### Current Refactoring Status
**Phase 0: Foundation & Credit System**
- [ ] Credit-only model migration
- [ ] Plan model simplification
- [ ] Module settings system
**Phase 1: Service Layer Refactoring**
- [ ] Domain-driven structure
- [ ] Service layer implementation
- [ ] Model migrations
**Phase 2: Automation System**
- [ ] AutomationRule model
- [ ] ScheduledTask model
- [ ] Celery integration
**Phase 3: Site Builder**
- [ ] Site Builder models
- [ ] File management service
- [ ] Sites folder access
**Phase 4: Linker & Optimizer**
- [ ] Content model extensions
- [ ] Multiple entry points
- [ ] Workflow implementation
**Phase 5: Sites Renderer**
- [ ] Sites container
- [ ] Layout system
- [ ] Template system
**Phase 6: Site Integration**
- [ ] SiteIntegration model
- [ ] Multi-destination publishing
- [ ] Integration adapters
**Phase 7: UI Components**
- [ ] Global component library
- [ ] Module settings UI
- [ ] Site management UI
**Phase 8: Universal Content Types**
- [ ] Content type extensions
- [ ] Taxonomy support
- [ ] Product/Service pages
---
## Route Refactoring
See `routes/` directory for route refactoring plans.
---
## Folder Structure Refactoring
See `folder-structure/` directory for folder structure refactoring plans.
---
## Migration Guides
See `migrations/` directory for step-by-step migration guides.
---
**Last Updated**: 2025-01-XX

View File

@@ -1,64 +0,0 @@
# 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)
├── business/ # 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**: `business/{business}/models.py`
- **Services**: `business/{business}/services/`
- **Serializers**: `modules/{module}/serializers.py`
- **ViewSets**: `modules/{module}/views.py`
- **URLs**: `modules/{module}/urls.py`
---
**Last Updated**: 2025-01-XX

View File

@@ -1,52 +0,0 @@
# MIGRATION GUIDES
**Purpose**: Step-by-step migration guides for refactoring.
---
## Migration Guides
### Phase 0: Credit System Migration
- [ ] Remove plan limit fields
- [ ] Update Plan model
- [ ] Update CreditService
- [ ] Update AI Engine
- [ ] Update frontend
### Phase 1: Service Layer Migration
- [ ] Create domain folders
- [ ] Move models
- [ ] Create services
- [ ] Update ViewSets
- [ ] Update imports
### Phase 2: Content Model Extensions
- [ ] Add source field
- [ ] Add sync_status field
- [ ] Add external_id fields
- [ ] Create migrations
- [ ] Update serializers
### Phase 3: New Module Integration
- [ ] Automation module
- [ ] Linker module
- [ ] Optimizer module
- [ ] Site Builder module
- [ ] Integration module
---
## Migration Checklist
For each migration:
- [ ] Create migration files
- [ ] Test migrations
- [ ] Update code references
- [ ] Update tests
- [ ] Update documentation
- [ ] Deploy incrementally
---
**Last Updated**: 2025-01-XX

View File

@@ -1,56 +0,0 @@
# ROUTE REFACTORING PLANS
**Purpose**: Documentation for API route refactoring and reorganization.
---
## Current Route Structure
### Backend Routes
- `/api/v1/planner/` - Planner module routes
- `/api/v1/writer/` - Writer module routes
- `/api/v1/thinker/` - Thinker module routes
- `/api/v1/system/` - System module routes
- `/api/v1/billing/` - Billing module routes
- `/api/v1/auth/` - Authentication routes
### Frontend Routes
- `/planner/*` - Planner pages
- `/writer/*` - Writer pages
- `/thinker/*` - Thinker pages
- `/settings/*` - Settings pages
- `/billing/*` - Billing pages
---
## Planned Route Changes
### Phase 1: Service Layer Routes
- New routes for service-based endpoints
- Domain-specific route organization
### Phase 2: New Module Routes
- `/api/v1/automation/` - Automation routes
- `/api/v1/linker/` - Linker routes
- `/api/v1/optimizer/` - Optimizer routes
- `/api/v1/site-builder/` - Site Builder routes
- `/api/v1/integration/` - Integration routes
### Phase 3: Frontend Route Updates
- New module pages
- Route guards for module access
- Conditional route loading
---
## Migration Strategy
1. Add new routes alongside existing routes
2. Gradually migrate endpoints to new structure
3. Maintain backward compatibility
4. Update frontend routes incrementally
---
**Last Updated**: 2025-01-XX