ValwispDocs
DesarrolladoresApps del monorepo

valwisp-api

Backend NestJS 10 — 49 módulos, Prisma/Postgres, Redis, BullMQ, RouterOS y RADIUS.

Backend REST en NestJS 10. Punto de entrada apps/valwisp-api/src/main.ts.

Capa de infraestructura (src/infrastructure/)

  • PrismaService — conexión singleton a Postgres.
  • RedisService — wrapper ioredis para caché (ability por rol, blacklist de tokens, throttling de lastSeenAt).
  • RouterOSService — cliente de la API de Mikrotik (node-routeros, puerto 8728); withConnection decide automáticamente entre conexión directa o relay vía Agente Local.
  • DeviceDriverFactory — abstracción multi-vendor (IDeviceDriver, IOltDriver); MikroTik implementado, stubs para OLTs Huawei/ZTE/BDCOM/FiberHome.
  • Colas BullMQ — ver Colas (BullMQ).

Módulos (49)

Agrupados por dominio — ver el inventario completo en API REST → Endpoints. Los núcleos más grandes: internet-services (provisioning), billing/invoices/payments/accounting (dinero), radius (hooks FreeRADIUS), agent-gateway (WebSocket del agente), whatsapp/valchat (mensajería), y el par employees/leave de ValStaff.

Comandos

npm run start:dev    # hot reload, :3000
npm run build         # nest build
npm run test          # jest unitarios
npm run test:e2e      # jest e2e
npm run db:migrate    # prisma migrate dev

Ver Setup local para el flujo completo.

On this page