trading-platform/CLAUDE.md
Adrian Flores Cortes fea1f67e9a [SEMANA-3-AGENTES] feat: Add IDE configurations (L3)
- Add CLAUDE.md with project-specific instructions
- Add .trae/rules/ and AGENT-CAPABILITIES.md
- Add .windsurf/rules/ and AGENT-CAPABILITIES.md
- Add .gemini/antigravity/README.md
- Stack: Express.js 5.0.1 + React 18.2.0 + Python/FastAPI (hybrid)
- Type: STANDALONE (no propagation)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 17:45:06 -06:00

204 lines
5.4 KiB
Markdown

# CLAUDE.md - Trading Platform
**Hereda de:** workspace-v2/CLAUDE.md
**Sistema:** SIMCO v4.0.0 + NEXUS v4.0
**Proyecto:** trading-platform
**Tipo:** STANDALONE
**Versión:** 1.0.0
**Actualizado:** 2026-01-24
---
## EXTENSIONES LOCALES
Este archivo EXTIENDE (no reemplaza) las reglas del workspace.
Para reglas base, ver: `../../CLAUDE.md`
---
## ARQUITECTURA HIBRIDA
Este proyecto usa una arquitectura híbrida TypeScript + Python:
```
┌─────────────────────────────────────────────────────────┐
│ TRADING PLATFORM │
├──────────────────────┬──────────────────────────────────┤
│ TypeScript Stack │ Python Stack │
├──────────────────────┼──────────────────────────────────┤
│ • Express.js Backend │ • FastAPI (ml-engine) │
│ • React Frontend │ • Data Service │
│ • MCP Connectors │ • Trading Agents │
│ • Portfolio Manager │ • Prediction Models │
└──────────────────────┴──────────────────────────────────┘
```
---
## STACK TECNOLOGICO
| Capa | Tecnología | Versión |
|------|------------|---------|
| Backend API | Express.js | 5.0.1 |
| Frontend | React | 18.2.0 |
| Build Tool | Vite | 6.2.0 |
| ML Engine | FastAPI (Python) | 3.11 |
| Database | PostgreSQL | 16+ |
| Cache | Redis | 7.x |
| Charts | lightweight-charts | 4.1.1 |
| State | Zustand | 4.4.7 |
| Data Fetching | TanStack Query | 5.14.0 |
---
## CREDENCIALES BD
```
Database: trading_platform
User: trading_user
Password: trading_dev_2026
Port: 5432
Host: localhost
Schemas: core, trading, ml, portfolio
```
---
## ESTRUCTURA DEL MONOREPO
```
trading-platform/
├── apps/
│ ├── backend/ → Express.js API
│ ├── frontend/ → React SPA
│ ├── database/ → DDL/Schemas
│ ├── data-service/ → Python data aggregation
│ ├── ml-engine/ → Python ML service
│ ├── mcp-binance-connector/
│ └── mcp-mt4-connector/
├── mcp-auth/ → Auth service (port 3095)
├── mcp-wallet/ → Wallet service (port 3090)
├── mcp-products/ → Products service (port 3091)
├── mcp-vip/ → VIP service (port 3092)
├── mcp-investment/ → Investment service (port 3093)
├── mcp-predictions/ → ML signals (port 3094)
├── packages/ → Shared packages
└── docker/ → Docker configs
```
---
## MODULOS/EPICS (9)
| ID | Módulo | Progreso | Descripción |
|----|--------|----------|-------------|
| OQI-001 | fundamentos-auth | 70% | Autenticación base |
| OQI-002 | educativo | 30% | Módulo educativo |
| OQI-003 | trading-charts | 40% | Charts de trading |
| OQI-004 | cuentas-inversion | 35% | Cuentas de inversión |
| OQI-005 | pagos-stripe | 50% | Integración Stripe |
| OQI-006 | senales-ml | 60% | Señales ML |
| OQI-007 | llm-strategy-agent | 25% | Agente LLM |
| OQI-008 | portfolio-manager | 20% | Gestión portafolio |
| OQI-009 | mt4-gateway | 15% | Gateway MetaTrader |
---
## PUERTOS DE SERVICIOS
| Servicio | Puerto |
|----------|--------|
| Backend API | 3080 |
| Frontend | 3000 |
| ML Engine | 3083 |
| Trading Agents | 3086 |
| LLM Agent | 3085 |
| MCP Auth | 3095 |
| MCP Wallet | 3090 |
| MCP Products | 3091 |
| MCP VIP | 3092 |
| MCP Investment | 3093 |
| MCP Predictions | 3094 |
---
## REGLAS ESPECIFICAS
### 1. Código TypeScript vs Python
- **TypeScript:** APIs, Frontend, MCPs
- **Python:** ML, Data processing, Trading agents
- NO mezclar: cada servicio es independiente
### 2. ML Models
- Los modelos ML están en `apps/ml-engine/`
- Usar TensorFlow para predicciones
- Validar con backtesting antes de deploy
### 3. Trading Safety
- NUNCA ejecutar trades reales sin confirmación
- Usar modo sandbox en desarrollo
- Validar límites de riesgo
### 4. API Keys
- Binance API: Solo read en desarrollo
- MT4: Cuenta demo únicamente
- Stripe: Test mode
---
## VALIDACIONES ADICIONALES
Además de las validaciones del workspace:
1. **TypeScript Backend:**
```bash
cd apps/backend && npm run build && npm run lint
```
2. **Frontend:**
```bash
cd apps/frontend && npm run build && npm run lint
```
3. **Python Services:**
```bash
cd apps/ml-engine && python -m pytest
```
---
## ALIASES LOCALES
- `@BACKEND` → apps/backend/src/
- `@FRONTEND` → apps/frontend/src/
- `@ML` → apps/ml-engine/
- `@DDL` → apps/database/
- `@DOCS` → docs/
- `@MCP` → mcp-*/
---
## ANTES DE IMPLEMENTAR
1. Identificar si es TypeScript o Python
2. Verificar módulo/epic correspondiente
3. Consultar directivas en `orchestration/directivas/`
4. Verificar impacto en otros servicios
---
## DESPUES DE IMPLEMENTAR
1. Actualizar inventarios locales
2. Ejecutar tests del servicio afectado
3. Commit y push siguiendo SIMCO-GIT
4. NO hay propagación (STANDALONE)
---
*Trading Platform v1.0.0 - Sistema SIMCO v4.0.0*