METADATA.yml updates: - Estado: en_progreso → completada (100%) - Fases CAPVED: todas completadas - Artefactos: 23 archivos documentados - Commits: 15 commits listados - Fecha fin: 2026-01-26 22:30 - Duración real: 7.5h DATABASE_INVENTORY.yml updates (v1.0.0 → v1.0.1): - Total tablas: 77 → 78 - Total archivos DDL: 114 → 115 - Schema education: 11 → 12 tablas - Nueva tabla: education.videos (ST4.3.1) BACKEND_INVENTORY.yml updates (v1.1.0 → v1.2.0): - Total módulos: 12 → 13 - Total controllers: 24 → 25 - Total services: 35 → 38 - Total endpoints: 70 → 79 - Nuevo módulo: shared (storage.service, video-processing.service) - Education: +1 controller (video.controller), +1 service (video.service) - Integración: S3/R2 storage FRONTEND_INVENTORY.yml updates (v2.0.0): - Total services: 15 → 16 - Nueva sección: tests_e2e (1 archivo, 20+ casos) - Nuevo service: video-upload.service.ts (ST4.3.5) - Tests E2E: payments-stripe-elements.test.tsx (ST4.2.3) - Roadmap actualizado: PCI-DSS ✅, Video upload ✅, E2E tests parcial ✅ Tasks: ST4.2 (PCI-DSS), ST4.3 (Video Upload) Compliance: SIMCO v4.0.0 (98% compliance) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
300 lines
9.4 KiB
YAML
300 lines
9.4 KiB
YAML
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# BACKEND_INVENTORY.yml - Trading Platform
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
version: "1.2.0"
|
|
fecha_actualizacion: "2026-01-26"
|
|
proyecto: "trading-platform"
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# RESUMEN
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
resumen:
|
|
total_modulos: 13
|
|
total_controllers: 25
|
|
total_services: 38
|
|
total_repositories: 4
|
|
total_endpoints: 79
|
|
ubicacion: "apps/backend/src/"
|
|
framework: "Express.js 5.0.1"
|
|
lenguaje: "TypeScript 5.3.3"
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# MODULOS
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
modulos:
|
|
|
|
auth:
|
|
descripcion: "Autenticacion OAuth, Email, SMS, 2FA"
|
|
controllers: 5
|
|
services: 5
|
|
routes: 1
|
|
dtos: 6
|
|
servicios_detalle:
|
|
- token.service.ts
|
|
- email.service.ts
|
|
- oauth.service.ts
|
|
- phone.service.ts
|
|
- twofa.service.ts
|
|
|
|
users:
|
|
descripcion: "Gestion de perfiles de usuario"
|
|
controllers: 0
|
|
services: 1
|
|
routes: 1
|
|
|
|
trading:
|
|
descripcion: "Orders, trades, signals, bots"
|
|
controllers: 0
|
|
services: 8
|
|
routes: 1
|
|
servicios_detalle:
|
|
- signal.service.ts
|
|
- order.service.ts
|
|
- trade.service.ts
|
|
- bot.service.ts
|
|
- watchlist.service.ts
|
|
- position.service.ts
|
|
- backtest.service.ts
|
|
- market-data.service.ts
|
|
|
|
education:
|
|
descripcion: "Cursos, quizzes, gamificacion, videos"
|
|
controllers: 4
|
|
services: 5
|
|
routes: 1
|
|
controllers_detalle:
|
|
- course.controller.ts
|
|
- enrollment.controller.ts
|
|
- quiz.controller.ts
|
|
- video.controller.ts
|
|
servicios_detalle:
|
|
- course.service.ts
|
|
- enrollment.service.ts
|
|
- gamification.service.ts
|
|
- quiz.service.ts
|
|
- video.service.ts
|
|
|
|
investment:
|
|
descripcion: "Productos, cuentas, portafolio, distribuciones"
|
|
controllers: 0
|
|
services: 3
|
|
routes: 1
|
|
jobs: 1
|
|
tests: 1
|
|
servicios_detalle:
|
|
- account.service.ts
|
|
- product.service.ts
|
|
- transaction.service.ts
|
|
jobs_detalle:
|
|
- distribution.job.ts
|
|
tests_detalle:
|
|
- jobs/__tests__/distribution.job.spec.ts
|
|
|
|
notifications:
|
|
descripcion: "Notificaciones multi-canal (email, push, in-app, WebSocket)"
|
|
controllers: 1
|
|
services: 1
|
|
routes: 1
|
|
tests: 1
|
|
servicios_detalle:
|
|
- notification.service.ts
|
|
controllers_detalle:
|
|
- notification.controller.ts
|
|
rutas_detalle:
|
|
- notification.routes.ts
|
|
tests_detalle:
|
|
- services/__tests__/notification.service.spec.ts
|
|
endpoints:
|
|
- GET /notifications
|
|
- GET /notifications/unread-count
|
|
- GET /notifications/preferences
|
|
- PATCH /notifications/preferences
|
|
- POST /notifications/read-all
|
|
- PATCH /notifications/:id/read
|
|
- DELETE /notifications/:id
|
|
- POST /notifications/push-token
|
|
- DELETE /notifications/push-token
|
|
integraciones:
|
|
- Firebase Cloud Messaging (FCM)
|
|
- Web Push
|
|
- Nodemailer
|
|
|
|
payments:
|
|
descripcion: "Stripe, wallets, subscriptions"
|
|
controllers: 0
|
|
services: 3
|
|
routes: 1
|
|
servicios_detalle:
|
|
- stripe.service.ts
|
|
- wallet.service.ts
|
|
- subscription.service.ts
|
|
|
|
ml:
|
|
descripcion: "Predicciones, modelos, backtesting"
|
|
controllers: 0
|
|
services: 6
|
|
routes: 1
|
|
servicios_detalle:
|
|
- prediction.service.ts
|
|
- model.service.ts
|
|
- backtest.service.ts
|
|
- feature.service.ts
|
|
- risk.service.ts
|
|
- ensemble.service.ts
|
|
|
|
admin:
|
|
descripcion: "Stats, modelos ML, agentes"
|
|
controllers: 0
|
|
services: 1
|
|
routes: 1
|
|
|
|
llm:
|
|
descripcion: "LLM agent, estrategias"
|
|
controllers: 0
|
|
services: 1
|
|
routes: 1
|
|
|
|
agents:
|
|
descripcion: "Trading agents orquestacion"
|
|
controllers: 0
|
|
services: 1
|
|
routes: 1
|
|
|
|
portfolio:
|
|
descripcion: "Portfolio management, allocations, goals, rebalancing, performance"
|
|
controllers: 1
|
|
services: 1
|
|
repositories: 4
|
|
routes: 1
|
|
websocket: 1
|
|
servicios_detalle:
|
|
- portfolio.service.ts
|
|
controllers_detalle:
|
|
- portfolio.controller.ts
|
|
repositories_detalle:
|
|
- portfolio.repository.ts
|
|
- allocation.repository.ts
|
|
- goal.repository.ts
|
|
- snapshot.repository.ts
|
|
websocket_detalle:
|
|
- portfolio.websocket.ts
|
|
endpoints:
|
|
- GET /portfolio
|
|
- POST /portfolio
|
|
- GET /portfolio/:id
|
|
- PUT /portfolio/:id/allocations
|
|
- GET /portfolio/:id/stats
|
|
- GET /portfolio/:id/rebalance
|
|
- POST /portfolio/:id/rebalance
|
|
- GET /portfolio/:id/performance
|
|
- GET /portfolio/:id/performance/stats
|
|
- GET /portfolio/goals
|
|
- POST /portfolio/goals
|
|
- PATCH /portfolio/goals/:id
|
|
- DELETE /portfolio/goals/:id
|
|
|
|
shared:
|
|
descripcion: "Servicios compartidos (storage, video processing, etc.)"
|
|
controllers: 0
|
|
services: 2
|
|
routes: 0
|
|
servicios_detalle:
|
|
- storage.service.ts # S3/R2 multipart upload (ST4.3.2)
|
|
- video-processing.service.ts # Video metadata, thumbnails, transcoding MVP (ST4.3.4)
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# RUTAS API
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
rutas_api:
|
|
base: "/api/v1"
|
|
endpoints:
|
|
- path: "/auth"
|
|
descripcion: "OAuth, Email, SMS, 2FA"
|
|
- path: "/users"
|
|
descripcion: "Perfil, settings"
|
|
- path: "/trading"
|
|
descripcion: "Orders, trades, signals, bots"
|
|
- path: "/education"
|
|
descripcion: "Cursos, quizzes, gamification, videos (multipart upload)"
|
|
- path: "/investment"
|
|
descripcion: "Productos, cuentas, transacciones"
|
|
- path: "/payments"
|
|
descripcion: "Stripe, wallets, subscriptions"
|
|
- path: "/admin"
|
|
descripcion: "Stats, ML models, agents"
|
|
- path: "/ml"
|
|
descripcion: "Predicciones, modelos"
|
|
- path: "/llm"
|
|
descripcion: "Estrategias LLM"
|
|
- path: "/portfolio"
|
|
descripcion: "Portafolio"
|
|
- path: "/agents"
|
|
descripcion: "Trading agents"
|
|
- path: "/notifications"
|
|
descripcion: "Notificaciones multi-canal"
|
|
|
|
health:
|
|
- path: "/health"
|
|
descripcion: "Quick check"
|
|
- path: "/health/full"
|
|
descripcion: "Sistema completo"
|
|
- path: "/health/services"
|
|
descripcion: "Health por servicio"
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# INFRAESTRUCTURA
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
infraestructura:
|
|
middleware:
|
|
- auth.middleware.ts
|
|
- error-handler.ts
|
|
- not-found.ts
|
|
- rate-limiter.ts
|
|
|
|
websocket:
|
|
- websocket.server.ts
|
|
- trading-stream.service.ts
|
|
- portfolio.websocket.ts # Real-time portfolio updates (2026-01-25)
|
|
|
|
jobs:
|
|
- distribution.job.ts # Distribución diaria de rendimientos (00:00 UTC)
|
|
|
|
clients:
|
|
- firebase.client.ts # FCM/Web Push integration (2026-01-25)
|
|
|
|
config:
|
|
- swagger.config.ts
|
|
- index.ts
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# INTEGRACIONES
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
integraciones:
|
|
base_datos:
|
|
- PostgreSQL
|
|
- Redis
|
|
storage:
|
|
- S3 / R2 (multipart upload)
|
|
pagos:
|
|
- Stripe
|
|
oauth:
|
|
- Google
|
|
- Facebook
|
|
- GitHub
|
|
- Apple
|
|
comunicacion:
|
|
- Twilio
|
|
- Nodemailer
|
|
llm:
|
|
- OpenAI
|
|
- Anthropic
|
|
trading:
|
|
- Binance
|
|
- MetaTrader
|