Dealchat — Multi-Tenant AI Sales Agent SaaS
Multi-tenant SaaS that gives online shops a 24/7 AI sales agent on Messenger, WhatsApp and the web, with product knowledge, image understanding, human takeover, follow-ups and in-chat checkout.
Built by Redoan Uzzaman, Full-Stack Developer & AI Engineer.

Overview
Dealchat is a multi-tenant SaaS that turns a shop's product catalogue into an always-on AI salesperson. Customers chat naturally on Facebook Messenger, WhatsApp or an embeddable web widget, and the agent answers product questions, understands photos customers send, recommends items and moves the conversation towards an order.
How it works
The app is built on Next.js 14 (App Router) with strict TypeScript. It has separate areas for the marketing site, the tenant admin panel, the platform super-admin and the embeddable widget.
- Auth and tenancy: Clerk Organizations model tenants. Supabase Postgres with row-level security and pgvector stores tenant data and the knowledge base used for retrieval-augmented answers.
- LLM access: all model calls go through OpenRouter via an internal AI proxy, for both chat completions and embeddings.
- Channels: inbound Messenger and WhatsApp webhooks verify signatures, and Meta OAuth connects shop pages.
- Admin tools: a conversation inbox lets staff read threads, reply and take over from the bot.
- Background jobs: Inngest cron jobs send AI follow-ups and sync WooCommerce catalogues.
- Billing and email: Stripe handles billing and Resend with react-email sends transactional mail.
Engineering notes
The engineering rules are applied across the codebase:
- Zod validates every API input.
- Every tenant query filters by tenant and also relies on row-level security.
- Stored third-party credentials are encrypted with AES-256-GCM.
- Environment variables are validated at boot.
- Webhooks are HMAC-verified.
- Token usage is logged for cost tracking and export.
The product follows a phased roadmap that adds visual product search, multi-agent flows, more channels and voice.
Key Features
- AI sales agent on Messenger, WhatsApp and an embeddable web widget
- Multi-tenant architecture with Clerk Organizations and Supabase RLS
- pgvector knowledge base for retrieval-augmented answers
- Image uploads in chat, and human takeover from the admin inbox
- Automated AI follow-ups and WooCommerce catalogue sync via Inngest
- Stripe billing, Resend email and token-usage tracking
- AES-256-GCM encryption of stored credentials and HMAC-verified webhooks
Tech Stack
- Next.js
- TypeScript
- Supabase
- pgvector
- Clerk
- OpenRouter
- Inngest
- Stripe
- Tailwind CSS
- Resend
Want something like this built?
Redoan Uzzaman takes on AI, automation and full-stack projects for clients worldwide.