1.1 KiB
1.1 KiB
System Architecture
Core Components
Frontend Admin Dashboard
- Next.js
- TailwindCSS
- shadcn/ui
- TanStack Table
- Recharts
Backend API
- NestJS
- Prisma ORM
- PostgreSQL
Webhook Receiver
- Public HTTPS endpoint
- Signature validation
- Raw payload logging
- Queue handoff for processing
Worker / Queue
- Redis
- BullMQ
- Handles bulk send, scheduled send, webhook processing, retries
Storage
- S3 compatible or local object storage for media, import/export files
Logical Flow
- Admin uses dashboard
- Frontend calls backend API
- Backend stores data in PostgreSQL
- Bulk and async jobs go to Redis/BullMQ
- Worker sends outbound messages to provider
- Provider calls webhook endpoint
- Webhook receiver stores raw events and dispatches processing jobs
- Processed statuses update messages, conversations, and campaign recipients
Security
- JWT + refresh token
- Role-based access control
- Secret encryption at rest
- Webhook signature validation
- Audit logs
- Rate limiting on public endpoints
Deployment Recommendation
- Dockerized services
- Reverse proxy via Nginx
- HTTPS domain for webhook
- Separate worker process