- Prefijo v2: MCH - TRACEABILITY-MASTER.yml creado - Listo para integracion como submodulo Workspace: v2.0.0 | SIMCO: v4.0.0
5.4 KiB
5.4 KiB
Plan Refinado - Sprint 1: Documentacion Base
Fecha: 2026-01-10 Version: 2.0.0 Estado: REFINADO Y LISTO PARA EJECUCION
1. CAMBIO DE ESTRATEGIA
Situacion Original
Se planeaba CREAR 4 archivos de inventario nuevos.
Situacion Real
Los 5 archivos YA EXISTEN pero estan DESACTUALIZADOS.
Nueva Estrategia
ACTUALIZAR los 5 archivos existentes con la informacion correcta del analisis.
2. ARCHIVOS A ACTUALIZAR
| # | Archivo | Ubicacion | Accion |
|---|---|---|---|
| 1 | DATABASE_INVENTORY.yml | orchestration/inventarios/ | ACTUALIZAR |
| 2 | BACKEND_INVENTORY.yml | orchestration/inventarios/ | ACTUALIZAR |
| 3 | FRONTEND_INVENTORY.yml | orchestration/inventarios/ | ACTUALIZAR |
| 4 | MASTER_INVENTORY.yml | orchestration/inventarios/ | ACTUALIZAR |
| 5 | _MAP.md | docs/ | ACTUALIZAR |
3. ORDEN DE EJECUCION
1. DATABASE_INVENTORY.yml [Base de datos]
|
v
2. BACKEND_INVENTORY.yml [API/Servicios]
|
v
3. FRONTEND_INVENTORY.yml [UI/Paginas]
|
v
4. MASTER_INVENTORY.yml [Consolidacion]
|
v
5. docs/_MAP.md [Navegacion]
4. ESPECIFICACIONES POR ARCHIVO
4.1 DATABASE_INVENTORY.yml
Correcciones principales:
- Cambiar total_schemas de 10 a 9
- Cambiar total_tablas de 29 a 27
- Agregar extensiones unaccent y pg_trgm
- Corregir nombres de tablas:
- tenant_settings → tenant_configs
- roles, permissions → eliminar (no existen)
- otp_codes → agregar
- product_variants → eliminar
- stock_movements → inventory_movements
- inventory_counts → stock_alerts
- credit_accounts, credit_transactions → fiados, fiado_payments
- tenant_integrations → tenant_integration_credentials
- integration_logs → tenant_whatsapp_numbers
Estructura final de schemas:
public: tenants, tenant_configs, tenant_integration_credentials, tenant_whatsapp_numbers
auth: users, sessions, otp_codes
catalog: categories, products, product_templates
sales: sales, sale_items, payments, daily_closures
inventory: inventory_movements, stock_alerts
customers: customers, fiados, fiado_payments
orders: orders, order_items
subscriptions: plans, subscriptions, token_packages, token_usage, tenant_token_balance
messaging: conversations, messages, notifications
4.2 BACKEND_INVENTORY.yml
Correcciones principales:
- Cambiar total_modulos de 14 a 12
- Actualizar lista de modulos:
- Eliminar: billing (separado de subscriptions)
- Corregir endpoints con prefijo v1/
- Actualizar puerto a 3141
- Corregir ruta de swagger a /docs
Modulos finales:
1. auth
2. products
3. categories
4. sales
5. customers
6. orders
7. inventory
8. payments
9. subscriptions
10. messaging
11. billing
12. integrations
4.3 FRONTEND_INVENTORY.yml
Correcciones principales:
- Cambiar root de apps/web a apps/frontend
- Cambiar total_paginas de 7 a 9
- Cambiar total_componentes de 15 a ~1 (Layout) + lib UI
- Cambiar total_contexts de 3 a 1 (AuthContext)
- Actualizar React 18 a 19.2.0
- Agregar Vite 7.2.4
- Actualizar puerto a 3140
Paginas finales:
1. Dashboard (/dashboard)
2. Products (/products)
3. Orders (/orders)
4. Customers (/customers)
5. Fiado (/fiado)
6. Inventory (/inventory)
7. Settings (/settings)
8. Login (/login)
9. Register (/register)
4.4 MASTER_INVENTORY.yml
Correcciones principales:
- Cambiar puerto backend de 3500 a 3141
- Cambiar puerto frontend de 5175 a 3140
- Cambiar progreso de 25% a 95%
- Actualizar estados de modulos a completado
- Agregar apps.mobile con estado completado
- Actualizar lista de schemas a 9
- Actualizar integraciones a estados correctos
4.5 docs/_MAP.md
Correcciones principales:
- Cambiar referencias de carpetas a archivos .md
- MCH-001-infraestructura/ → MCH-001-infraestructura-base.md
- Agregar epicas MCH-023 a MCH-028 (FASE 7)
- Actualizar estados de fases segun PROJECT-STATUS.md
- Verificar que los links funcionen
- Actualizar estadisticas
5. VALIDACIONES POST-EJECUCION
5.1 Conteos a Verificar
| Archivo | Campo | Valor Esperado |
|---|---|---|
| DATABASE | schemas | 9 |
| DATABASE | tablas | 27 |
| DATABASE | extensiones | 4 |
| BACKEND | modulos | 12 |
| BACKEND | puerto | 3141 |
| FRONTEND | paginas | 9 |
| FRONTEND | puerto | 3140 |
| MASTER | progreso | 95% |
5.2 Referencias a Verificar
- DATABASE → archivos SQL existen
- BACKEND → modulos en apps/backend/src/modules/
- FRONTEND → paginas en apps/frontend/src/pages/
- MASTER → inventarios referenciados
- MAP → archivos de epicas existen
6. ESTIMACION DE TIEMPO
| Archivo | Complejidad | Estimacion |
|---|---|---|
| DATABASE_INVENTORY.yml | Alta | Reescritura completa |
| BACKEND_INVENTORY.yml | Alta | Reescritura completa |
| FRONTEND_INVENTORY.yml | Media | Actualizacion estructural |
| MASTER_INVENTORY.yml | Baja | Correccion de valores |
| docs/_MAP.md | Baja | Correccion de referencias |
7. NOTAS IMPORTANTES
- No modificar codigo fuente: Solo documentacion
- Mantener formato SIMCO: Seguir estructura de templates
- Verificar coherencia: Los inventarios deben ser consistentes entre si
- Actualizar fechas: Cambiar ultima_actualizacion a 2026-01-10
8. APROBACION PARA EJECUCION
Este plan refinado esta listo para ejecucion.
Proxima fase: FASE 6 - Ejecucion del Plan
Fin del Plan Refinado