workspace/projects/trading-platform/docs
rckrdmrd 513a86ceee
Some checks are pending
CI Pipeline / changes (push) Waiting to run
CI Pipeline / core (push) Blocked by required conditions
CI Pipeline / trading-backend (push) Blocked by required conditions
CI Pipeline / trading-data-service (push) Blocked by required conditions
CI Pipeline / trading-frontend (push) Blocked by required conditions
CI Pipeline / erp-core (push) Blocked by required conditions
CI Pipeline / erp-mecanicas (push) Blocked by required conditions
CI Pipeline / gamilit-backend (push) Blocked by required conditions
CI Pipeline / gamilit-frontend (push) Blocked by required conditions
Major update: orchestration system, catalog references, and multi-project enhancements
Core:
- Add catalog reference implementations (auth, payments, notifications, websocket, etc.)
- New agent profiles: Database Auditor, Integration Validator, LLM Agent, Policy Auditor, Trading Strategist
- Update SIMCO directives and add escalation/git guidelines
- Add deployment inventory and audit execution reports

Projects:
- erp-suite: DevOps configs, Dockerfiles, shared libs, vertical enhancements
- gamilit: Test structure, admin controllers, service refactoring, husky/commitlint
- trading-platform: MT4 gateway, auth controllers, admin frontend, deployment scripts
- platform_marketing_content: Full DevOps setup, tests, Docker configs
- betting-analytics/inmobiliaria-analytics: Initial app structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 22:53:55 -06:00
..
00-notas feat: Initial workspace structure with multi-level Git configuration 2025-12-08 10:44:23 -06:00
00-vision-general feat: Initial workspace structure with multi-level Git configuration 2025-12-08 10:44:23 -06:00
01-arquitectura Major update: orchestration system, catalog references, and multi-project enhancements 2025-12-12 22:53:55 -06:00
02-definicion-modulos Major update: orchestration system, catalog references, and multi-project enhancements 2025-12-12 22:53:55 -06:00
90-transversal Major update: orchestration system, catalog references, and multi-project enhancements 2025-12-12 22:53:55 -06:00
95-guias-desarrollo feat: Initial workspace structure with multi-level Git configuration 2025-12-08 10:44:23 -06:00
97-adr Major update: orchestration system, catalog references, and multi-project enhancements 2025-12-12 22:53:55 -06:00
99-analisis feat: Initial workspace structure with multi-level Git configuration 2025-12-08 10:44:23 -06:00
api-contracts changes on workspace 2025-12-09 14:46:20 -06:00
_MAP.md Major update: orchestration system, catalog references, and multi-project enhancements 2025-12-12 22:53:55 -06:00
API.md Major update: orchestration system, catalog references, and multi-project enhancements 2025-12-12 22:53:55 -06:00
ARCHITECTURE.md Major update: orchestration system, catalog references, and multi-project enhancements 2025-12-12 22:53:55 -06:00
README.md feat: Initial workspace structure with multi-level Git configuration 2025-12-08 10:44:23 -06:00
SECURITY.md Major update: orchestration system, catalog references, and multi-project enhancements 2025-12-12 22:53:55 -06:00

OrbiQuantIA - Documentacion del Proyecto

Ultima actualizacion: 2025-12-05 Version: 1.0.0 Estado: En Desarrollo Activo Tipo: SaaS Trading Platform con IA


Proposito

Este directorio contiene la documentacion completa del proyecto OrbiQuantIA, una plataforma SaaS de trading e inversion que integra:

  • Predicciones ML - XGBoost para prediccion de max/min de precios
  • Plataforma Educativa - Cursos de trading con sistema de niveles
  • Trading Dashboard - Charts en tiempo real con predicciones
  • Sistema de Pagos - Integracion completa con Stripe

Estado Actual del Desarrollo

Componentes Implementados

Componente Estado Descripcion
Backend NestJS Completo API REST con TypeORM y PostgreSQL
Frontend React Completo Vite + TailwindCSS + React Router
ML Services Completo FastAPI + XGBoost predictor
Base de Datos Completo PostgreSQL con 5 schemas, 44 tablas
Autenticacion Completo JWT + Refresh Tokens
Modulo Cursos Completo CRUD completo con categorias
Pagos Stripe Completo Suscripciones + Webhooks

Endpoints Disponibles

Backend (NestJS - Puerto 3000):

  • POST /auth/login - Autenticacion
  • POST /auth/register - Registro
  • GET /courses - Listar cursos
  • POST /payments/create-payment-intent - Crear pago
  • POST /payments/subscriptions - Crear suscripcion

ML Services (FastAPI - Puerto 8000):

  • GET /api/predict/{symbol} - Predicciones de precio
  • POST /api/train/{symbol} - Entrenar modelo
  • GET /api/training/status - Estado del entrenamiento
  • GET /health - Health check

Mapa de Navegacion

docs/
├── 00-vision-general/           # Vision, alcance, arquitectura
│   ├── VISION-PRODUCTO.md
│   ├── ARQUITECTURA-GENERAL.md
│   └── STACK-TECNOLOGICO.md
│
├── 01-fase-mvp/                 # FASE 1: MVP (6 epicas)
│   ├── OQI-001-fundamentos-auth/
│   ├── OQI-002-education/
│   ├── OQI-003-trading-charts/
│   ├── OQI-004-investment-accounts/
│   ├── OQI-005-payments-stripe/
│   └── OQI-006-ml-signals/
│
├── 02-fase-growth/              # FASE 2: Crecimiento
│
├── 03-fase-enterprise/          # FASE 3: Enterprise
│
├── 90-transversal/              # Cross-cutting concerns
│   ├── sprints/
│   ├── roadmap/
│   └── inventarios/
│
├── 95-guias-desarrollo/         # Guias tecnicas
│   ├── backend/
│   ├── frontend/
│   ├── ml-engine/
│   └── database/
│
├── 96-quick-reference/          # Referencias rapidas
│
├── 97-adr/                      # Architecture Decision Records
│
└── 98-standards/                # Estandares del proyecto

