Herencia ERP-Core - ERP Transportistas
Version: 1.0.0
Fecha: 2026-01-26
Tipo: CONSUMER (Nivel 2)
Relacion de Herencia
template-saas (PROVIDER - L0)
│
▼
erp-core (INTERMEDIATE - L1)
│
├── erp-construccion
├── erp-mecanicas-diesel
├── erp-clinicas
├── erp-retail
├── erp-vidrio-templado
└── erp-transportistas ◀── ESTE PROYECTO
Modulos Heredados de erp-core
Foundation (100% Heredado)
| Modulo |
Codigo Core |
Reutilizacion |
Modificaciones |
| Auth |
MGN-001 |
100% |
Ninguna |
| Users |
MGN-002 |
100% |
Ninguna |
| Roles |
MGN-003 |
100% |
Roles adicionales transporte |
| Tenants |
MGN-004 |
100% |
Ninguna |
Core Business (60-70% Heredado)
| Modulo |
Codigo Core |
Reutilizacion |
Extensiones |
| Catalogs |
MGN-005 |
80% |
Catalogos vehiculares |
| Settings |
MGN-006 |
90% |
Config GPS/tracking |
| Financial |
MGN-012 |
70% |
Facturacion transporte |
| Inventory |
MGN-011 |
50% |
Combustible, refacciones |
| Partners |
MGN-010 |
60% |
Clientes, carriers |
SaaS Features (100% Heredado)
| Modulo |
Codigo Core |
Reutilizacion |
| Billing |
MGN-016 |
100% |
| Plans |
MGN-017 |
100% |
| Webhooks |
MGN-018 |
100% |
| Feature Flags |
MGN-019 |
100% |
AI/Intelligence (80% Heredado)
| Modulo |
Codigo Core |
Reutilizacion |
Extensiones |
| AI Integration |
MGN-020 |
80% |
Optimizacion rutas |
| WhatsApp |
MGN-021 |
100% |
- |
| MCP Server |
MGN-022 |
70% |
Tools transporte |
Modulos Especificos de Transporte (MAI/MAE/MAA)
Fase 1 - MAI (Modulo Aplicacion Inicial)
| Codigo |
Nombre |
Herencia Core |
Status |
| MAI-001 |
Fundamentos |
MGN-001 a 004 |
Heredado |
| MAI-002 |
Clientes y Tarifas |
MGN-010 ext |
Nuevo 30% |
| MAI-003 |
Ordenes de Transporte |
- |
Nuevo 100% |
| MAI-004 |
Planeacion TMS |
- |
Nuevo 100% |
| MAI-005 |
Despacho |
- |
Nuevo 100% |
| MAI-006 |
Tracking |
- |
Nuevo 100% |
| MAI-007 |
POD y Cierre |
- |
Nuevo 100% |
| MAI-008 |
Incidencias |
- |
Nuevo 100% |
| MAI-009 |
Facturacion Transporte |
MGN-012 ext |
Nuevo 60% |
| MAI-010 |
Liquidaciones |
- |
Nuevo 100% |
| MAI-011 |
Gestion de Flota |
- |
Nuevo 100% |
| MAI-012 |
Combustible y Gastos |
MGN-011 ext |
Nuevo 70% |
| MAI-013 |
Mantenimiento Flota |
- |
Nuevo 100% |
| MAI-014 |
Carriers (Terceros) |
- |
Nuevo 100% |
| MAI-015 |
Portal Cliente |
- |
Nuevo 100% |
Fase 2 - MAE (Modulo Aplicacion Extendido)
| Codigo |
Nombre |
Herencia Core |
Status |
| MAE-016 |
Carta Porte CFDI |
MGN-012 ext |
Nuevo 80% |
| MAE-017 |
HOS y Bitacora |
- |
Nuevo 100% |
| MAE-018 |
Reportes y KPIs |
MGN-006 ext |
Nuevo 50% |
Fase 3 - MAA (Modulo Aplicacion Avanzado)
| Codigo |
Nombre |
Herencia Core |
Status |
| MAA-019 |
Optimizacion Rutas |
MGN-020 ext |
Futuro |
| MAA-020 |
Integraciones EDI |
- |
Futuro |
Patrones Reutilizados
Desde erp-core
-
Multi-Tenancy con RLS
- Aislamiento por tenant_id
- Politicas RLS en todas las tablas
- Header X-Tenant-ID
-
Estructura de Modulos Backend
module/
├── entities/
├── services/
├── controllers/
├── dto/
└── index.ts
-
Naming Conventions
- Entities: PascalCase singular
- Tables: snake_case plural
- Services: PascalCase + Service
- Controllers: PascalCase + Controller
-
API REST Standards
- Versionado: /api/v1/
- Pagination: limit, offset
- Sorting: sort, order
- Filtering: field=value
Schemas de Base de Datos
Heredados de erp-core
- auth
- catalog
- settings
- billing
- ai
Especificos de Transporte
- transport (ordenes, embarques, viajes)
- fleet (unidades, operadores)
- tracking (eventos, geofences)
- fuel (cargas combustible)
- maintenance (mantenimiento flota)
- carriers (transportistas terceros)
- billing_transport (facturacion especializada)
- compliance (HOS, carta porte)
Directivas Heredadas
DIRECTIVA-MULTI-TENANT.md - Obligatoria
DIRECTIVA-EXTENSION-VERTICALES.md - Obligatoria
ESTANDARES-API-REST-GENERICO.md - Obligatoria
TRIGGER-COHERENCIA-CAPAS.md - Obligatoria
TRIGGER-INVENTARIOS.md - Obligatoria
Propagacion de Cambios
Desde erp-core
| Tipo Cambio |
Propagacion |
SLA |
| Security Fix |
FORZADA |
24h |
| Bug Fix Critico |
INMEDIATA |
48h |
| Feature Nuevo |
EVALUADA |
2 semanas |
| Breaking Change |
PLANIFICADA |
1 mes |
| Docs |
INMEDIATA |
1 dia |
Proceso
- Monitorear cambios en erp-core
- Evaluar impacto en modulos heredados
- Aplicar cambios manteniendo extensiones locales
- Validar build + lint + tests
- Documentar en PROPAGATION-LOG
Referencias
workspace-v2/orchestration/directivas/simco/PROPAGATION-RULES.md
workspace-v2/orchestration/inventarios/REUSABLE-CODE-INVENTORY.yml
erp-core/orchestration/directivas/DIRECTIVA-EXTENSION-VERTICALES.md
Ultima actualizacion: 2026-01-26
Agente: claude-code-orquestador