CRM de WhatsApp, Instagram, Messenger y TikTok de Wachato, basado en Vocero CRM (MIT), listo para desplegar un negocio por instancia: - Marca blanca: nombre, color, moneda y giro del negocio desde el .env (BRAND_NAME, BRAND_ACCENT, BRAND_CURRENCY, BUSINESS_DESCRIPTION); se aplican una vez y luego manda Ajustes → Marca. - Superadmin sembrado al arrancar (SUPERADMIN_*), idempotente. - Servicios y precios, campos personalizados, exportación a Excel/PDF, respaldos, agenda, atribución de anuncios y transcripción de notas de voz. - Diseño con contraste AAA, tema claro y oscuro. - Despliegue: docker compose (Caddy opcional), plantillas para paneles con reverse proxy (deploy/aapanel), imagen publicada en GHCR por la CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.1 KiB
Markdown
41 lines
1.1 KiB
Markdown
# WhatsApp SaaS reference architecture
|
|
|
|
Use this reference when the user needs the system-level view.
|
|
|
|
## Core layers
|
|
|
|
1. Frontend
|
|
2. Backend
|
|
3. Meta Graph API / WhatsApp Cloud API
|
|
4. Webhook endpoint
|
|
5. Supabase
|
|
|
|
## Recommended flow
|
|
|
|
1. A business enters the SaaS.
|
|
2. The business connects its own WhatsApp Business account through Meta Embedded Signup.
|
|
3. Meta returns:
|
|
- authorization code,
|
|
- `waba_id`,
|
|
- `phone_number_id`.
|
|
4. The backend exchanges the code for a usable token.
|
|
5. The backend stores the connection in Supabase.
|
|
6. The app reads:
|
|
- connected phone number,
|
|
- WABA-linked assets,
|
|
- templates.
|
|
7. The app sends:
|
|
- approved templates,
|
|
- text replies when the 24-hour window is open.
|
|
8. Meta posts statuses and inbound messages to the webhook.
|
|
9. The backend stores those events in Supabase.
|
|
10. The frontend renders a truthful dashboard from those records.
|
|
|
|
## Design principle
|
|
|
|
The product should not behave like a thin wrapper around API calls. The dashboard must reflect real state from:
|
|
|
|
- Meta assets,
|
|
- webhook events,
|
|
- and the local persistence layer.
|