erp-suite/orchestration/environment/ENVIRONMENT-INVENTORY.yml
rckrdmrd 106adc1de0 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>
2026-01-07 05:38:14 -06:00

410 lines
11 KiB
YAML

# =============================================================================
# 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
# =============================================================================