82 lines
2.3 KiB
Markdown
82 lines
2.3 KiB
Markdown
# 🔄 Plan de Refactorización - EMERGES TES
|
|
|
|
**Fecha:** 2026-01-15
|
|
**Objetivo:** Optimizar estructura del proyecto, eliminar redundancias, mejorar mantenibilidad
|
|
**Principio:** Preservar 100% de funcionalidad existente
|
|
|
|
---
|
|
|
|
## 📋 FASES DE REFACTORIZACIÓN
|
|
|
|
### ✅ FASE 1: Root Level Cleanup
|
|
- [x] Consolidar scripts de cleanup
|
|
- [ ] Mover scripts de deployment a scripts/
|
|
- [ ] Eliminar scripts innecesarios
|
|
- [x] Verificar config_backup/ (eliminado)
|
|
|
|
### ⏳ FASE 2: Assets Consolidation
|
|
- [ ] Mover /assets a /public/assets
|
|
- [ ] Actualizar referencias de assets
|
|
- [ ] Eliminar /assets vacío
|
|
|
|
### ⏳ FASE 3: Components Reorganization
|
|
- [ ] Reorganizar por dominio/feature
|
|
- [ ] Mover componentes según nuevo esquema
|
|
- [ ] Actualizar imports
|
|
|
|
### ⏳ FASE 4: Public/Manual Fix
|
|
- [ ] Verificar duplicados en public/manual
|
|
- [ ] Limpiar si es necesario
|
|
|
|
### ⏳ FASE 5: Scripts Organization
|
|
- [ ] Consolidar todos los scripts
|
|
- [ ] Organizar por categoría
|
|
|
|
### ⏳ FASE 6: Import Updates
|
|
- [ ] Actualizar todos los imports
|
|
- [ ] Verificar rutas absolutas y relativas
|
|
|
|
### ⏳ FASE 7: Validation
|
|
- [ ] npm run build
|
|
- [ ] npx tsc --noEmit
|
|
- [ ] npm run dev
|
|
- [ ] Verificar imports
|
|
- [ ] Verificar assets
|
|
|
|
---
|
|
|
|
## 🎯 ESTRUCTURA OBJETIVO
|
|
|
|
```
|
|
guia-tes/
|
|
├── src/
|
|
│ ├── components/
|
|
│ │ ├── content/ # Domain: medical content
|
|
│ │ ├── interactive/ # Domain: interactive tools
|
|
│ │ ├── communication/ # Domain: communication protocols
|
|
│ │ ├── drugs/ # Domain: pharmacology
|
|
│ │ ├── layout/ # Layout components
|
|
│ │ └── ui/ # Reusable UI primitives
|
|
│ ├── pages/
|
|
│ ├── hooks/
|
|
│ ├── lib/
|
|
│ ├── utils/
|
|
│ └── data/
|
|
├── public/
|
|
│ ├── assets/ # Consolidated assets
|
|
│ └── manual/ # Downloadable documents
|
|
├── scripts/ # All automation scripts
|
|
├── docs/ # Documentation
|
|
└── [config files]
|
|
```
|
|
|
|
---
|
|
|
|
## ⚠️ NOTAS IMPORTANTES
|
|
|
|
- **NO modificar lógica de componentes**
|
|
- **NO cambiar comportamiento UI**
|
|
- **Actualizar imports después de mover archivos**
|
|
- **Verificar build después de cada fase**
|
|
|