CORRECCION CRITICA: - Porcentaje backend corregido de 40% a 15% - Entities: 153 total (109 heredadas + 44 propias) - Entities especializadas disenadas sin implementar: ~58 Cambios: - BACKEND_INVENTORY.yml: Reescrito con estado real - ENTITIES-CATALOG.md: Separacion IMPLEMENTADAS vs DISENADAS - PROXIMA-ACCION.md: Porcentajes corregidos, gaps identificados - MAPA-DOCUMENTACION.yml: Estructura actualizada - MASTER_INVENTORY.yml: Nuevo inventario consolidado Carpetas vacias eliminadas: - docs/01-analisis-referencias/ - docs/10-modelado/ - docs/20-user-stories/ - docs/30-integraciones/ - docs/90-transversal/ - docs/97-adr/ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
390 lines
12 KiB
YAML
390 lines
12 KiB
YAML
# BACKEND_INVENTORY.yml - ERP Transportistas
|
|
# Sistema SIMCO v4.0.0
|
|
# CORREGIDO: 2026-01-27 (Auditoria Fase 0)
|
|
|
|
version: "2.0.0"
|
|
created: "2026-01-25"
|
|
updated: "2026-01-27"
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# RESUMEN EJECUTIVO
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
summary:
|
|
framework: NestJS
|
|
language: TypeScript
|
|
total_entities: 153
|
|
entities_heredadas: 109
|
|
entities_propias: 44
|
|
hereda_de: erp-core
|
|
status: "15% implementado (entities creadas, faltan services/DTOs/tests)"
|
|
|
|
# NOTA IMPORTANTE:
|
|
# El 15% refleja que hay entities pero la mayoria NO tiene:
|
|
# - Services completos
|
|
# - DTOs
|
|
# - Tests
|
|
# - Validaciones de negocio
|
|
# El 40% anterior era INCORRECTO
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# MODULOS HEREDADOS DE ERP-CORE (109 entities)
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
modules_heredados:
|
|
|
|
- name: auth
|
|
entities: 20
|
|
status: heredado_completo
|
|
descripcion: "Autenticacion, JWT, OAuth, 2FA, sessions"
|
|
entidades:
|
|
- user.entity.ts
|
|
- role.entity.ts
|
|
- permission.entity.ts
|
|
- session.entity.ts
|
|
- tenant.entity.ts
|
|
- company.entity.ts
|
|
- group.entity.ts
|
|
- api-key.entity.ts
|
|
- password-reset.entity.ts
|
|
- oauth-provider.entity.ts
|
|
- oauth-state.entity.ts
|
|
- oauth-user-link.entity.ts
|
|
- trusted-device.entity.ts
|
|
- verification-code.entity.ts
|
|
- mfa-audit-log.entity.ts
|
|
- device.entity.ts
|
|
- user-profile.entity.ts
|
|
- user-profile-assignment.entity.ts
|
|
- profile-tool.entity.ts
|
|
- profile-module.entity.ts
|
|
controllers: 2
|
|
services: heredados
|
|
|
|
- name: ai
|
|
entities: 7
|
|
status: heredado_completo
|
|
descripcion: "Integracion IA/LLM"
|
|
entidades:
|
|
- completion.entity.ts
|
|
- conversation.entity.ts
|
|
- embedding.entity.ts
|
|
- knowledge-base.entity.ts
|
|
- model.entity.ts
|
|
- prompt.entity.ts
|
|
- usage.entity.ts
|
|
controllers: 1
|
|
services: heredados
|
|
|
|
- name: audit
|
|
entities: 7
|
|
status: heredado_completo
|
|
descripcion: "Auditoria y logs"
|
|
entidades:
|
|
- audit-log.entity.ts
|
|
- config-change.entity.ts
|
|
- data-export.entity.ts
|
|
- entity-change.entity.ts
|
|
- login-history.entity.ts
|
|
- permission-change.entity.ts
|
|
- sensitive-data-access.entity.ts
|
|
controllers: 1
|
|
services: heredados
|
|
|
|
- name: billing-usage
|
|
entities: 13
|
|
status: heredado_completo
|
|
descripcion: "Facturacion SaaS y planes"
|
|
controllers: 4
|
|
services: heredados
|
|
|
|
- name: branches
|
|
entities: 5
|
|
status: heredado_completo
|
|
descripcion: "Sucursales"
|
|
controllers: 1
|
|
services: heredados
|
|
|
|
- name: core
|
|
entities: 10
|
|
status: heredado_base
|
|
descripcion: "Modulo core compartido"
|
|
controllers: 1
|
|
services: heredados
|
|
|
|
- name: financial
|
|
entities: 15
|
|
status: heredado_completo
|
|
descripcion: "Contabilidad base"
|
|
controllers: 1
|
|
services: heredados
|
|
|
|
- name: inventory
|
|
entities: 15
|
|
status: heredado_completo
|
|
descripcion: "Inventario base (refacciones)"
|
|
controllers: 3
|
|
services: heredados
|
|
|
|
- name: mcp
|
|
entities: 2
|
|
status: heredado_completo
|
|
descripcion: "MCP Server"
|
|
controllers: 1
|
|
services: heredados
|
|
|
|
- name: notifications
|
|
entities: 6
|
|
status: heredado_completo
|
|
descripcion: "Notificaciones multicanal"
|
|
controllers: 1
|
|
services: heredados
|
|
|
|
- name: partners
|
|
entities: 6
|
|
status: heredado_extendido
|
|
descripcion: "Clientes/Proveedores/Carriers"
|
|
controllers: 3
|
|
services: heredados
|
|
notas: "Extendido para shippers y carriers"
|
|
|
|
- name: payment-terminals
|
|
entities: 3
|
|
status: heredado_completo
|
|
descripcion: "Terminales de pago"
|
|
controllers: 7
|
|
services: heredados
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# MODULOS PROPIOS DE TRANSPORTE (44 entities)
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
modules_propios:
|
|
|
|
- name: ordenes-transporte
|
|
entities: 5
|
|
status: entity_only
|
|
descripcion: "Ordenes de transporte y cotizaciones"
|
|
modulo_simco: MAI-003
|
|
entidades:
|
|
- quotation.entity.ts
|
|
- quotation-item.entity.ts
|
|
- sales-order.entity.ts
|
|
- sales-order-item.entity.ts
|
|
- (1 adicional)
|
|
controllers: 2
|
|
services: pendiente
|
|
dtos: pendiente
|
|
notas: |
|
|
Entities creadas pero son GENERICAS de sales.
|
|
Falta: OrdenTransporte, Embarque, Parada, RestriccionOT
|
|
como entities ESPECIALIZADAS del giro transporte.
|
|
|
|
- name: gestion-flota
|
|
entities: 9
|
|
status: entity_only
|
|
descripcion: "Unidades, operadores, productos"
|
|
modulo_simco: MAI-011
|
|
entidades:
|
|
- product.entity.ts
|
|
- product-category.entity.ts
|
|
- product-variant.entity.ts
|
|
- product-attribute.entity.ts
|
|
- product-attribute-value.entity.ts
|
|
- product-price.entity.ts
|
|
- product-supplier.entity.ts
|
|
- (2 adicionales)
|
|
controllers: 3
|
|
services: pendiente
|
|
notas: |
|
|
Entities son GENERICAS de products.
|
|
Falta: Unidad, Remolque, Operador, LicenciaOperador,
|
|
DocumentoUnidad, DisponibilidadOperador como
|
|
entities ESPECIALIZADAS del giro transporte.
|
|
|
|
- name: tracking
|
|
entities: 2
|
|
status: entity_only
|
|
descripcion: "GPS, eventos, alertas"
|
|
modulo_simco: MAI-006
|
|
controllers: 1
|
|
services: pendiente
|
|
notas: |
|
|
Solo 2 entities basicas.
|
|
Falta: EventoTracking, Geocerca, AlertaTracking,
|
|
ETADinamico, DispositivoGPS
|
|
|
|
- name: viajes
|
|
entities: 4
|
|
status: entity_only
|
|
descripcion: "Viajes y timesheets"
|
|
modulo_simco: MAI-003/MAI-004
|
|
entidades:
|
|
- timesheet.entity.ts
|
|
- (3 adicionales)
|
|
controllers: 2
|
|
services: pendiente
|
|
notas: |
|
|
Entities genericas de projects.
|
|
Falta: Viaje, Ruta, ParadaViaje, ChecklistPreViaje,
|
|
SelloViaje, EvidenciaCarga
|
|
|
|
- name: combustible-gastos
|
|
entities: 5
|
|
status: entity_creada
|
|
descripcion: "Control de combustible, peajes, gastos"
|
|
modulo_simco: MAI-012
|
|
entidades:
|
|
- carga-combustible.entity.ts
|
|
- cruce-peaje.entity.ts
|
|
- gasto-viaje.entity.ts
|
|
- anticipo-viatico.entity.ts
|
|
- control-rendimiento.entity.ts
|
|
controllers: 0
|
|
services: pendiente
|
|
dtos: pendiente
|
|
notas: "Entities especializadas creadas 2026-01-25. Faltan controllers y services."
|
|
|
|
- name: tarifas-transporte
|
|
entities: 6
|
|
status: entity_creada
|
|
descripcion: "Tarifas por lane, facturacion, recargos"
|
|
modulo_simco: MAI-009
|
|
entidades:
|
|
- lane.entity.ts
|
|
- tarifa.entity.ts
|
|
- recargo-catalogo.entity.ts
|
|
- factura-transporte.entity.ts
|
|
- linea-factura.entity.ts
|
|
- fuel-surcharge.entity.ts
|
|
controllers: 0
|
|
services: pendiente
|
|
dtos: pendiente
|
|
notas: "Entities especializadas creadas 2026-01-25. Faltan controllers y services."
|
|
|
|
- name: carta-porte
|
|
entities: 7
|
|
status: entity_creada
|
|
descripcion: "Complemento Carta Porte CFDI 3.1"
|
|
modulo_simco: MAE-016
|
|
controllers: 0
|
|
services: pendiente
|
|
notas: "7 entities basicas para carta porte. Requiere validacion vs SAT."
|
|
|
|
- name: fiscal
|
|
entities: 6
|
|
status: entity_creada
|
|
descripcion: "Integracion fiscal Mexico"
|
|
controllers: 1
|
|
services: pendiente
|
|
notas: "Entities fiscales basicas."
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# RESUMEN DE TOTALES
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
totales:
|
|
entities:
|
|
heredadas: 109
|
|
propias: 44
|
|
total: 153
|
|
controllers:
|
|
heredados: 26
|
|
propios: 9
|
|
total: 35
|
|
services:
|
|
heredados: "~30"
|
|
propios: 0
|
|
total: "~30"
|
|
dtos:
|
|
heredados: "~60"
|
|
propios: 0
|
|
total: "~60"
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# ANALISIS DE GAPS
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
gaps:
|
|
criticos:
|
|
- modulo: MAI-003
|
|
descripcion: "Ordenes de Transporte"
|
|
entities_requeridas:
|
|
- OrdenTransporte
|
|
- Embarque
|
|
- Parada
|
|
- RestriccionOT
|
|
- ItemOT
|
|
entities_existentes: 0
|
|
gap: 5
|
|
|
|
- modulo: MAI-004
|
|
descripcion: "Planeacion TMS"
|
|
entities_requeridas:
|
|
- Consolidacion
|
|
- AsignacionRecurso
|
|
- CapacidadRuta
|
|
entities_existentes: 0
|
|
gap: 3
|
|
|
|
- modulo: MAI-005
|
|
descripcion: "Despacho"
|
|
entities_requeridas:
|
|
- ChecklistPreViaje
|
|
- Sello
|
|
- EvidenciaCarga
|
|
- OrdenViaje
|
|
entities_existentes: 0
|
|
gap: 4
|
|
|
|
- modulo: MAI-007
|
|
descripcion: "POD y Cierre"
|
|
entities_requeridas:
|
|
- POD
|
|
- FirmaDigital
|
|
- FotoEntrega
|
|
- TiempoReal
|
|
entities_existentes: 0
|
|
gap: 4
|
|
|
|
- modulo: MAI-011
|
|
descripcion: "Gestion de Flota"
|
|
entities_requeridas:
|
|
- Unidad
|
|
- Remolque
|
|
- Operador
|
|
- LicenciaOperador
|
|
- DocumentoUnidad
|
|
- DisponibilidadOperador
|
|
entities_existentes: 0
|
|
gap: 6
|
|
|
|
total_entities_faltantes: 22
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# NOTAS Y OBSERVACIONES
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
notas:
|
|
- "CORRECCION 2026-01-27: El progreso del 40% era INCORRECTO"
|
|
- "El progreso REAL es ~15% (solo hay entities, falta implementacion)"
|
|
- "109 entities son heredadas de erp-core"
|
|
- "44 entities son propias pero muchas son GENERICAS no especializadas"
|
|
- "Las entities especializadas del giro (22+) NO EXISTEN aun"
|
|
- "Hay 11 entities nuevas especializadas creadas 2026-01-25 (combustible + tarifas)"
|
|
- "Faltan services, DTOs, validaciones para todas las entities propias"
|
|
|
|
historial:
|
|
- fecha: "2026-01-25"
|
|
autor: "META-ORQUESTADOR"
|
|
cambio: "Creacion inicial"
|
|
|
|
- fecha: "2026-01-27"
|
|
autor: "AUDITOR"
|
|
cambio: |
|
|
CORRECCION CRITICA: Reescritura completa con estado real.
|
|
- Porcentaje corregido de 40% a 15%
|
|
- Separacion clara heredadas vs propias
|
|
- Identificacion de gaps criticos
|
|
- Documentacion de entities faltantes
|