Skip to main content

Documentation Index

Fetch the complete documentation index at: https://wiki.vivla.com/llms.txt

Use this file to discover all available pages before exploring further.

Tools API

El backend de Vivla Tools es una API REST construida con NestJS 10 que sirve a todos los frontales (frontend, community-frontend) y a la app mobile (vivla-mobile).

Configuración general

ParámetroValor
FrameworkNestJS 10 (Express)
Prefijo API/api
Puerto3001 (o PORT env var)
DocumentaciónSwagger UI en /api/docs (solo en desarrollo)
Rate limiting100 requests por 60 segundos
SeguridadHelmet (XSS, CSP, headers)
Validaciónclass-validator con transformación automática
CORSFrontend + community-frontend origins configurados

Arquitectura modular

La API se organiza en módulos NestJS independientes:
src/
├── auth/              # Autenticación y autorización
├── chat/              # Chat y soporte (16 sub-módulos)
├── surveys/           # Encuestas dinámicas (mobile, results, rewards, action-plans)
├── community/         # Gestión de propiedades (15 sub-módulos)
├── notifications/     # Push notifications
├── inbox/             # Bandeja de entrada
├── teams/             # Gestión de equipos
├── users/             # Gestión de usuarios
├── permissions/       # Control de acceso
├── admin/             # Operaciones administrativas
├── email/             # Servicio de email (Resend)
├── database/          # Conexión Supabase y migraciones
├── health/            # Health checks
├── shared/            # Servicios compartidos (Cloudinary)
├── common/            # Filtros, interceptores, utilidades
├── config/            # Configuración de la aplicación
└── cli/               # Herramientas CLI (importación Zendesk)

Servicios externos

ServicioUso
SupabaseBase de datos PostgreSQL con Row Level Security
Auth0Autenticación JWT/JWKS
Stream ChatMensajería en tiempo real
CloudinaryAlmacenamiento y transformación de imágenes
ResendEnvío de emails transaccionales
Firebase Admin SDKPush notifications (iOS/Android), lectura de legacy data (Firestore)
Expo Server SDKPush notifications (Expo apps)
Web PushNotificaciones web (VAPID)

Manejo de errores

La API incluye un filtro global de excepciones que estandariza las respuestas de error. Las respuestas de error siguen el formato:
{
  "statusCode": 400,
  "message": "Descripción del error",
  "error": "Bad Request"
}

Health checks

EndpointAuthDescripción
GET /api/healthPúblicoHealth check básico
GET /api/health/detailedPúblicoHealth check detallado con estado de dependencias