trading-platform/orchestration/inventarios/BACKEND_INVENTORY.yml
Adrian Flores Cortes 9c2fce0083 docs: Complete documentation for notifications system implementation
- Create TASK-2026-01-25-NOTIFICACIONES-COMPLETAS with full CAPVED docs
- Update DATABASE_INVENTORY with auth.notifications, auth.user_push_tokens,
  investment.distribution_history, investment.distribution_runs tables
- Update BACKEND_INVENTORY with push-token endpoints, firebase.client,
  and unit tests
- Update FRONTEND_INVENTORY with notification components, store, service
- Update MASTER_INVENTORY with updated totals
- Update _INDEX.yml with new task entry

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 04:10:09 -06:00

254 lines
7.9 KiB
YAML

# ═══════════════════════════════════════════════════════════════════════════════
# BACKEND_INVENTORY.yml - Trading Platform
# ═══════════════════════════════════════════════════════════════════════════════
version: "1.1.0"
fecha_actualizacion: "2026-01-25"
proyecto: "trading-platform"
# ═══════════════════════════════════════════════════════════════════════════════
# RESUMEN
# ═══════════════════════════════════════════════════════════════════════════════
resumen:
total_modulos: 12
total_controllers: 23
total_services: 34
total_endpoints: 57
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"
controllers: 3
services: 4
routes: 1
servicios_detalle:
- course.service.ts
- enrollment.service.ts
- gamification.service.ts
- quiz.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"
controllers: 0
services: 1
routes: 1
# ═══════════════════════════════════════════════════════════════════════════════
# 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"
- 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
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
pagos:
- Stripe
oauth:
- Google
- Facebook
- GitHub
- Apple
comunicacion:
- Twilio
- Nodemailer
llm:
- OpenAI
- Anthropic
trading:
- Binance
- MetaTrader