erp-core/docs/_MAP.md
rckrdmrd 0086695b4c
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
[SIMCO-V38] feat: Actualizar a SIMCO v3.8.0 + cambios backend
- 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>
2026-01-10 08:53:05 -06:00

225 lines
9.2 KiB
Markdown

# Mapa de Documentacion: erp-core
**Proyecto:** erp-core
**Actualizado:** 2026-01-10
**Generado por:** Backend-Agent + Frontend-Agent + Architecture-Analyst
**Version:** 2.0.0
---
## Estado del Proyecto
| Fase | Nombre | Sprints | Estado |
|------|--------|---------|--------|
| 01 | Foundation | 1-5 | Completado |
| 02 | Core Business | 6-13 | Completado |
| 03 | Mobile | 14-15 | Completado |
| 04 | SaaS Platform | - | Planificado |
| 05 | IA Intelligence | - | Planificado |
### Sprints Completados
| Sprint | Nombre | Story Points | Estado |
|--------|--------|--------------|--------|
| Sprint 1-4 | Auth, Users, Roles, Tenants | 120 SP | Completado |
| Sprint 5 | Security Enhancements | 29 SP | Completado |
| Sprint 6 | Catalogs & Settings | 35 SP | Completado |
| Sprint 7 | Audit & Notifications | 35 SP | Completado |
| Sprint 8-13 | Reports & Financial | 60 SP | Completado |
| Sprint 14 | Mobile Foundation | 21 SP | Completado |
| Sprint 15 | Mobile Extended + Testing | 10 SP | Completado |
---
## Estructura de Documentacion
```
docs/
├── _MAP.md # Este archivo (indice)
├── 00-vision-general/ # Vision general y arquitectura
│ ├── VISION-ERP-CORE.md # Documento principal
│ ├── ARQUITECTURA-SAAS.md # Arquitectura SaaS
│ ├── ARQUITECTURA-IA.md # Arquitectura IA
│ ├── INTEGRACIONES-EXTERNAS.md # Catalogo de integraciones
│ └── STACK-TECNOLOGICO.md # Stack tecnologico
├── 01-fase-foundation/ # Modulos Fase 1 (MGN-001 a MGN-004)
│ ├── MGN-001-auth/ # Autenticacion
│ ├── MGN-002-users/ # Usuarios
│ ├── MGN-003-roles/ # Roles y Permisos
│ └── MGN-004-tenants/ # Multi-tenancy
├── 02-fase-core-business/ # Modulos Fase 2 (MGN-005 a MGN-015)
│ ├── MGN-005-catalogs/ # Catalogos
│ ├── MGN-006-settings/ # Settings
│ ├── MGN-007-audit/ # Auditoria
│ ├── MGN-008-notifications/ # Notificaciones multicanal
│ ├── MGN-009-reports/ # Reports
│ ├── MGN-010-financial/ # Financial
│ ├── MGN-011-inventory/ # Inventario
│ ├── MGN-012-purchasing/ # Compras
│ ├── MGN-013-sales/ # Ventas
│ ├── MGN-014-crm/ # CRM
│ └── MGN-015-projects/ # Proyectos
├── 03-fase-mobile/ # Modulos Mobile
│ └── MOB-001-foundation/ # Mobile Foundation
├── 04-fase-saas/ # Modulos SaaS Platform (MGN-016 a MGN-019)
│ ├── MGN-016-billing/ # Billing con Stripe
│ ├── MGN-017-plans/ # Planes y feature gating
│ ├── MGN-018-webhooks/ # Webhooks outbound
│ └── MGN-019-feature-flags/ # Feature flags
├── 05-fase-ia/ # Modulos IA Intelligence (MGN-020 a MGN-022)
│ ├── MGN-020-ai-integration/ # Gateway LLM (OpenRouter)
│ ├── MGN-021-whatsapp-business/ # WhatsApp Business
│ └── MGN-022-mcp-server/ # MCP Server
├── 06-modelado/ # Modelos de datos
├── 07-user-stories/ # Historias de usuario
├── 97-adr/ # Architecture Decision Records
└── 99-historial/ # Historial de reestructuracion
```
## Navegacion por Modulos
### Fase 1: Foundation (Completada)
| Modulo | Nombre | SP | Estado |
|--------|--------|---:|--------|
| [MGN-001](./01-fase-foundation/MGN-001-auth/_MAP.md) | Auth | 35 | Implementado |
| [MGN-002](./01-fase-foundation/MGN-002-users/_MAP.md) | Users | 25 | Implementado |
| [MGN-003](./01-fase-foundation/MGN-003-roles/_MAP.md) | Roles | 25 | Implementado |
| [MGN-004](./01-fase-foundation/MGN-004-tenants/_MAP.md) | Tenants | 35 | Implementado |
### Fase 2: Core Business (Completada)
| Modulo | Nombre | SP | Sprint | Estado |
|--------|--------|---:|--------|--------|
| [MGN-005](./02-fase-core-business/MGN-005-catalogs/_MAP.md) | Catalogs | 30 | 6 | Implementado |
| [MGN-006](./02-fase-core-business/MGN-006-settings/_MAP.md) | Settings | 25 | 6 | Implementado |
| [MGN-007](./02-fase-core-business/MGN-007-audit/_MAP.md) | Audit | 30 | 7 | Implementado |
| [MGN-008](./02-fase-core-business/MGN-008-notifications/_MAP.md) | Notifications | 25 | 7 | Implementado |
| [MGN-009](./02-fase-core-business/MGN-009-reports/_MAP.md) | Reports | 45 | 8-13 | Implementado |
| [MGN-010](./02-fase-core-business/MGN-010-financial/_MAP.md) | Financial | 15 | 8-13 | Implementado |
### Fase 3: Mobile (Completada)
| Modulo | Nombre | SP | Sprint | Estado |
|--------|--------|---:|--------|--------|
| [MOB-001](./03-fase-mobile/MOB-001-foundation/_MAP.md) | Mobile Foundation | 31 | 14-15 | Implementado |
### Fase 4: SaaS Platform (Planificada)
| Modulo | Nombre | Descripcion | Estado |
|--------|--------|-------------|--------|
| [MGN-016](./04-fase-saas/MGN-016-billing/) | Billing | Suscripciones y pagos (Stripe) | Planificado |
| [MGN-017](./04-fase-saas/MGN-017-plans/) | Plans | Planes, limites y feature gating | Planificado |
| [MGN-018](./04-fase-saas/MGN-018-webhooks/) | Webhooks | Webhooks outbound con HMAC | Planificado |
| [MGN-019](./04-fase-saas/MGN-019-feature-flags/) | Feature Flags | Feature flags por tenant/usuario | Planificado |
### Fase 5: IA Intelligence (Planificada)
| Modulo | Nombre | Descripcion | Estado |
|--------|--------|-------------|--------|
| [MGN-020](./05-fase-ia/MGN-020-ai-integration/) | AI Integration | Gateway LLM (OpenRouter) | Planificado |
| [MGN-021](./05-fase-ia/MGN-021-whatsapp-business/) | WhatsApp Business | WhatsApp con IA conversacional | Planificado |
| [MGN-022](./05-fase-ia/MGN-022-mcp-server/) | MCP Server | Model Context Protocol Server | Planificado |
---
## Estadisticas
- **Total Modulos:** 22 (MGN-001 a MGN-022 + MOB-001)
- **Total Story Points:** 310+ SP (Fases 1-3)
- **Total Tests:** 700+ passing (Backend, Frontend, Mobile)
- **Total Tablas DB:** 191 (Core) + Pending (SaaS/IA)
- **Total Endpoints:** 80+ (documentados en OpenAPI)
- **API Documentation:** Swagger UI `/api/v1/docs`
- **Frontend Dark Mode:** Implementado
- **Mobile App:** Expo 51 con 6 screens, offline, notifications, biometrics
- **CI/CD:** GitHub Actions (8 jobs)
### Cobertura por Fase
| Fase | Modulos | Estado |
|------|---------|--------|
| Foundation | MGN-001 a MGN-004 | Implementado |
| Core Business | MGN-005 a MGN-015 | En desarrollo |
| Mobile | MOB-001 | Implementado |
| SaaS Platform | MGN-016 a MGN-019 | Planificado |
| IA Intelligence | MGN-020 a MGN-022 | Planificado |
---
## API Documentation (DOC-001)
| Recurso | Ubicacion |
|---------|-----------|
| OpenAPI Spec | `backend/src/docs/openapi.yaml` |
| Swagger UI | http://localhost:3000/api/v1/docs |
| Swagger Config | `backend/src/config/swagger.config.ts` |
**Cobertura:** 18 tags, 12 schemas, 80+ endpoints documentados.
---
## Frontend Components (FE-003)
### Atoms
| Componente | Descripcion | Dark Mode |
|------------|-------------|-----------|
| Avatar | Avatar de usuario | Si |
| Badge | Badges/etiquetas | Si |
| Button | Botones (primary, secondary, outline, danger) | Si |
| Input | Inputs de formulario | Si |
| Label | Labels de formulario | Si |
| Spinner | Indicador de carga | Si |
| ThemePreview | Preview de temas | Si |
| **ThemeSelector** | Selector de tema (icon/buttons/dropdown) | Si |
| Tooltip | Tooltips informativos | Si |
### Providers
| Provider | Descripcion |
|----------|-------------|
| ThemeProvider | Gestiona tema (light/dark/system) |
| AppProviders | Wrapper con todos los providers |
---
## CHANGELOGs
| Fecha | Archivo | Descripcion |
|-------|---------|-------------|
| 2026-01-04 | [CHANGELOG-TYPEORM-FIXES](../backend/docs/CHANGELOG-2026-01-04-TYPEORM-FIXES.md) | TypeORM migration fixes |
| 2026-01-07 | [CHANGELOG-DOC001-FE003](../backend/docs/CHANGELOG-2026-01-07-DOC001-FE003.md) | API Docs Swagger + Dark Mode UI |
---
## Database DDL Files
| Archivo | Schema | Tablas |
|---------|--------|--------|
| 01-auth.sql | auth | users, sessions, tokens |
| 01-auth-extensions.sql | auth | oauth, mfa |
| 01-auth-mfa-email-verification.sql | auth | mfa_secrets, email_verifications |
| 02-core.sql | core | countries, currencies, uom |
| 02-core-extensions.sql | core | currency_rates |
| 09-system.sql | system | notifications, logs |
| 09-system-extensions.sql | system, tenants, auth | settings |
| 13-audit.sql | audit | audit_logs, access_logs, security_events |
---
## Vision General
Los documentos de vision y arquitectura estan en `00-vision-general/`:
| Documento | Descripcion |
|-----------|-------------|
| [VISION-ERP-CORE](./00-vision-general/VISION-ERP-CORE.md) | Vision general, alcances Core/SaaS/IA |
| [ARQUITECTURA-SAAS](./00-vision-general/ARQUITECTURA-SAAS.md) | Multi-tenancy RLS, Billing, Plans |
| [ARQUITECTURA-IA](./00-vision-general/ARQUITECTURA-IA.md) | LLM Gateway, MCP Server, WhatsApp |
| [INTEGRACIONES-EXTERNAS](./00-vision-general/INTEGRACIONES-EXTERNAS.md) | Stripe, SendGrid, OpenRouter, S3 |
| [STACK-TECNOLOGICO](./00-vision-general/STACK-TECNOLOGICO.md) | Node.js, React, PostgreSQL, Redis |
---
**Ultima actualizacion:** 2026-01-10 (v2.0 - SaaS/IA Integration)
**Metodologia:** NEXUS v3.4 + SIMCO