feat: Add orchestration context and environment configuration
- Add CONTEXT-MAP.yml and ENVIRONMENT-INVENTORY.yml - Add propagacion-fase8 directory - Update project dependencies and context 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d55fa66523
commit
106adc1de0
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Database Constants - Schema and table names for ERP-Suite
|
* Database Constants - Schema and table names for ERP-Suite
|
||||||
*
|
*
|
||||||
* @module @erp-suite/core/constants
|
* @module @erp-suite/shared/constants
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pagination Types - Shared across all ERP-Suite modules
|
* Pagination Types - Shared across all ERP-Suite modules
|
||||||
*
|
*
|
||||||
* @module @erp-suite/core/types
|
* @module @erp-suite/shared/types
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -381,7 +381,7 @@ ADD COLUMN deleted_at TIMESTAMPTZ;
|
|||||||
- Multi-company
|
- Multi-company
|
||||||
- Wizard pattern for complex operations
|
- Wizard pattern for complex operations
|
||||||
|
|
||||||
Ver: `/home/isem/workspace/core/knowledge-base/patterns/PATRON-CORE-ODOO.md`
|
Ver: `../../erp-core/orchestration/directivas/DIRECTIVA-PATRONES-ODOO.md`
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
@ -560,6 +560,6 @@ Ver documentación completa: [MULTI-TENANCY.md](./MULTI-TENANCY.md)
|
|||||||
|
|
||||||
- [Multi-Tenancy Guide](./MULTI-TENANCY.md)
|
- [Multi-Tenancy Guide](./MULTI-TENANCY.md)
|
||||||
- [Vertical Development Guide](./VERTICAL-GUIDE.md)
|
- [Vertical Development Guide](./VERTICAL-GUIDE.md)
|
||||||
- [Odoo Patterns](../../../workspace/core/knowledge-base/patterns/PATRON-CORE-ODOO.md)
|
- [Odoo Patterns](../../erp-core/orchestration/directivas/DIRECTIVA-PATRONES-ODOO.md)
|
||||||
- [Database Schema](../apps/erp-core/database/ddl/)
|
- [Database Schema](../apps/erp-core/database/ddl/)
|
||||||
- [Directivas ERP](../apps/erp-core/orchestration/directivas/)
|
- [Directivas ERP](../apps/erp-core/orchestration/directivas/)
|
||||||
|
|||||||
@ -337,7 +337,7 @@ apps/verticales/{vertical}/
|
|||||||
- `core/orchestration/templates/TEMPLATE-PLAN.md`
|
- `core/orchestration/templates/TEMPLATE-PLAN.md`
|
||||||
|
|
||||||
### Recursos de Referencia
|
### Recursos de Referencia
|
||||||
- **Catálogo central:** `core/catalog/` *(componentes reutilizables)*
|
- **Catálogo central:** `shared/catalog/` *(componentes reutilizables)*
|
||||||
- **Estándares:** `core/standards/` *(estándares de documentación)*
|
- **Estándares:** `core/standards/` *(estándares de documentación)*
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@ -188,8 +188,8 @@ COMMENT ON TABLE my_vertical_management.custom_entities IS
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
// backend/src/modules/projects/vertical-project.service.ts
|
// backend/src/modules/projects/vertical-project.service.ts
|
||||||
import { ProjectService } from '@erp-core/modules/projects/project.service';
|
import { ProjectService } from '@erp-shared/modules/projects/project.service';
|
||||||
import { CreateProjectDto } from '@erp-core/modules/projects/dto';
|
import { CreateProjectDto } from '@erp-shared/modules/projects/dto';
|
||||||
|
|
||||||
interface CreateVerticalProjectDto extends CreateProjectDto {
|
interface CreateVerticalProjectDto extends CreateProjectDto {
|
||||||
// Add vertical-specific fields
|
// Add vertical-specific fields
|
||||||
@ -530,13 +530,13 @@ Create documentation for your vertical:
|
|||||||
import { ProjectService } from '../../../erp-core/backend/src/modules/projects/project.service';
|
import { ProjectService } from '../../../erp-core/backend/src/modules/projects/project.service';
|
||||||
|
|
||||||
// Option 2: Package import (if separate packages)
|
// Option 2: Package import (if separate packages)
|
||||||
import { ProjectService } from '@erp-core/modules/projects';
|
import { ProjectService } from '@erp-shared/modules/projects';
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Share Types
|
#### Share Types
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
// shared-libs/core/types/index.ts
|
// shared-libs/shared/types/index.ts
|
||||||
export interface BaseEntity {
|
export interface BaseEntity {
|
||||||
id: string;
|
id: string;
|
||||||
tenantId: string;
|
tenantId: string;
|
||||||
@ -760,4 +760,4 @@ VERTICAL_DB_SCHEMA=my_vertical_management
|
|||||||
- [Architecture Documentation](./ARCHITECTURE.md)
|
- [Architecture Documentation](./ARCHITECTURE.md)
|
||||||
- [Multi-Tenancy Guide](./MULTI-TENANCY.md)
|
- [Multi-Tenancy Guide](./MULTI-TENANCY.md)
|
||||||
- [Core Modules Documentation](../apps/erp-core/docs/)
|
- [Core Modules Documentation](../apps/erp-core/docs/)
|
||||||
- [Odoo Development Patterns](../../../workspace/core/knowledge-base/patterns/PATRON-CORE-ODOO.md)
|
- [Odoo Development Patterns](../../erp-core/orchestration/directivas/DIRECTIVA-PATRONES-ODOO.md)
|
||||||
|
|||||||
@ -99,7 +99,7 @@ Este proyecto utiliza las siguientes funcionalidades del catálogo core:
|
|||||||
| `auth` | Autenticación centralizada |
|
| `auth` | Autenticación centralizada |
|
||||||
| `multi-tenancy` | Separación por empresa/sucursal |
|
| `multi-tenancy` | Separación por empresa/sucursal |
|
||||||
|
|
||||||
**Path catálogo:** `~/workspace/core/catalog/`
|
**Path catálogo:** `~/workspace/shared/catalog/`
|
||||||
|
|
||||||
## Uso para Subagentes
|
## Uso para Subagentes
|
||||||
|
|
||||||
|
|||||||
197
orchestration/CONTEXT-MAP.yml
Normal file
197
orchestration/CONTEXT-MAP.yml
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
# CONTEXT-MAP: ERP-SUITE
|
||||||
|
# Sistema: SIMCO - NEXUS v4.0
|
||||||
|
# Propósito: Mapear contexto automático por nivel y tarea
|
||||||
|
# Versión: 1.0.0
|
||||||
|
# Fecha: 2026-01-04
|
||||||
|
|
||||||
|
metadata:
|
||||||
|
proyecto: "erp-suite"
|
||||||
|
nivel: "SUITE"
|
||||||
|
version: "1.0.0"
|
||||||
|
ultima_actualizacion: "2026-01-04"
|
||||||
|
workspace_root: "/home/isem/workspace-v1"
|
||||||
|
project_root: "/home/isem/workspace-v1/projects/erp-suite"
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
# VARIABLES DEL PROYECTO (PRE-RESUELTAS)
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
variables:
|
||||||
|
# Identificación
|
||||||
|
PROJECT: "erp-suite"
|
||||||
|
PROJECT_NAME: "ERP-SUITE"
|
||||||
|
PROJECT_LEVEL: "SUITE"
|
||||||
|
|
||||||
|
# Paths principales
|
||||||
|
APPS_ROOT: "/home/isem/workspace-v1/projects/erp-suite/apps"
|
||||||
|
DOCS_ROOT: "/home/isem/workspace-v1/projects/erp-suite/docs"
|
||||||
|
ORCHESTRATION_PATH: "/home/isem/workspace-v1/projects/erp-suite/orchestration"
|
||||||
|
DOCKER_PATH: "/home/isem/workspace-v1/projects/erp-suite/docker"
|
||||||
|
SCRIPTS_PATH: "/home/isem/workspace-v1/projects/erp-suite/scripts"
|
||||||
|
|
||||||
|
# Verticales
|
||||||
|
VERTICALES:
|
||||||
|
- erp-core
|
||||||
|
- erp-clinicas
|
||||||
|
- erp-construccion
|
||||||
|
- erp-mecanicas-diesel
|
||||||
|
- erp-retail
|
||||||
|
- erp-vidrio-templado
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
# ALIASES RESUELTOS
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
aliases:
|
||||||
|
# Directivas globales
|
||||||
|
"@SIMCO": "/home/isem/workspace-v1/orchestration/directivas/simco"
|
||||||
|
"@PRINCIPIOS": "/home/isem/workspace-v1/orchestration/directivas/principios"
|
||||||
|
"@PERFILES": "/home/isem/workspace-v1/orchestration/agents/perfiles"
|
||||||
|
"@CATALOG": "/home/isem/workspace-v1/shared/catalog"
|
||||||
|
|
||||||
|
# Suite específico
|
||||||
|
"@APPS": "/home/isem/workspace-v1/projects/erp-suite/apps"
|
||||||
|
"@PRODUCTS": "/home/isem/workspace-v1/projects/erp-suite/apps/products"
|
||||||
|
"@SAAS": "/home/isem/workspace-v1/projects/erp-suite/apps/saas"
|
||||||
|
"@SHARED_LIBS": "/home/isem/workspace-v1/projects/erp-suite/apps/shared-libs"
|
||||||
|
"@DOCS": "/home/isem/workspace-v1/projects/erp-suite/docs"
|
||||||
|
|
||||||
|
# Verticales como proyectos separados
|
||||||
|
"@ERP_CORE": "/home/isem/workspace-v1/projects/erp-core"
|
||||||
|
"@ERP_CLINICAS": "/home/isem/workspace-v1/projects/erp-clinicas"
|
||||||
|
"@ERP_CONSTRUCCION": "/home/isem/workspace-v1/projects/erp-construccion"
|
||||||
|
"@ERP_MECANICAS": "/home/isem/workspace-v1/projects/erp-mecanicas-diesel"
|
||||||
|
"@ERP_RETAIL": "/home/isem/workspace-v1/projects/erp-retail"
|
||||||
|
"@ERP_VIDRIO": "/home/isem/workspace-v1/projects/erp-vidrio-templado"
|
||||||
|
|
||||||
|
# Inventarios
|
||||||
|
"@INVENTORY": "/home/isem/workspace-v1/projects/erp-suite/orchestration/inventarios"
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
# CONTEXTO POR NIVEL
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
contexto_por_nivel:
|
||||||
|
L0_sistema:
|
||||||
|
descripcion: "Principios fundamentales y perfil de agente"
|
||||||
|
tokens_estimados: 4500
|
||||||
|
obligatorio: true
|
||||||
|
archivos:
|
||||||
|
- path: "/home/isem/workspace-v1/orchestration/directivas/principios/PRINCIPIO-CAPVED.md"
|
||||||
|
proposito: "Ciclo de vida de tareas"
|
||||||
|
tokens: 800
|
||||||
|
- path: "/home/isem/workspace-v1/orchestration/directivas/principios/PRINCIPIO-DOC-PRIMERO.md"
|
||||||
|
proposito: "Documentación antes de código"
|
||||||
|
tokens: 500
|
||||||
|
- path: "/home/isem/workspace-v1/orchestration/directivas/principios/PRINCIPIO-ANTI-DUPLICACION.md"
|
||||||
|
proposito: "Verificar catálogo antes de crear"
|
||||||
|
tokens: 600
|
||||||
|
- path: "/home/isem/workspace-v1/orchestration/directivas/principios/PRINCIPIO-VALIDACION-OBLIGATORIA.md"
|
||||||
|
proposito: "Build/lint deben pasar"
|
||||||
|
tokens: 600
|
||||||
|
- path: "/home/isem/workspace-v1/orchestration/directivas/principios/PRINCIPIO-ECONOMIA-TOKENS.md"
|
||||||
|
proposito: "Límites de contexto"
|
||||||
|
tokens: 500
|
||||||
|
- path: "/home/isem/workspace-v1/orchestration/directivas/principios/PRINCIPIO-NO-ASUMIR.md"
|
||||||
|
proposito: "Preguntar si falta información"
|
||||||
|
tokens: 500
|
||||||
|
- path: "/home/isem/workspace-v1/orchestration/referencias/ALIASES.yml"
|
||||||
|
proposito: "Resolución de @ALIAS"
|
||||||
|
tokens: 400
|
||||||
|
|
||||||
|
L1_proyecto:
|
||||||
|
descripcion: "Contexto específico de ERP-SUITE"
|
||||||
|
tokens_estimados: 3000
|
||||||
|
obligatorio: true
|
||||||
|
archivos:
|
||||||
|
- path: "/home/isem/workspace-v1/projects/erp-suite/orchestration/00-guidelines/CONTEXTO-PROYECTO.md"
|
||||||
|
proposito: "Variables y configuración del proyecto"
|
||||||
|
tokens: 1500
|
||||||
|
- path: "/home/isem/workspace-v1/projects/erp-suite/orchestration/PROXIMA-ACCION.md"
|
||||||
|
proposito: "Estado actual y siguiente paso"
|
||||||
|
tokens: 500
|
||||||
|
|
||||||
|
L2_operacion:
|
||||||
|
descripcion: "SIMCO específicos según operación y dominio"
|
||||||
|
tokens_estimados: 2500
|
||||||
|
archivos_por_operacion:
|
||||||
|
CREAR:
|
||||||
|
- "/home/isem/workspace-v1/orchestration/directivas/simco/SIMCO-CREAR.md"
|
||||||
|
MODIFICAR:
|
||||||
|
- "/home/isem/workspace-v1/orchestration/directivas/simco/SIMCO-MODIFICAR.md"
|
||||||
|
VALIDAR:
|
||||||
|
- "/home/isem/workspace-v1/orchestration/directivas/simco/SIMCO-VALIDAR.md"
|
||||||
|
DELEGAR:
|
||||||
|
- "/home/isem/workspace-v1/orchestration/directivas/simco/SIMCO-DELEGACION.md"
|
||||||
|
|
||||||
|
L3_tarea:
|
||||||
|
descripcion: "Contexto específico de la tarea"
|
||||||
|
tokens_max: 8000
|
||||||
|
dinamico: true
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
# INFORMACIÓN ESPECÍFICA DEL PROYECTO
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
info_proyecto:
|
||||||
|
tipo: "Sistema ERP Multi-Vertical"
|
||||||
|
estado: "En desarrollo activo"
|
||||||
|
version: "1.0"
|
||||||
|
|
||||||
|
stack:
|
||||||
|
backend: "Node.js 20+, Express.js, TypeScript 5.3+, TypeORM"
|
||||||
|
frontend: "React 18, Vite, TypeScript, Tailwind CSS"
|
||||||
|
mobile: "React Native"
|
||||||
|
database: "PostgreSQL 15+ con RLS"
|
||||||
|
|
||||||
|
verticales_estado:
|
||||||
|
erp-core: "60%"
|
||||||
|
erp-construccion: "35%"
|
||||||
|
erp-vidrio-templado: "0%"
|
||||||
|
erp-mecanicas-diesel: "0%"
|
||||||
|
erp-retail: "0%"
|
||||||
|
erp-clinicas: "0%"
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
# VALIDACIÓN DE TOKENS
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
validacion_tokens:
|
||||||
|
limite_absoluto: 25000
|
||||||
|
limite_seguro: 18000
|
||||||
|
limite_alerta: 20000
|
||||||
|
|
||||||
|
presupuesto:
|
||||||
|
L0_sistema: 4500
|
||||||
|
L1_proyecto: 3000
|
||||||
|
L2_operacion: 2500
|
||||||
|
L3_tarea_max: 8000
|
||||||
|
total_base: 10000
|
||||||
|
disponible_tarea: 8000
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
# HERENCIA
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
herencia:
|
||||||
|
tipo: "SUITE"
|
||||||
|
hereda_de:
|
||||||
|
- "/home/isem/workspace-v1/orchestration/"
|
||||||
|
provee_a:
|
||||||
|
- "/home/isem/workspace-v1/projects/erp-core/"
|
||||||
|
- "/home/isem/workspace-v1/projects/erp-clinicas/"
|
||||||
|
- "/home/isem/workspace-v1/projects/erp-construccion/"
|
||||||
|
- "/home/isem/workspace-v1/projects/erp-mecanicas-diesel/"
|
||||||
|
- "/home/isem/workspace-v1/projects/erp-retail/"
|
||||||
|
- "/home/isem/workspace-v1/projects/erp-vidrio-templado/"
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
# BÚSQUEDA DE HISTÓRICO
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
busqueda_historico:
|
||||||
|
habilitado: true
|
||||||
|
ubicaciones:
|
||||||
|
- "/home/isem/workspace-v1/projects/erp-suite/orchestration/trazas/"
|
||||||
|
- "/home/isem/workspace-v1/orchestration/errores/REGISTRO-ERRORES.yml"
|
||||||
|
- "/home/isem/workspace-v1/shared/knowledge-base/lessons-learned/"
|
||||||
122
orchestration/PROJECT-STATUS.md
Normal file
122
orchestration/PROJECT-STATUS.md
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
# PROJECT STATUS - ERP Suite
|
||||||
|
|
||||||
|
**Fecha:** 2026-01-07
|
||||||
|
**Estado:** Gap Analysis Completo
|
||||||
|
**Fase:** Pre-Implementacion
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Resumen Ejecutivo
|
||||||
|
|
||||||
|
| Aspecto | Estado | Notas |
|
||||||
|
|---------|--------|-------|
|
||||||
|
| Gap Analysis | Completado | vs Odoo 18 |
|
||||||
|
| Documentacion | Completa | 30 specs transversales |
|
||||||
|
| Database Core | Pendiente | DDL no iniciado |
|
||||||
|
| Backend Core | Pendiente | NestJS planificado |
|
||||||
|
| Frontend Core | Pendiente | React planificado |
|
||||||
|
| Verticales | Planificacion | 5 verticales definidas |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Progreso por Componente
|
||||||
|
|
||||||
|
### ERP Core (2B.1)
|
||||||
|
|
||||||
|
| Aspecto | Documentacion | Implementacion |
|
||||||
|
|---------|---------------|----------------|
|
||||||
|
| Especificaciones | 100% | 0% |
|
||||||
|
| Workflows | 100% | 0% |
|
||||||
|
| Gaps P0 | 18/18 doc | 0/18 impl |
|
||||||
|
| Gaps P1 | 22/22 doc | 0/22 impl |
|
||||||
|
| Story Points | 394 SP | 0 SP |
|
||||||
|
|
||||||
|
### Verticales (2B.2)
|
||||||
|
|
||||||
|
| Vertical | Documentacion | Implementacion |
|
||||||
|
|----------|---------------|----------------|
|
||||||
|
| construccion | 35% | 0% |
|
||||||
|
| vidrio-templado | 0% | 0% |
|
||||||
|
| mecanicas-diesel | 0% | 0% |
|
||||||
|
| retail | 0% | 0% |
|
||||||
|
| clinicas | 0% | 0% |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Gap Analysis Completado
|
||||||
|
|
||||||
|
### Gaps P0 (Funcionales Criticos)
|
||||||
|
- Auth: API Keys, 2FA, OAuth2
|
||||||
|
- Users y Roles: Permisos granulares
|
||||||
|
- Tenants: Multi-tenancy completo
|
||||||
|
- 18 gaps documentados con specs
|
||||||
|
|
||||||
|
### Gaps P1 (Mejoras)
|
||||||
|
- 22 gaps documentados
|
||||||
|
- Patrones tecnicos definidos
|
||||||
|
|
||||||
|
### Workflows Documentados
|
||||||
|
1. Cierre de periodo contable
|
||||||
|
2. 3-Way Match (compras)
|
||||||
|
3. Pagos anticipados
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Estructura SIMCO
|
||||||
|
|
||||||
|
| Inventario | Estado |
|
||||||
|
|------------|--------|
|
||||||
|
| SUITE_MASTER_INVENTORY.yml | Creado |
|
||||||
|
| STATUS.yml | Creado |
|
||||||
|
| REFERENCIAS.yml | Creado |
|
||||||
|
| TRAZA-SUITE.md | Creado |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Proximas Acciones
|
||||||
|
|
||||||
|
### Opcion A: Implementar Modulos P0 Core (Recomendado)
|
||||||
|
1. MGN-001 Auth
|
||||||
|
2. MGN-002 Users
|
||||||
|
3. MGN-003 Roles
|
||||||
|
4. MGN-004 Tenants
|
||||||
|
|
||||||
|
### Opcion B: Documentar Herencia Verticales
|
||||||
|
- Crear HERENCIA-ERP-CORE.md en cada vertical
|
||||||
|
|
||||||
|
### Opcion C: Completar Estructura Verticales
|
||||||
|
- Verificar orchestration de verticales menores
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Riesgos
|
||||||
|
|
||||||
|
| Riesgo | Probabilidad | Impacto | Mitigacion |
|
||||||
|
|--------|--------------|---------|------------|
|
||||||
|
| Complejidad multi-vertical | Alta | Alto | Arquitectura modular |
|
||||||
|
| Divergencia verticales | Media | Alto | SIMCO propagacion |
|
||||||
|
| Migracion datos existentes | Media | Alto | ETL gradual |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Metricas
|
||||||
|
|
||||||
|
| Metrica | Objetivo | Actual |
|
||||||
|
|---------|----------|--------|
|
||||||
|
| Documentacion Core | 100% | 100% |
|
||||||
|
| Implementacion Core | 100% | 0% |
|
||||||
|
| Verticales documentadas | 5 | 1 (20%) |
|
||||||
|
| Story Points totales | 394 | 0 completados |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Referencias
|
||||||
|
|
||||||
|
- Analisis Gaps: `apps/erp-core/orchestration/01-analisis/ANALISIS-GAPS-CONSOLIDADO.md`
|
||||||
|
- Inventario: `apps/erp-core/orchestration/inventarios/MASTER_INVENTORY.yml`
|
||||||
|
- Specs: `apps/erp-core/docs/04-modelado/especificaciones-tecnicas/transversal/`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Ultima actualizacion:** 2026-01-07
|
||||||
|
**Actualizado por:** Orquestador
|
||||||
409
orchestration/environment/ENVIRONMENT-INVENTORY.yml
Normal file
409
orchestration/environment/ENVIRONMENT-INVENTORY.yml
Normal file
@ -0,0 +1,409 @@
|
|||||||
|
# =============================================================================
|
||||||
|
# ENVIRONMENT-INVENTORY.yml - ERP-SUITE
|
||||||
|
# =============================================================================
|
||||||
|
# Inventario de Entorno de Desarrollo - Suite ERP Multi-vertical
|
||||||
|
# Generado por: @PERFIL_DEVENV
|
||||||
|
# Basado en: orchestration/templates/TEMPLATE-ENVIRONMENT-INVENTORY.yml
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
version: "1.0.0"
|
||||||
|
fecha_creacion: "2026-01-04"
|
||||||
|
fecha_actualizacion: "2026-01-04"
|
||||||
|
responsable: "@PERFIL_DEVENV"
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# IDENTIFICACION DEL PROYECTO
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
proyecto:
|
||||||
|
nombre: "ERP Suite"
|
||||||
|
alias: "erp"
|
||||||
|
nivel: "NIVEL_2B"
|
||||||
|
tipo: "suite"
|
||||||
|
estado: "desarrollo"
|
||||||
|
descripcion: "Suite ERP con multiples verticales industriales"
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# HERRAMIENTAS Y RUNTIME
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
herramientas:
|
||||||
|
runtime:
|
||||||
|
node:
|
||||||
|
version: "20.x"
|
||||||
|
requerido: true
|
||||||
|
notas: "LTS recomendado para todos los modulos"
|
||||||
|
|
||||||
|
package_managers:
|
||||||
|
npm:
|
||||||
|
version: "10.x"
|
||||||
|
requerido: true
|
||||||
|
pnpm:
|
||||||
|
version: "8.x"
|
||||||
|
requerido: false
|
||||||
|
notas: "Alternativa para monorepo"
|
||||||
|
|
||||||
|
build_tools:
|
||||||
|
- nombre: "Vite"
|
||||||
|
version: "5.x"
|
||||||
|
uso: "Frontend build"
|
||||||
|
- nombre: "TypeScript"
|
||||||
|
version: "5.x"
|
||||||
|
uso: "Compilacion"
|
||||||
|
- nombre: "NestJS CLI"
|
||||||
|
version: "10.x"
|
||||||
|
uso: "Backend build"
|
||||||
|
|
||||||
|
linters:
|
||||||
|
- nombre: "ESLint"
|
||||||
|
version: "8.x"
|
||||||
|
config: ".eslintrc.js"
|
||||||
|
- nombre: "Prettier"
|
||||||
|
version: "3.x"
|
||||||
|
config: ".prettierrc"
|
||||||
|
|
||||||
|
testing:
|
||||||
|
- nombre: "Jest"
|
||||||
|
version: "29.x"
|
||||||
|
tipo: "unit"
|
||||||
|
config: "jest.config.js"
|
||||||
|
- nombre: "Vitest"
|
||||||
|
version: "1.x"
|
||||||
|
tipo: "unit frontend"
|
||||||
|
config: "vitest.config.ts"
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# SERVICIOS Y PUERTOS - CORE
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
servicios:
|
||||||
|
erp_core:
|
||||||
|
frontend:
|
||||||
|
nombre: "erp-core-frontend"
|
||||||
|
framework: "React"
|
||||||
|
version: "18.x"
|
||||||
|
puerto: 3010
|
||||||
|
ubicacion: "apps/erp-core/frontend/"
|
||||||
|
url_local: "http://localhost:3010"
|
||||||
|
|
||||||
|
backend:
|
||||||
|
nombre: "erp-core-backend"
|
||||||
|
framework: "NestJS"
|
||||||
|
version: "10.x"
|
||||||
|
puerto: 3011
|
||||||
|
ubicacion: "apps/erp-core/backend/"
|
||||||
|
url_local: "http://localhost:3011"
|
||||||
|
api_prefix: "/api/v1"
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# SERVICIOS Y PUERTOS - VERTICALES
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
verticales:
|
||||||
|
construccion:
|
||||||
|
frontend:
|
||||||
|
puerto: 3020
|
||||||
|
ubicacion: "apps/verticales/construccion/frontend/"
|
||||||
|
url_local: "http://localhost:3020"
|
||||||
|
backend:
|
||||||
|
puerto: 3021
|
||||||
|
ubicacion: "apps/verticales/construccion/backend/"
|
||||||
|
url_local: "http://localhost:3021"
|
||||||
|
db_puerto: 5433
|
||||||
|
redis_puerto: 6380
|
||||||
|
|
||||||
|
vidrio_templado:
|
||||||
|
frontend:
|
||||||
|
puerto: 3030
|
||||||
|
ubicacion: "apps/verticales/vidrio-templado/frontend/"
|
||||||
|
url_local: "http://localhost:3030"
|
||||||
|
backend:
|
||||||
|
puerto: 3031
|
||||||
|
ubicacion: "apps/verticales/vidrio-templado/backend/"
|
||||||
|
url_local: "http://localhost:3031"
|
||||||
|
db_puerto: 5434
|
||||||
|
redis_puerto: 6381
|
||||||
|
|
||||||
|
mecanicas_diesel:
|
||||||
|
frontend:
|
||||||
|
puerto: 3040
|
||||||
|
ubicacion: "apps/verticales/mecanicas-diesel/frontend/"
|
||||||
|
url_local: "http://localhost:3040"
|
||||||
|
backend:
|
||||||
|
puerto: 3041
|
||||||
|
ubicacion: "apps/verticales/mecanicas-diesel/backend/"
|
||||||
|
url_local: "http://localhost:3041"
|
||||||
|
|
||||||
|
retail:
|
||||||
|
frontend:
|
||||||
|
puerto: 3050
|
||||||
|
ubicacion: "apps/verticales/retail/frontend/"
|
||||||
|
url_local: "http://localhost:3050"
|
||||||
|
backend:
|
||||||
|
puerto: 3051
|
||||||
|
ubicacion: "apps/verticales/retail/backend/"
|
||||||
|
url_local: "http://localhost:3051"
|
||||||
|
db_puerto: 5436
|
||||||
|
redis_puerto: 6383
|
||||||
|
|
||||||
|
clinicas:
|
||||||
|
frontend:
|
||||||
|
puerto: 3060
|
||||||
|
ubicacion: "apps/verticales/clinicas/frontend/"
|
||||||
|
url_local: "http://localhost:3060"
|
||||||
|
backend:
|
||||||
|
puerto: 3061
|
||||||
|
ubicacion: "apps/verticales/clinicas/backend/"
|
||||||
|
url_local: "http://localhost:3061"
|
||||||
|
db_puerto: 5437
|
||||||
|
redis_puerto: 6384
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# BASE DE DATOS
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
base_de_datos:
|
||||||
|
principal:
|
||||||
|
engine: "PostgreSQL"
|
||||||
|
version: "15"
|
||||||
|
host: "localhost"
|
||||||
|
puerto: 5432
|
||||||
|
|
||||||
|
ambientes:
|
||||||
|
development:
|
||||||
|
nombre: "erp_generic"
|
||||||
|
usuario: "erp_admin"
|
||||||
|
password_ref: "DB_PASSWORD en .env"
|
||||||
|
|
||||||
|
test:
|
||||||
|
nombre: "erp_test"
|
||||||
|
usuario: "erp_admin"
|
||||||
|
password_ref: "DB_PASSWORD en .env"
|
||||||
|
|
||||||
|
schemas:
|
||||||
|
- nombre: "public"
|
||||||
|
descripcion: "Schema principal"
|
||||||
|
- nombre: "core"
|
||||||
|
descripcion: "Funcionalidades core compartidas"
|
||||||
|
- nombre: "auth"
|
||||||
|
descripcion: "Autenticacion y usuarios"
|
||||||
|
|
||||||
|
conexion_ejemplo: "postgresql://erp_admin:{password}@localhost:5432/erp_generic"
|
||||||
|
|
||||||
|
verticales_separadas:
|
||||||
|
construccion:
|
||||||
|
puerto: 5433
|
||||||
|
nombre: "erp_construccion"
|
||||||
|
vidrio_templado:
|
||||||
|
puerto: 5434
|
||||||
|
nombre: "erp_vidrio"
|
||||||
|
retail:
|
||||||
|
puerto: 5436
|
||||||
|
nombre: "erp_retail"
|
||||||
|
clinicas:
|
||||||
|
puerto: 5437
|
||||||
|
nombre: "erp_clinicas"
|
||||||
|
|
||||||
|
redis:
|
||||||
|
default:
|
||||||
|
puerto: 6379
|
||||||
|
uso: "core cache"
|
||||||
|
construccion:
|
||||||
|
puerto: 6380
|
||||||
|
vidrio_templado:
|
||||||
|
puerto: 6381
|
||||||
|
retail:
|
||||||
|
puerto: 6383
|
||||||
|
clinicas:
|
||||||
|
puerto: 6384
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# VARIABLES DE ENTORNO
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
variables_entorno:
|
||||||
|
archivo_ejemplo: ".env.example"
|
||||||
|
archivo_puertos: ".env.ports"
|
||||||
|
|
||||||
|
variables:
|
||||||
|
- nombre: "NODE_ENV"
|
||||||
|
descripcion: "Ambiente de ejecucion"
|
||||||
|
requerido: true
|
||||||
|
sensible: false
|
||||||
|
ejemplo: "development"
|
||||||
|
|
||||||
|
- nombre: "ERP_CORE_PORT"
|
||||||
|
descripcion: "Puerto del backend core"
|
||||||
|
requerido: true
|
||||||
|
sensible: false
|
||||||
|
ejemplo: "3011"
|
||||||
|
|
||||||
|
- nombre: "DATABASE_URL"
|
||||||
|
descripcion: "Connection string de PostgreSQL"
|
||||||
|
requerido: true
|
||||||
|
sensible: true
|
||||||
|
ejemplo: "postgresql://erp_admin:password@localhost:5432/erp_generic"
|
||||||
|
|
||||||
|
- nombre: "JWT_SECRET"
|
||||||
|
descripcion: "Secreto para JWT"
|
||||||
|
requerido: true
|
||||||
|
sensible: true
|
||||||
|
ejemplo: ""
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# CONTENEDORES DOCKER
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
docker:
|
||||||
|
compose_file: "docker-compose.yml"
|
||||||
|
|
||||||
|
services:
|
||||||
|
- nombre: "db"
|
||||||
|
imagen: "postgres:15-alpine"
|
||||||
|
puerto_host: 5432
|
||||||
|
puerto_container: 5432
|
||||||
|
|
||||||
|
- nombre: "db-construccion"
|
||||||
|
imagen: "postgres:15-alpine"
|
||||||
|
puerto_host: 5433
|
||||||
|
puerto_container: 5432
|
||||||
|
|
||||||
|
- nombre: "redis"
|
||||||
|
imagen: "redis:7-alpine"
|
||||||
|
puerto_host: 6379
|
||||||
|
puerto_container: 6379
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- nombre: "postgres_data"
|
||||||
|
descripcion: "Datos de PostgreSQL core"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
- nombre: "erp_network"
|
||||||
|
driver: "bridge"
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# MAPA VISUAL DE PUERTOS
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# ERP-CORE:
|
||||||
|
# Frontend: 3010
|
||||||
|
# Backend: 3011
|
||||||
|
#
|
||||||
|
# VERTICALES:
|
||||||
|
# Construccion: 3020/3021 (DB: 5433, Redis: 6380)
|
||||||
|
# Vidrio-Templado: 3030/3031 (DB: 5434, Redis: 6381)
|
||||||
|
# Mecanicas-Diesel: 3040/3041
|
||||||
|
# Retail: 3050/3051 (DB: 5436, Redis: 6383)
|
||||||
|
# Clinicas: 3060/3061 (DB: 5437, Redis: 6384)
|
||||||
|
#
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# SCRIPTS DE DESARROLLO
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
scripts:
|
||||||
|
setup:
|
||||||
|
descripcion: "Configurar entorno desde cero"
|
||||||
|
pasos:
|
||||||
|
- "npm install"
|
||||||
|
- "cp .env.example .env"
|
||||||
|
- "docker-compose up -d"
|
||||||
|
- "npm run migration:run"
|
||||||
|
|
||||||
|
desarrollo:
|
||||||
|
core: "npm run dev:core"
|
||||||
|
vertical: "npm run dev:vertical -- --name={vertical}"
|
||||||
|
all: "npm run dev:all"
|
||||||
|
|
||||||
|
testing:
|
||||||
|
unit: "npm run test"
|
||||||
|
e2e: "npm run test:e2e"
|
||||||
|
|
||||||
|
build:
|
||||||
|
all: "npm run build"
|
||||||
|
core: "npm run build:core"
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# INSTRUCCIONES DE SETUP
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
setup_instrucciones: |
|
||||||
|
## Setup del Entorno de Desarrollo - ERP Suite
|
||||||
|
|
||||||
|
### Prerequisitos
|
||||||
|
- Node.js 20.x
|
||||||
|
- PostgreSQL 15 (o Docker)
|
||||||
|
- Redis 7 (o Docker)
|
||||||
|
- npm 10.x
|
||||||
|
|
||||||
|
### Pasos
|
||||||
|
|
||||||
|
1. Clonar repositorio:
|
||||||
|
```bash
|
||||||
|
git clone <url_repo>
|
||||||
|
cd erp-suite
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Instalar dependencias:
|
||||||
|
```bash
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Configurar variables de entorno:
|
||||||
|
```bash
|
||||||
|
cp .env.example .env
|
||||||
|
# Editar .env con valores locales
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Levantar servicios Docker:
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Ejecutar migraciones:
|
||||||
|
```bash
|
||||||
|
npm run migration:run
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Iniciar desarrollo (core):
|
||||||
|
```bash
|
||||||
|
npm run dev:core
|
||||||
|
```
|
||||||
|
|
||||||
|
7. Iniciar vertical especifica:
|
||||||
|
```bash
|
||||||
|
npm run dev:vertical -- --name=construccion
|
||||||
|
```
|
||||||
|
|
||||||
|
### Verificar
|
||||||
|
- Core Frontend: http://localhost:3010
|
||||||
|
- Core Backend: http://localhost:3011/api/v1
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# TROUBLESHOOTING
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
troubleshooting:
|
||||||
|
- problema: "Conflicto de puertos entre verticales"
|
||||||
|
solucion: "Verificar .env.ports. Cada vertical tiene rango asignado"
|
||||||
|
|
||||||
|
- problema: "BD de vertical no conecta"
|
||||||
|
solucion: "Verificar que docker-compose levanto el servicio de BD correcto"
|
||||||
|
|
||||||
|
- problema: "Redis no disponible"
|
||||||
|
solucion: "docker-compose up -d redis. Verificar puerto correcto para vertical"
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# REFERENCIAS
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
referencias:
|
||||||
|
perfil_devenv: "orchestration/agents/perfiles/PERFIL-DEVENV.md"
|
||||||
|
inventario_master: "orchestration/inventarios/DEVENV-MASTER-INVENTORY.yml"
|
||||||
|
inventario_puertos: "orchestration/inventarios/DEVENV-PORTS-INVENTORY.yml"
|
||||||
|
env_ports: ".env.ports"
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# FIN DE INVENTARIO
|
||||||
|
# =============================================================================
|
||||||
Loading…
Reference in New Issue
Block a user