Some checks failed
ERP Core CI / Backend Lint (push) Has been cancelled
ERP Core CI / Backend Unit Tests (push) Has been cancelled
ERP Core CI / Backend Integration Tests (push) Has been cancelled
ERP Core CI / Frontend Lint (push) Has been cancelled
ERP Core CI / Frontend Unit Tests (push) Has been cancelled
ERP Core CI / Frontend E2E Tests (push) Has been cancelled
ERP Core CI / Database DDL Validation (push) Has been cancelled
ERP Core CI / Backend Build (push) Has been cancelled
ERP Core CI / Frontend Build (push) Has been cancelled
ERP Core CI / CI Success (push) Has been cancelled
Performance Tests / Lighthouse CI (push) Has been cancelled
Performance Tests / Bundle Size Analysis (push) Has been cancelled
Performance Tests / k6 Load Tests (push) Has been cancelled
Performance Tests / Performance Summary (push) Has been cancelled
- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8 - Actualizaciones en modulos CRM y OpenAPI Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
714 lines
17 KiB
Markdown
714 lines
17 KiB
Markdown
# Indice de Modulos - ERP Core
|
|
|
|
## Resumen
|
|
|
|
| Metrica | Valor |
|
|
|---------|-------|
|
|
| Total Modulos | 22 |
|
|
| Modulos P0 (Criticos) | 4 |
|
|
| Modulos P1 (Core) | 6 |
|
|
| Modulos P2 (Extended) | 5 |
|
|
| Modulos P3 (SaaS Platform) | 4 |
|
|
| Modulos P3 (IA Intelligence) | 3 |
|
|
| Completados | 0 |
|
|
| En Desarrollo | 2 |
|
|
| Planificados | 20 |
|
|
|
|
---
|
|
|
|
## Modulos por Prioridad
|
|
|
|
### P0 - Criticos (Sin estos no funciona)
|
|
|
|
| Codigo | Modulo | Estado | Progreso | Docs |
|
|
|--------|--------|--------|----------|------|
|
|
| MGN-001 | [auth](#mgn-001-auth) | En desarrollo | 40% | [Ver](./MGN-001-auth/) |
|
|
| MGN-002 | [users](#mgn-002-users) | En desarrollo | 30% | [Ver](./MGN-002-users/) |
|
|
| MGN-003 | [roles](#mgn-003-roles) | Planificado | 0% | Pendiente |
|
|
| MGN-004 | [tenants](#mgn-004-tenants) | Planificado | 0% | Pendiente |
|
|
|
|
### P1 - Core Business
|
|
|
|
| Codigo | Modulo | Estado | Progreso | Docs |
|
|
|--------|--------|--------|----------|------|
|
|
| MGN-005 | [catalogs](#mgn-005-catalogs) | Planificado | 0% | Pendiente |
|
|
| MGN-010 | [financial](#mgn-010-financial) | Planificado | 0% | Pendiente |
|
|
| MGN-011 | [inventory](#mgn-011-inventory) | Planificado | 0% | Pendiente |
|
|
| MGN-012 | [purchasing](#mgn-012-purchasing) | Planificado | 0% | Pendiente |
|
|
| MGN-013 | [sales](#mgn-013-sales) | Planificado | 0% | Pendiente |
|
|
| MGN-006 | [settings](#mgn-006-settings) | Planificado | 0% | Pendiente |
|
|
|
|
### P2 - Extended
|
|
|
|
| Codigo | Modulo | Estado | Progreso | Docs |
|
|
|--------|--------|--------|----------|------|
|
|
| MGN-007 | [audit](#mgn-007-audit) | Planificado | 0% | Pendiente |
|
|
| MGN-008 | [notifications](#mgn-008-notifications) | Planificado | 0% | Pendiente |
|
|
| MGN-009 | [reports](#mgn-009-reports) | Planificado | 0% | Pendiente |
|
|
| MGN-014 | [crm](#mgn-014-crm) | Planificado | 0% | Pendiente |
|
|
| MGN-015 | [projects](#mgn-015-projects) | Planificado | 0% | Pendiente |
|
|
|
|
### P3 - SaaS Platform
|
|
|
|
| Codigo | Modulo | Estado | Progreso | Docs |
|
|
|--------|--------|--------|----------|------|
|
|
| MGN-016 | [billing](#mgn-016-billing) | Planificado | 0% | [Ver](./MGN-016-billing/) |
|
|
| MGN-017 | [plans](#mgn-017-plans) | Planificado | 0% | [Ver](./MGN-017-plans/) |
|
|
| MGN-018 | [webhooks](#mgn-018-webhooks) | Planificado | 0% | [Ver](./MGN-018-webhooks/) |
|
|
| MGN-019 | [feature-flags](#mgn-019-feature-flags) | Planificado | 0% | [Ver](./MGN-019-feature-flags/) |
|
|
|
|
### P3 - IA Intelligence
|
|
|
|
| Codigo | Modulo | Estado | Progreso | Docs |
|
|
|--------|--------|--------|----------|------|
|
|
| MGN-020 | [ai-integration](#mgn-020-ai-integration) | Planificado | 0% | [Ver](./MGN-020-ai-integration/) |
|
|
| MGN-021 | [whatsapp-business](#mgn-021-whatsapp-business) | Planificado | 0% | [Ver](./MGN-021-whatsapp-business/) |
|
|
| MGN-022 | [mcp-server](#mgn-022-mcp-server) | Planificado | 0% | [Ver](./MGN-022-mcp-server/) |
|
|
|
|
---
|
|
|
|
## Detalle de Modulos
|
|
|
|
### MGN-001: Auth
|
|
|
|
**Proposito:** Autenticacion y manejo de sesiones
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_auth` |
|
|
| Tablas | users, sessions, tokens, oauth_providers |
|
|
| Endpoints | 8 (login, logout, refresh, etc.) |
|
|
| Dependencias | Ninguna (modulo base) |
|
|
| Usado por | Todos los modulos |
|
|
|
|
**Funcionalidades:**
|
|
- Login con email/password
|
|
- JWT tokens (access + refresh)
|
|
- OAuth providers (Google, Microsoft, etc.)
|
|
- Sesiones multi-dispositivo
|
|
- Password recovery
|
|
- 2FA (opcional)
|
|
|
|
---
|
|
|
|
### MGN-002: Users
|
|
|
|
**Proposito:** Gestion de usuarios del sistema
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_auth` |
|
|
| Tablas | users, user_profiles, user_preferences |
|
|
| Endpoints | 6 (CRUD + profile) |
|
|
| Dependencias | MGN-001 Auth |
|
|
| Usado por | MGN-003 Roles |
|
|
|
|
**Funcionalidades:**
|
|
- CRUD de usuarios
|
|
- Perfiles de usuario
|
|
- Preferencias (idioma, timezone, tema)
|
|
- Avatar y datos personales
|
|
- Activacion/desactivacion
|
|
|
|
---
|
|
|
|
### MGN-003: Roles
|
|
|
|
**Proposito:** Roles y permisos (RBAC)
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_auth` |
|
|
| Tablas | roles, permissions, role_permissions, user_roles |
|
|
| Endpoints | 10 |
|
|
| Dependencias | MGN-001, MGN-002 |
|
|
| Usado por | Todos los modulos |
|
|
|
|
**Funcionalidades:**
|
|
- Roles jerarquicos
|
|
- Permisos granulares por recurso
|
|
- Asignacion de roles a usuarios
|
|
- Roles por tenant
|
|
- Herencia de permisos
|
|
|
|
---
|
|
|
|
### MGN-004: Tenants
|
|
|
|
**Proposito:** Multi-tenancy y aislamiento de datos
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_system` |
|
|
| Tablas | tenants, tenant_settings, tenant_features |
|
|
| Endpoints | 8 |
|
|
| Dependencias | MGN-001 |
|
|
| Usado por | Todos los modulos |
|
|
|
|
**Funcionalidades:**
|
|
- Creacion de tenants
|
|
- Configuracion por tenant
|
|
- Feature flags por tenant
|
|
- Limites y quotas
|
|
- Aislamiento RLS
|
|
|
|
---
|
|
|
|
### MGN-005: Catalogs
|
|
|
|
**Proposito:** Catalogos maestros reutilizables
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_catalogs` |
|
|
| Tablas | countries, states, currencies, uom, etc. |
|
|
| Endpoints | 12+ |
|
|
| Dependencias | MGN-004 |
|
|
| Usado por | Partners, Products, Financial |
|
|
|
|
**Funcionalidades:**
|
|
- Paises y estados
|
|
- Monedas y tipos de cambio
|
|
- Unidades de medida
|
|
- Categorias genericas
|
|
- Impuestos base
|
|
|
|
---
|
|
|
|
### MGN-006: Settings
|
|
|
|
**Proposito:** Configuracion del sistema
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_system` |
|
|
| Tablas | config_parameters, sequences |
|
|
| Endpoints | 6 |
|
|
| Dependencias | MGN-004 |
|
|
| Usado por | Todos los modulos |
|
|
|
|
**Funcionalidades:**
|
|
- Parametros de configuracion
|
|
- Secuencias (folios)
|
|
- Configuracion de email
|
|
- Configuracion de integraciones
|
|
|
|
---
|
|
|
|
### MGN-007: Audit
|
|
|
|
**Proposito:** Auditoria y trazabilidad
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `audit_logging` |
|
|
| Tablas | audit_logs, login_history, change_history |
|
|
| Endpoints | 4 (solo lectura) |
|
|
| Dependencias | MGN-001, MGN-004 |
|
|
| Usado por | - |
|
|
|
|
**Funcionalidades:**
|
|
- Log de cambios por entidad
|
|
- Historial de logins
|
|
- Exportacion de logs
|
|
- Retencion configurable
|
|
|
|
---
|
|
|
|
### MGN-008: Notifications
|
|
|
|
**Proposito:** Sistema de notificaciones
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_notifications` |
|
|
| Tablas | notifications, notification_preferences, templates |
|
|
| Endpoints | 8 |
|
|
| Dependencias | MGN-001, MGN-002 |
|
|
| Usado por | Todos los modulos |
|
|
|
|
**Funcionalidades:**
|
|
- Notificaciones in-app
|
|
- Email notifications
|
|
- Push notifications (mobile)
|
|
- Preferencias por usuario
|
|
- Templates de notificacion
|
|
|
|
---
|
|
|
|
### MGN-009: Reports
|
|
|
|
**Proposito:** Reportes genericos
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_reports` |
|
|
| Tablas | report_definitions, report_schedules |
|
|
| Endpoints | 6 |
|
|
| Dependencias | MGN-001, MGN-004 |
|
|
| Usado por | Verticales |
|
|
|
|
**Funcionalidades:**
|
|
- Definicion de reportes
|
|
- Exportacion PDF/Excel
|
|
- Reportes programados
|
|
- Dashboards basicos
|
|
|
|
---
|
|
|
|
### MGN-010: Financial
|
|
|
|
**Proposito:** Contabilidad basica
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_financial` |
|
|
| Tablas | accounts, journals, entries, invoices, payments |
|
|
| Endpoints | 20+ |
|
|
| Dependencias | MGN-005 |
|
|
| Usado por | Sales, Purchases, Verticales |
|
|
|
|
**Funcionalidades:**
|
|
- Plan de cuentas
|
|
- Diarios contables
|
|
- Asientos contables
|
|
- Facturas (ventas/compras)
|
|
- Pagos
|
|
- Conciliacion bancaria basica
|
|
|
|
---
|
|
|
|
### MGN-011: Inventory
|
|
|
|
**Proposito:** Inventario y stock
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_inventory` |
|
|
| Tablas | products, warehouses, locations, stock_moves |
|
|
| Endpoints | 15+ |
|
|
| Dependencias | MGN-005, Products |
|
|
| Usado por | Sales, Purchases, Verticales |
|
|
|
|
**Funcionalidades:**
|
|
- Almacenes y ubicaciones
|
|
- Movimientos de stock
|
|
- Valoracion de inventario
|
|
- Ajustes de inventario
|
|
- Transferencias
|
|
|
|
---
|
|
|
|
### MGN-012: Purchasing
|
|
|
|
**Proposito:** Compras
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_purchases` |
|
|
| Tablas | purchase_orders, po_lines, supplier_info |
|
|
| Endpoints | 12+ |
|
|
| Dependencias | MGN-005, MGN-010, MGN-011 |
|
|
| Usado por | Verticales |
|
|
|
|
**Funcionalidades:**
|
|
- Ordenes de compra
|
|
- Recepciones
|
|
- Facturacion de compras
|
|
- Proveedores por producto
|
|
- Solicitudes de compra
|
|
|
|
---
|
|
|
|
### MGN-013: Sales
|
|
|
|
**Proposito:** Ventas
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_sales` |
|
|
| Tablas | sale_orders, so_lines, quotations |
|
|
| Endpoints | 15+ |
|
|
| Dependencias | MGN-005, MGN-010, MGN-011 |
|
|
| Usado por | Verticales |
|
|
|
|
**Funcionalidades:**
|
|
- Cotizaciones
|
|
- Ordenes de venta
|
|
- Entregas
|
|
- Facturacion de ventas
|
|
- Precios y descuentos
|
|
|
|
---
|
|
|
|
### MGN-014: CRM
|
|
|
|
**Proposito:** CRM basico
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_crm` |
|
|
| Tablas | leads, opportunities, activities, stages |
|
|
| Endpoints | 12+ |
|
|
| Dependencias | MGN-005, Partners |
|
|
| Usado por | Sales, Verticales |
|
|
|
|
**Funcionalidades:**
|
|
- Leads y oportunidades
|
|
- Pipeline de ventas
|
|
- Actividades y seguimiento
|
|
- Conversion a cliente
|
|
- Reportes de funnel
|
|
|
|
---
|
|
|
|
### MGN-015: Projects
|
|
|
|
**Proposito:** Proyectos genericos
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `core_projects` |
|
|
| Tablas | projects, tasks, timesheets |
|
|
| Endpoints | 12+ |
|
|
| Dependencias | MGN-002, MGN-005 |
|
|
| Usado por | Verticales |
|
|
|
|
**Funcionalidades:**
|
|
- Proyectos y tareas
|
|
- Asignacion de recursos
|
|
- Registro de tiempo
|
|
- Estados y etapas
|
|
- Kanban view
|
|
|
|
---
|
|
|
|
### MGN-016: Billing
|
|
|
|
**Proposito:** Suscripciones y pagos SaaS con Stripe
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `billing` |
|
|
| Tablas | subscriptions, invoices, payments, payment_methods |
|
|
| Endpoints | 15+ |
|
|
| Dependencias | MGN-001 Auth, MGN-004 Tenants |
|
|
| Usado por | MGN-017 Plans |
|
|
| Integracion | Stripe |
|
|
|
|
**Funcionalidades:**
|
|
- Suscripciones recurrentes (mensual/anual)
|
|
- Trial gratuito configurable
|
|
- Upgrade/downgrade con prorateo
|
|
- Webhooks Stripe sincronizados
|
|
- Portal de cliente Stripe integrado
|
|
- Facturas y recibos automaticos
|
|
- Multiples monedas (USD, MXN)
|
|
|
|
---
|
|
|
|
### MGN-017: Plans
|
|
|
|
**Proposito:** Planes, limites y feature gating
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `plans` |
|
|
| Tablas | plans, plan_features, tenant_limits |
|
|
| Endpoints | 10+ |
|
|
| Dependencias | MGN-016 Billing |
|
|
| Usado por | Todos los modulos |
|
|
|
|
**Funcionalidades:**
|
|
- Planes Free, Starter, Pro, Enterprise
|
|
- Feature gating por plan
|
|
- Limites numericos (usuarios, storage, etc.)
|
|
- Verificacion de features en tiempo real
|
|
- Upgrade paths configurables
|
|
|
|
**Planes propuestos:**
|
|
|
|
| Plan | Precio | Usuarios | Storage | Features |
|
|
|------|--------|----------|---------|----------|
|
|
| Free | $0/mes | 1 | 100MB | Core basico |
|
|
| Starter | $29/mes | 5 | 1GB | + API access |
|
|
| Pro | $79/mes | 20 | 10GB | + AI + Webhooks |
|
|
| Enterprise | $199/mes | Unlimited | Unlimited | + Custom + SLA |
|
|
|
|
---
|
|
|
|
### MGN-018: Webhooks
|
|
|
|
**Proposito:** Webhooks outbound con firma HMAC
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `webhooks` |
|
|
| Tablas | webhook_endpoints, webhook_events, webhook_deliveries |
|
|
| Endpoints | 8+ |
|
|
| Dependencias | MGN-001 Auth, MGN-004 Tenants |
|
|
| Usado por | Integraciones externas |
|
|
| Cola | BullMQ (Redis) |
|
|
|
|
**Funcionalidades:**
|
|
- Registro de endpoints por tenant
|
|
- Firma HMAC-SHA256 en cada request
|
|
- Politica de reintentos exponencial
|
|
- Log de entregas y respuestas
|
|
- Eventos: user.*, subscription.*, invoice.*
|
|
|
|
**Eventos disponibles:**
|
|
|
|
| Evento | Descripcion |
|
|
|--------|-------------|
|
|
| user.created | Usuario creado |
|
|
| subscription.created | Suscripcion creada |
|
|
| subscription.cancelled | Suscripcion cancelada |
|
|
| invoice.paid | Factura pagada |
|
|
|
|
---
|
|
|
|
### MGN-019: Feature Flags
|
|
|
|
**Proposito:** Feature flags por tenant y usuario
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `feature_flags` |
|
|
| Tablas | flags, tenant_flags, user_flags |
|
|
| Endpoints | 6+ |
|
|
| Dependencias | MGN-001 Auth, MGN-004 Tenants |
|
|
| Usado por | Todos los modulos |
|
|
|
|
**Funcionalidades:**
|
|
- Flags globales con valor default
|
|
- Override por tenant
|
|
- Override por usuario
|
|
- Rollout gradual (porcentaje)
|
|
- A/B testing
|
|
- Evaluacion por contexto
|
|
|
|
---
|
|
|
|
### MGN-020: AI Integration
|
|
|
|
**Proposito:** Gateway LLM multi-proveedor (OpenRouter)
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `ai` |
|
|
| Tablas | ai_conversations, ai_messages, ai_usage_logs |
|
|
| Endpoints | 10+ |
|
|
| Dependencias | MGN-001 Auth, MGN-004 Tenants |
|
|
| Usado por | MGN-021 WhatsApp Business |
|
|
| Integracion | OpenRouter |
|
|
|
|
**Funcionalidades:**
|
|
- Acceso a 50+ modelos LLM
|
|
- Cambio de modelo sin codigo
|
|
- Fallback automatico entre modelos
|
|
- Token tracking por tenant
|
|
- Rate limiting por plan
|
|
- Configuracion por tenant
|
|
|
|
**Modelos soportados:**
|
|
|
|
| Modelo | Costo/1M tokens | Uso |
|
|
|--------|-----------------:|-----|
|
|
| Claude 3 Haiku | $0.25 | Default |
|
|
| Claude 3 Sonnet | $3.00 | Premium |
|
|
| GPT-4o-mini | $0.15 | Fallback |
|
|
| Mistral 7B | $0.06 | Economico |
|
|
|
|
---
|
|
|
|
### MGN-021: WhatsApp Business
|
|
|
|
**Proposito:** WhatsApp Business con IA conversacional
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | `whatsapp` |
|
|
| Tablas | whatsapp_sessions, whatsapp_messages, whatsapp_templates |
|
|
| Endpoints | 15+ |
|
|
| Dependencias | MGN-020 AI Integration |
|
|
| Usado por | Verticales |
|
|
| Integracion | Meta WhatsApp Cloud API |
|
|
|
|
**Funcionalidades:**
|
|
- Webhook receiver Meta Cloud API
|
|
- Procesamiento de mensajes (texto, audio, imagen)
|
|
- Transcripcion de audio (Whisper)
|
|
- OCR de imagenes (Google Vision)
|
|
- IA conversacional con contexto
|
|
- Templates HSM pre-aprobados
|
|
- Envio de mensajes outbound
|
|
|
|
**Flujo de mensaje:**
|
|
```
|
|
Cliente -> WhatsApp -> Webhook -> LLM -> MCP -> Respuesta
|
|
```
|
|
|
|
---
|
|
|
|
### MGN-022: MCP Server
|
|
|
|
**Proposito:** Model Context Protocol Server para herramientas de negocio
|
|
|
|
| Aspecto | Detalle |
|
|
|---------|---------|
|
|
| Schema BD | N/A (usa otros schemas) |
|
|
| Endpoints | N/A (Protocolo MCP) |
|
|
| Dependencias | MGN-020 AI Integration |
|
|
| Usado por | Clientes MCP (Claude Desktop, IA conversacional) |
|
|
| Protocolo | MCP (Anthropic) |
|
|
| Puerto | 3142 |
|
|
|
|
**Funcionalidades:**
|
|
- Servidor MCP standalone
|
|
- Herramientas de negocio expuestas a LLMs
|
|
- Contexto multi-tenant
|
|
- Autenticacion por API key
|
|
|
|
**Herramientas disponibles:**
|
|
|
|
| Tool | Descripcion |
|
|
|------|-------------|
|
|
| product_list | Listar productos |
|
|
| product_details | Detalles de producto |
|
|
| product_availability | Disponibilidad |
|
|
| inventory_stock | Consultar stock |
|
|
| inventory_low_stock | Alertas stock bajo |
|
|
| sales_create_order | Crear orden |
|
|
| sales_order_status | Estado de orden |
|
|
| customer_search | Buscar cliente |
|
|
| fiado_balance | Balance fiados |
|
|
|
|
---
|
|
|
|
## Orden de Implementacion Recomendado
|
|
|
|
```
|
|
Fase 1: Foundation
|
|
├── MGN-001 Auth
|
|
├── MGN-002 Users
|
|
├── MGN-003 Roles
|
|
└── MGN-004 Tenants
|
|
|
|
Fase 2: Core Business
|
|
├── MGN-005 Catalogs
|
|
├── MGN-006 Settings
|
|
├── MGN-010 Financial
|
|
├── MGN-011 Inventory
|
|
├── MGN-012 Purchasing
|
|
└── MGN-013 Sales
|
|
|
|
Fase 3: Extended
|
|
├── MGN-007 Audit
|
|
├── MGN-008 Notifications
|
|
├── MGN-009 Reports
|
|
├── MGN-014 CRM
|
|
└── MGN-015 Projects
|
|
|
|
Fase 4: SaaS Platform
|
|
├── MGN-016 Billing (depende de MGN-004)
|
|
├── MGN-017 Plans (depende de MGN-016)
|
|
├── MGN-018 Webhooks (depende de MGN-004)
|
|
└── MGN-019 Feature Flags (depende de MGN-004)
|
|
|
|
Fase 5: IA Intelligence
|
|
├── MGN-020 AI Integration (depende de MGN-004)
|
|
├── MGN-021 WhatsApp Business (depende de MGN-020)
|
|
└── MGN-022 MCP Server (depende de MGN-020)
|
|
```
|
|
|
|
---
|
|
|
|
## Dependencias entre Modulos
|
|
|
|
```mermaid
|
|
graph TD
|
|
subgraph "Fase 1: Foundation"
|
|
MGN001[MGN-001 Auth]
|
|
MGN002[MGN-002 Users]
|
|
MGN003[MGN-003 Roles]
|
|
MGN004[MGN-004 Tenants]
|
|
end
|
|
|
|
subgraph "Fase 2-3: Core/Extended"
|
|
MGN005[MGN-005 Catalogs]
|
|
MGN010[MGN-010 Financial]
|
|
MGN011[MGN-011 Inventory]
|
|
MGN008[MGN-008 Notifications]
|
|
end
|
|
|
|
subgraph "Fase 4: SaaS Platform"
|
|
MGN016[MGN-016 Billing]
|
|
MGN017[MGN-017 Plans]
|
|
MGN018[MGN-018 Webhooks]
|
|
MGN019[MGN-019 Feature Flags]
|
|
end
|
|
|
|
subgraph "Fase 5: IA Intelligence"
|
|
MGN020[MGN-020 AI Integration]
|
|
MGN021[MGN-021 WhatsApp Business]
|
|
MGN022[MGN-022 MCP Server]
|
|
end
|
|
|
|
MGN001 --> MGN002
|
|
MGN001 --> MGN004
|
|
MGN002 --> MGN003
|
|
MGN004 --> MGN005
|
|
MGN005 --> MGN010
|
|
MGN005 --> MGN011
|
|
|
|
%% SaaS Platform
|
|
MGN004 --> MGN016
|
|
MGN016 --> MGN017
|
|
MGN004 --> MGN018
|
|
MGN004 --> MGN019
|
|
|
|
%% IA Intelligence
|
|
MGN004 --> MGN020
|
|
MGN020 --> MGN021
|
|
MGN020 --> MGN022
|
|
MGN021 --> MGN022
|
|
```
|
|
|
|
---
|
|
|
|
## Proximas Acciones
|
|
|
|
1. **Completar documentacion Fase 1: Foundation**
|
|
- MGN-001 Auth: DDL, Backend Spec, User Stories
|
|
- MGN-002 Users: DDL, Backend Spec, User Stories
|
|
- MGN-003 Roles: RBAC design
|
|
- MGN-004 Tenants: RLS implementation
|
|
|
|
2. **Planificar Fase 4: SaaS Platform**
|
|
- MGN-016 Billing: Stripe integration, webhooks
|
|
- MGN-017 Plans: Feature gating, limits
|
|
- MGN-018 Webhooks: HMAC signing, retries
|
|
- MGN-019 Feature Flags: Rollout, A/B testing
|
|
|
|
3. **Planificar Fase 5: IA Intelligence**
|
|
- MGN-020 AI Integration: OpenRouter gateway
|
|
- MGN-021 WhatsApp Business: Meta Cloud API
|
|
- MGN-022 MCP Server: Business tools
|
|
|
|
---
|
|
|
|
## Referencias
|
|
|
|
| Documento | Path |
|
|
|-----------|------|
|
|
| Vision General | [VISION-ERP-CORE.md](../00-vision-general/VISION-ERP-CORE.md) |
|
|
| Arquitectura SaaS | [ARQUITECTURA-SAAS.md](../00-vision-general/ARQUITECTURA-SAAS.md) |
|
|
| Arquitectura IA | [ARQUITECTURA-IA.md](../00-vision-general/ARQUITECTURA-IA.md) |
|
|
| Integraciones | [INTEGRACIONES-EXTERNAS.md](../00-vision-general/INTEGRACIONES-EXTERNAS.md) |
|
|
| Stack Tecnologico | [STACK-TECNOLOGICO.md](../00-vision-general/STACK-TECNOLOGICO.md) |
|
|
|
|
---
|
|
|
|
*Ultima actualizacion: Enero 2026*
|