Stack Tecnologico Actual

Capa Tecnologia Version Estado
Frontend React + Vite + TypeScript 19.x / 6.x / 5.x
UI Framework TailwindCSS + shadcn/ui 3.x
State Management Zustand 5.x
Backend API NestJS + TypeScript 11.x / 5.x
ORM TypeORM 0.3.x
ML Engine Python + FastAPI 3.11 / 0.115
ML Models XGBoost + scikit-learn 2.x / 1.x
Base de Datos PostgreSQL 16.x
Pagos Stripe 20.x
Auth JWT + Passport -

Arquitectura del Sistema

┌─────────────────────────────────────────────────────────────────┐
│                        FRONTEND (React 19)                       │
│                   Vite + TailwindCSS + Zustand                   │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐           │
│  │  Login   │ │Dashboard │ │ Courses  │ │Predictions│           │
│  └──────────┘ └──────────┘ └──────────┘ └──────────┘           │
│                         Puerto 5173                              │
└─────────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│                    BACKEND API (NestJS 11)                       │
│                   TypeORM + PostgreSQL                           │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐           │
│  │   Auth   │ │  Users   │ │ Courses  │ │ Payments │           │
│  └──────────┘ └──────────┘ └──────────┘ └──────────┘           │
│                         Puerto 3000                              │
└─────────────────────────────────────────────────────────────────┘
         │                              │
         ▼                              ▼
┌─────────────────┐          ┌─────────────────────────────────────┐
│   PostgreSQL    │          │       ML SERVICES (FastAPI)         │
│   Puerto 5433   │          │           Puerto 8000               │
│                 │          │  ┌──────────┐ ┌──────────┐         │
│ - public        │          │  │ XGBoost  │ │ Feature  │         │
│ - auth          │          │  │ Predictor│ │Engineering│         │
│ - education     │          │  └──────────┘ └──────────┘         │
│ - trading       │          │  ┌──────────┐ ┌──────────┐         │
│ - billing       │          │  │  Market  │ │ Training │         │
│                 │          │  │   Data   │ │ Pipeline │         │
└─────────────────┘          │  └──────────┘ └──────────┘         │
                              └─────────────────────────────────────┘

Configuracion de Stripe

Productos Configurados

Plan Producto ID Price ID Precio
Basic prod_TYA4rxBGz3ZEl1 price_1Sb3k64dPtEGmLmpeAdxvmIu $19/mes
Pro prod_TYA4ZpGaV1eMai price_1Sb3k64dPtEGmLmpm5n5bbJH $49/mes
Premium prod_TYA4MrWX4h8CSF price_1Sb3k74dPtEGmLmpHfLpUkvQ $99/mes

Webhook Endpoint

URL: https://[tu-dominio]/payments/webhook
Eventos:
  - payment_intent.succeeded
  - payment_intent.payment_failed
  - customer.subscription.updated
  - customer.subscription.deleted

Modelo ML - XGBoost Predictor

Caracteristicas (30+ features)

  • Volatilidad: volatility_5, volatility_10, volatility_20, ATR
  • Momentum: momentum_5, momentum_10, momentum_20, ROC
  • Medias Moviles: SMA, EMA, ratios de precio
  • Indicadores: RSI, MACD, Bollinger Bands
  • Volumen: volume_ratio, volume_sma

Metricas de Entrenamiento

Metrica Valor
MAE High 0.099%
MAE Low 0.17%
Samples 500 candles
Horizonte 30 min (6 candles)

Variables de Entorno

Backend (.env)

# Database
DB_HOST=localhost
DB_PORT=5433
DB_DATABASE=orbiquantia_platform
DB_USERNAME=orbiquantia
DB_PASSWORD=***

# JWT
JWT_SECRET=***
JWT_EXPIRES_IN=1d

# ML Service
ML_SERVICE_URL=http://localhost:8000

# Stripe
STRIPE_SECRET_KEY=sk_test_***
STRIPE_WEBHOOK_SECRET=whsec_***

# App
PORT=3000
FRONTEND_URL=http://localhost:5173

Comandos Utiles

Desarrollo

# Backend
cd apps/backend && npm run start:dev

# Frontend
cd apps/frontend && npm run dev

# ML Services
cd apps/ml-services && conda activate orbiquantia-ml && uvicorn src.api.server:app --reload --port 8000

# Base de datos
PGPASSWORD=*** psql -h localhost -p 5433 -U orbiquantia -d orbiquantia_platform

Build

# Backend
cd apps/backend && npm run build

# Frontend
cd apps/frontend && npm run build

Proximos Pasos

  1. Conectar Backend con PostgreSQL
  2. Implementar modulo de cursos
  3. Conectar Frontend con Backend
  4. Integrar modelos ML reales
  5. Implementar pagos Stripe
  6. Crear pagina de Predictions en Frontend
  7. Implementar WebSocket para precios en tiempo real
  8. Agregar mas instrumentos (ETH, XAU, EUR)
  9. Implementar sistema de notificaciones
  10. Deploy a produccion

Referencias


Documentacion actualizada: 2025-12-05