# ============================================================================= # PROJECT-ENV-CONFIG.yml - ERP RETAIL / POS # ============================================================================= # Vertical de ERP-Suite especializada en Comercio Minorista y Punto de Venta # Actualizado: 2025-12-08 # Referencia: ~/workspace/core/devtools/environment/DEVENV-PORTS.md # ============================================================================= project: name: "ERP-RETAIL" code: "RT" description: "Sistema de Punto de Venta y Comercio Minorista" type: "vertical" level: "2B.2" status: "planning" parent: "erp-suite" paths: root: "/home/isem/workspace/projects/erp-suite/apps/verticales/retail" backend: "backend/" frontend: "frontend/" database: "database/" docs: "docs/" orchestration: "orchestration/" # ============================================================================= # PUERTOS (Según DEVENV-PORTS.md) # ============================================================================= ports: backend: 3400 frontend: 5177 database: 5436 redis: 6383 # ============================================================================= # BASE DE DATOS # ============================================================================= database: type: "postgresql" host: "localhost" port: 5436 name: "retail_db" user: "retail_user" schemas: core_inherited: 12 # Schemas heredados de erp-core vertical_specific: - pos # Sesiones, órdenes, pagos, cierres - loyalty # Tarjetas, puntos, recompensas - pricing # Listas, promociones, cupones - ecommerce # Pedidos online, carritos migration: tool: "typeorm" directory: "database/migrations/" # ============================================================================= # STACK TECNOLOGICO # ============================================================================= stack: runtime: "Node.js 20+" language: "TypeScript 5.3+" backend: framework: "Express.js" orm: "TypeORM 0.3.17" frontend: framework: "React 18" build: "Vite" ui: "Tailwind CSS + shadcn/ui" pwa: enabled: true offline_support: true # ============================================================================= # HERENCIA DEL CORE # ============================================================================= core_inheritance: version: "0.6.0" tables_inherited: 97 modules_inherited: - auth - users - roles - tenants - inventory - sales - cfdi specs_applicable: 5 specs_implemented: 0 specs_detail: - SPEC-PRICING-RULES - SPEC-INVENTARIOS-CICLICOS - SPEC-TRAZABILIDAD-LOTES-SERIES - SPEC-FACTURACION-CFDI - SPEC-VALORACION-INVENTARIO # ============================================================================= # MODULOS DE LA VERTICAL # ============================================================================= modules: total: 10 story_points: 322 list: - code: RT-001 name: Fundamentos sp: 0 priority: P0 status: pending notes: "100% heredado del core" - code: RT-002 name: POS Terminal sp: 55 priority: P0 status: pending notes: "OFFLINE-FIRST critical" - code: RT-003 name: Inventario Multi-Sucursal sp: 42 priority: P0 status: pending - code: RT-004 name: Compras sp: 34 priority: P0 status: pending - code: RT-005 name: Clientes/CRM sp: 34 priority: P0 status: pending - code: RT-006 name: Precios/Promociones sp: 42 priority: P0 status: pending - code: RT-007 name: Caja sp: 34 priority: P0 status: pending - code: RT-008 name: Reportes sp: 21 priority: P1 status: pending - code: RT-009 name: E-commerce sp: 39 priority: P2 status: pending - code: RT-010 name: Facturación CFDI sp: 21 priority: P0 status: pending # ============================================================================= # CONSIDERACIONES ESPECIALES # ============================================================================= special_requirements: offline_first: enabled: true sync_strategy: "queue-based" local_storage: "IndexedDB" conflict_resolution: "server-wins" hardware_integration: thermal_printers: protocol: "ESC/POS" connection: ["USB", "Bluetooth", "Network"] barcode_scanners: connection: ["USB", "Bluetooth"] cash_drawers: trigger: "automatic" # ============================================================================= # ARCHIVOS DE ENTORNO # ============================================================================= env_files: template: "orchestration/environment/.env.example" backend: "backend/.env" frontend: "frontend/.env" env_variables: required: - NODE_ENV - PORT - DATABASE_URL - JWT_SECRET - REDIS_URL optional: - LOG_LEVEL - CORS_ORIGIN - OFFLINE_SYNC_INTERVAL # ============================================================================= # NOTAS # ============================================================================= notes: | - Vertical especializada en retail y punto de venta - CRITICO: POS debe funcionar OFFLINE-FIRST - Sincronización cuando recupere conexión - Soporte para impresoras térmicas ESC/POS - Integración con scanners de código de barras - Puertos asignados según DEVENV-PORTS.md (rango 3400)