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>
315 lines
7.1 KiB
Markdown
315 lines
7.1 KiB
Markdown
---
|
|
id: STACK-TECNOLOGICO-ERP-CORE
|
|
title: Stack Tecnologico - ERP Core
|
|
type: Technical
|
|
status: Published
|
|
version: 1.0.0
|
|
created_date: 2026-01-10
|
|
updated_date: 2026-01-10
|
|
---
|
|
|
|
# Stack Tecnologico - ERP Core
|
|
|
|
> Detalle completo del stack tecnologico utilizado en ERP Core
|
|
|
|
## Resumen
|
|
|
|
ERP Core utiliza un stack moderno basado en TypeScript tanto en backend como en frontend, con PostgreSQL como base de datos principal y servicios externos para funcionalidades SaaS e IA.
|
|
|
|
---
|
|
|
|
## 1. Backend
|
|
|
|
### 1.1 Core
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| Node.js | 20+ LTS | Runtime de JavaScript |
|
|
| Express.js | 4.x | Framework HTTP |
|
|
| TypeScript | 5.3+ | Lenguaje tipado |
|
|
| TypeORM | 0.3.17+ | ORM para PostgreSQL |
|
|
|
|
### 1.2 Autenticacion y Seguridad
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| jsonwebtoken | 9.x | Generacion/validacion JWT |
|
|
| bcryptjs | 2.x | Hash de passwords |
|
|
| helmet | 7.x | Headers de seguridad |
|
|
| cors | 2.x | Cross-Origin Resource Sharing |
|
|
|
|
### 1.3 Validacion
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| Zod | 3.x | Validacion de schemas |
|
|
| class-validator | 0.14+ | Validacion de DTOs |
|
|
| class-transformer | 0.5+ | Transformacion de objetos |
|
|
|
|
### 1.4 Documentacion
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| Swagger/OpenAPI | 3.x | Especificacion de API |
|
|
| swagger-ui-express | 5.x | UI de documentacion |
|
|
|
|
### 1.5 Testing
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| Jest | 29.x | Framework de testing |
|
|
| supertest | 6.x | Testing de HTTP |
|
|
|
|
### 1.6 Utilidades
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| Winston | 3.x | Logging estructurado |
|
|
| dotenv | 16.x | Variables de entorno |
|
|
| uuid | 9.x | Generacion de UUIDs |
|
|
| date-fns | 3.x | Manipulacion de fechas |
|
|
|
|
### 1.7 SaaS y Colas
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| Stripe SDK | Latest | Billing y suscripciones |
|
|
| BullMQ | 5.x | Colas de trabajos |
|
|
| ioredis | 5.x | Cliente Redis |
|
|
|
|
### 1.8 IA y Comunicacion
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| OpenRouter Client | Latest | Gateway LLM |
|
|
| @anthropic-ai/sdk | Latest | SDK de Anthropic (MCP) |
|
|
| Socket.io | 4.x | WebSocket real-time |
|
|
|
|
---
|
|
|
|
## 2. Frontend
|
|
|
|
### 2.1 Core
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| React | 18.x | Framework UI |
|
|
| Vite | 5.x | Build tool y dev server |
|
|
| TypeScript | 5.3+ | Lenguaje tipado |
|
|
|
|
### 2.2 State Management
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| Zustand | 4.x | Estado global ligero |
|
|
| React Query | 5.x | Cache y fetching de datos |
|
|
|
|
### 2.3 Estilos
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| Tailwind CSS | 4.x | Utility-first CSS |
|
|
| clsx | 2.x | Condicionales de clases |
|
|
|
|
### 2.4 Formularios
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| React Hook Form | 7.x | Manejo de formularios |
|
|
| @hookform/resolvers | 3.x | Validacion con Zod |
|
|
| Zod | 3.x | Schemas de validacion |
|
|
|
|
### 2.5 Navegacion
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| React Router | 6.x | Routing SPA |
|
|
|
|
### 2.6 UI Components
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| Radix UI | Latest | Primitivos accesibles |
|
|
| Lucide React | Latest | Iconos |
|
|
|
|
### 2.7 Utilidades
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| axios | 1.x | Cliente HTTP |
|
|
| date-fns | 3.x | Fechas |
|
|
| Socket.io-client | 4.x | WebSocket |
|
|
|
|
### 2.8 Testing
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| Vitest | 1.x | Testing unitario |
|
|
| Playwright | Latest | Testing E2E |
|
|
| Testing Library | 14.x | Testing de componentes |
|
|
|
|
---
|
|
|
|
## 3. Database
|
|
|
|
### 3.1 Motor Principal
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| PostgreSQL | 16+ | Base de datos relacional |
|
|
|
|
### 3.2 Extensiones PostgreSQL
|
|
|
|
| Extension | Proposito |
|
|
|-----------|-----------|
|
|
| uuid-ossp | Generacion de UUIDs |
|
|
| pg_trgm | Busqueda fuzzy/trigrams |
|
|
| pgcrypto | Encriptacion de datos |
|
|
|
|
### 3.3 Caracteristicas Utilizadas
|
|
|
|
| Caracteristica | Proposito |
|
|
|----------------|-----------|
|
|
| Row-Level Security (RLS) | Aislamiento multi-tenant |
|
|
| JSONB | Datos flexibles (configs, metadata) |
|
|
| Generated Columns | Columnas calculadas |
|
|
| Partial Indexes | Optimizacion de queries |
|
|
|
|
### 3.4 Cache y Colas
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| Redis | 7.x | Cache, sessions, colas |
|
|
|
|
---
|
|
|
|
## 4. Servicios Externos
|
|
|
|
### 4.1 Pagos y Billing
|
|
|
|
| Servicio | Proposito |
|
|
|----------|-----------|
|
|
| Stripe | Suscripciones, pagos, facturas |
|
|
|
|
### 4.2 Comunicaciones
|
|
|
|
| Servicio | Proposito |
|
|
|----------|-----------|
|
|
| SendGrid | Email transaccional |
|
|
| AWS SES | Email (alternativo) |
|
|
| Web Push API | Notificaciones push |
|
|
| Meta WhatsApp Business | Mensajeria WhatsApp |
|
|
|
|
### 4.3 Almacenamiento
|
|
|
|
| Servicio | Proposito |
|
|
|----------|-----------|
|
|
| AWS S3 | Storage de archivos |
|
|
| Cloudflare R2 | Storage (alternativo) |
|
|
| MinIO | Storage self-hosted |
|
|
|
|
### 4.4 Inteligencia Artificial
|
|
|
|
| Servicio | Proposito |
|
|
|----------|-----------|
|
|
| OpenRouter | Gateway a 50+ modelos LLM |
|
|
| OpenAI Whisper | Transcripcion de audio |
|
|
| Google Vision | OCR y vision por computadora |
|
|
|
|
---
|
|
|
|
## 5. DevOps
|
|
|
|
### 5.1 Contenedores
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| Docker | 24+ | Contenedorizacion |
|
|
| Docker Compose | 2.x | Orquestacion local |
|
|
|
|
### 5.2 CI/CD
|
|
|
|
| Tecnologia | Proposito |
|
|
|------------|-----------|
|
|
| GitHub Actions | Pipeline de CI/CD |
|
|
|
|
### 5.3 Linting y Formateo
|
|
|
|
| Tecnologia | Version | Proposito |
|
|
|------------|---------|-----------|
|
|
| ESLint | 8.x | Linting de codigo |
|
|
| Prettier | 3.x | Formateo de codigo |
|
|
|
|
---
|
|
|
|
## 6. Versiones Minimas Requeridas
|
|
|
|
| Componente | Version Minima |
|
|
|------------|----------------|
|
|
| Node.js | 20.0.0 |
|
|
| npm | 10.0.0 |
|
|
| PostgreSQL | 15.0 |
|
|
| Redis | 7.0 |
|
|
| Docker | 24.0 |
|
|
|
|
---
|
|
|
|
## 7. Setup de Desarrollo
|
|
|
|
### 7.1 Prerrequisitos
|
|
|
|
```bash
|
|
# Verificar versiones
|
|
node --version # >= 20.0.0
|
|
npm --version # >= 10.0.0
|
|
docker --version # >= 24.0.0
|
|
```
|
|
|
|
### 7.2 Instalacion
|
|
|
|
```bash
|
|
# Clonar repositorio
|
|
git clone <repo-url> erp-core
|
|
cd erp-core
|
|
|
|
# Instalar dependencias
|
|
npm install
|
|
|
|
# Copiar variables de entorno
|
|
cp .env.example .env
|
|
|
|
# Levantar servicios con Docker
|
|
docker-compose up -d
|
|
|
|
# Ejecutar migraciones
|
|
npm run db:migrate
|
|
|
|
# Iniciar desarrollo
|
|
npm run dev
|
|
```
|
|
|
|
### 7.3 Puertos por Defecto
|
|
|
|
| Servicio | Puerto |
|
|
|----------|--------|
|
|
| Backend API | 3000 |
|
|
| Frontend | 5173 |
|
|
| PostgreSQL | 5432 |
|
|
| Redis | 6379 |
|
|
| MCP Server | 3142 |
|
|
| WhatsApp Service | 3143 |
|
|
|
|
---
|
|
|
|
## Referencias
|
|
|
|
- [VISION-ERP-CORE.md](VISION-ERP-CORE.md) - Vision general
|
|
- [INTEGRACIONES-EXTERNAS.md](INTEGRACIONES-EXTERNAS.md) - Detalle de integraciones
|
|
- [Node.js](https://nodejs.org/) - Documentacion oficial
|
|
- [React](https://react.dev/) - Documentacion oficial
|
|
- [PostgreSQL](https://www.postgresql.org/docs/) - Documentacion oficial
|
|
|
|
---
|
|
|
|
*Actualizado: 2026-01-10*
|