Description
IMPORTANT: Third-Party Services & Usage Costs
This script integrates with several third-party services. Accounts and any associated fees are the buyer’s responsibility and are NOT included in the purchase price:
- Supabase — backend, database, auth, storage (free tier available, paid plans for production usage)
- Stripe — card payments (per-transaction fees set by Stripe)
- PayPal — alternative payment provider (per-transaction fees set by PayPal)
- Google OAuth — social sign-in (free)
- Google Gemini API — AI Smart Matching & content suggestions (usage-based pricing)
- Meta WhatsApp Cloud API — messaging fees based on destination country and conversation window
You will need to provide your own API keys and manage all associated costs separately. Typical costs vary based on usage volume.
Swiffer v4.0.0 — All-in-One Enterprise Omnichannel CRM, WhatsApp Business & AI Automation SaaS Platform

Swiffer is a production-grade, multi-tenant SaaS platform that unifies the entire customer lifecycle — WhatsApp Business Cloud API, Omnichannel Inbox across 16+ channels, AI Assistants, Sales CRM, Marketing Automation, Helpdesk with SLA, Appointment Booking, Client Portal, WhatsApp Commerce, Business Intelligence, Chatbot Builder, Live Chat Widget, Plugin Marketplace and a full public REST API — inside one blazing-fast, installable, offline-capable Progressive Web App.
Built with React 19, TanStack Start, TanStack Router, TanStack Query, Tailwind v4, shadcn/ui and Supabase, Swiffer ships with a bulletproof Setup Wizard, environment-controlled Demo Mode, enterprise RBAC, GDPR readiness, SAML SSO, audit logs, plan-to-gateway billing, and a fully documented Node.js / Docker / cPanel deployment path. Everything you need to launch a premium SaaS business — in one clean codebase.
Live Demo
Demo URL: https://swiffer.wrapcoders.com
User: user@demo.com / User123!
Agent: agent@demo.com / Agent123!
Admin: admin@demo.com / Admin123!
What’s New in v4.0.0
- Plan Gateway Mapping — link subscription plans directly to Stripe / Paddle price IDs with environment-aware validation.
- Billing Webhooks — automatic subscription renewal, upgrade, downgrade and cancellation via gateway webhooks.
- Audit Logs — platform-wide audit trail for gateway changes, plan linkage, security events and staff actions.
- Gateway Health Panel — real-time webhook delivery status and one-click replay for failed deliveries.
- WhatsApp Template Variables — strict numbered placeholders, automatic named-to-numbered conversion, URL param mapping preview.
- Accessible Theme Engine — automatic contrast-safe accent colors with live WCAG preview.
- Live Chat to Inbox Bridge — widget sessions are mirrored into the unified Inbox with real-time updates.
- Security Dashboard — aggregated security issues, RLS regression scans and issue severity tracking.
Overview
- Enterprise multi-tenant SaaS with per-workspace isolation and RLS.
- Official WhatsApp Cloud API (Meta) integration — WABA, templates, media, webhooks, reliable outbox.
- Omnichannel unified inbox across 16+ providers (WhatsApp, Instagram, Messenger, Telegram, Email, SMS, Web Chat and more).
- AI Layer with multi-provider LLM support, RAG Knowledge Base (pgvector), AI Reply Assistant, Sales Assistant and Conversation Intelligence.
- Full Sales CRM, Kanban pipelines, Quotes, Invoices and Commerce.
- Visual Workflow Builder, Marketing Campaigns and Chatbot Builder.
- Helpdesk with SLA, ticket routing and AI panels.
- Installable PWA, native Expo mobile app, plugin marketplace and public REST API.
Key Features
1. WhatsApp Business Cloud API
- Official Meta WhatsApp Cloud API integration (no unofficial libraries).
- Step-by-step WhatsApp Business connection wizard and admin status diagnostics.
- WABA management, phone number pool and business verification workflow.
- Template management with sync, categories, drafts, multi-language support and strict numbered placeholders.
- URL button validation with placeholder variables inside query strings and fragments.
- Enterprise media management (images, video, audio, docs, stickers, contacts, location) using Meta Resumable Upload.
- Reliable webhook processing with HMAC verification, IP allowlists, replay protection and idempotency.
- Delivery outbox with retries, delivery/read receipts and status tracking.
- Monitoring dashboard, error reporting and provider health checks.

2. Omnichannel Unified Inbox
- One inbox for 16+ channels through a clean provider abstraction layer.
- Unified customer timeline across every touchpoint.
- Realtime typing indicators, read receipts, presence and unread badges.
- Assignments, teams, tags, priorities, snooze, notes and internal replies.
- Global search across conversations, contacts, deals and tickets.
- Keyboard shortcuts, bulk actions and mobile-optimized conversation list.
- Media lightbox, background sync settings and inbound deduplication.

3. AI Assistants & RAG Knowledge Base
- Multi-provider AI Engine (OpenAI, Gemini, Anthropic and Lovable AI Gateway).
- AI Reply Assistant, Smart Compose, Summaries and Sentiment.
- Conversation Intelligence, lead scoring and next-best-action.
- pgvector-powered RAG Knowledge Base with document ingestion and re-embedding.
- AI Sales Assistant with deal-stage predictions.
- AI Helpdesk panel with automated ticket triage.

4. Sales CRM & Commerce
- Contacts, Companies, Deals, Quotes, Invoices and Products.
- Drag-and-drop Kanban pipelines and custom fields.
- Customer 360 with activity timeline, engagement metrics, notes and tasks.
- Task & birthday reminder engine with notifications.
- WhatsApp Commerce — catalog sync, cart, orders, payment links, promotions, inventory, brands and shipping.

5. Marketing & Workflow Automation
- Multi-step campaign wizard with segmentation, scheduling and A/B stats.
- Scheduled / running / paused campaigns with mid-flight enqueue.
- Visual No-Code Workflow Builder powered by React Flow with workspace-level security.
- Triggers, delays, conditions, branches and omnichannel nodes.
- Workflow history, versioning and performance dashboards.

6. Helpdesk, Chatbots & Live Chat Widget
- Tickets with SLA, routing, priorities and relationships.
- Visual Chatbot Builder with multi-language triggers, operator handoff and skills-based routing.
- Template marketplace, install/uninstall and permission diffs.
- Embeddable Live Chat Widget (420×600) with unread badges, delivery states, attachments and appearance preview.
- Widget analytics and install snippet generator.

7. Business Intelligence & Reporting
- Realtime BI dashboards at
/bi. - Sales, conversation, campaign, chatbot and omnichannel analytics.
- Custom widgets and dashboard builder.

8. Appointment Booking & Client Portal
- AI scheduling assistant with availability rules.
- Bookings, calendars, reminders and confirmations.
- Branded Client Portal at
/clientwith attachments and messaging.

9. Super Admin, API Platform & Plugin Marketplace
- Dedicated Super Admin zone (
/admin) with collapsed app-sidebar UX. - AI Provider management, Payment Gateway management and gateway audit logs.
- Developer Center with public REST API, API key scopes and documentation portal.
- Extension SDK and Plugin Marketplace for third-party integrations.

Multi-Role System

- Super Admin — platform-wide operations, tenants, billing, branding, PWA icons, AI providers and payment gateways.
- Owner / Admin — full workspace control, members, roles, billing.
- Agent — inbox, CRM, sales, helpdesk, campaigns.
- Provider — restricted delivery / logistics / partner surfaces.
- User / Viewer — read-only or personal scope.
All roles are stored in a dedicated user_roles table and enforced through a has_role() SECURITY DEFINER function plus strict Row Level Security — no client-side role checks, no privilege escalation.
Authentication System
- Supabase Auth with email/password and social OAuth (Google, Apple, Microsoft-ready).
- Secure PasswordInput component with strength meter.
- Invitation flow with role presets and email delivery.
- Multi-tenant workspace switching with cache purge and realtime resubscribe.
- Idle-logout, session rotation, device management and biometrics (mobile).
Role-Based Redirect System
- Post-login routing decided by role and workspace context.
- Super Admin →
/admin, Agent →/inbox, User →/dashboard, Provider → dedicated console. - Deep-link protection: unauthorized hash and route deep links never render protected panels — verified with end-to-end tests.
- Account menu items are hidden or disabled per role in sidebar and mobile navigation.
Setup Wizard (Installation Flow)
- Guided first-run wizard with system validation, database checks and storage checks.
- Super Admin account creation, workspace, branding and SMTP test.
- Signed, single-use step tokens — secure by construction.
- Setup Lock via
SETUP_LOCKED=true— the wizard cannot re-run without manual unlock.
PWA System — Installable, Offline, Admin-Controlled Branding
- Installable Progressive Web App with Add to Home Screen on iOS and Android.
- Optional offline app-shell with network-first HTML and cache-first hashed assets.
- Admin-controlled PWA icons, splash, theme color and name — no code edits required.
- Drag-and-drop logo, favicon and PWA icon uploads with live preview.
- Manifest, Apple touch icons, maskable icons and favicon set out of the box.
- Safe registration guards for editor previews and iframes; kill-switch cleanup worker for stale installs.
Supabase Integration
- Auth — email/password, OAuth, SAML SSO-ready, session cookies via
@supabase/ssr. - Database — Postgres with typed client, migrations and typed schema generation.
- Row Level Security (RLS) — enabled on every user-data table with policies scoped to
auth.uid()and workspace isolation. - Storage — avatars, attachments, media, catalog, branding and PWA icons via Supabase Storage.
- Realtime — inbox, notifications, badges, presence, workflows and BI with burst deduplication and auto-reconnection.
- Server Functions — TanStack
createServerFnfor app-internal RPC, public server routes for webhooks. - pgvector — powering the RAG Knowledge Base.
Demo / Test Mode (.env Controlled Quick Login)
DEMO_MODE=true— quick login buttons, visible demo credentials and instant sign-in.DEMO_MODE=false— all demo UI is removed at build time; production-safe auth only.- Perfect for sales demos, staging environments and CodeCanyon buyer previews without leaking credentials in production.
Responsive Navigation System
- Desktop — full app sidebar with grouped nav (Inbox, CRM, Sales, Marketing, Helpdesk, Commerce, Admin, Account).
- Tablet — collapsible mini sidebar, floating triggers, no auto-open side panels.
- Mobile — bottom nav, hamburger drawer, safe-area aware, conversation-first layout.
- Nested dropdowns for second-level menus with accurate active-state matching.
- Admin zone auto-collapses the main sidebar and restores it on exit.
Documentation System
- Built-in documentation portal at
/docswith sidebar, search, copy-to-clipboard and syntax highlighting. - Full sections: Introduction, Installation, Build & Deployment (Node.js, PM2, systemd, Nginx, cPanel, Docker), Project Structure, Configuration, Features, Demo Mode, Setup Wizard, Changelog, Troubleshooting and FAQ.
- Changelog with semantic versioning — current release: v4.0.0.
- PDF release notes download button for v4.0.0.
- Environment variable reference table and deployment troubleshooting guide.
Security Features

- Row Level Security on every table with owner-scoped and workspace-scoped policies.
- Server-side role enforcement via
has_role()SECURITY DEFINER. - HMAC-verified webhooks (WhatsApp, chatbot lifecycle, payment providers).
- IP allowlists, signed setup tokens, API key scopes and rate limiting.
- GDPR readiness — data export, deletion and retention.
- Audit logs, cross-tenant access prevention, security dashboard and org-switch stress-tested.
- Idle-logout, secure cookies, CSRF-safe server functions and column-level grants for sensitive tokens.
Performance Optimization
- SSR + selective prerender via TanStack Start.
- TanStack Query with loader ensureQueryData + useSuspenseQuery pattern.
- Route-level code splitting, lazy images and virtualized lists.
- Realtime patched via RPC (
get_conversation_counts) to bypass PostgREST schema cache thrash. - Bundled, edge-friendly server runtime with zero cold-start module resolution.
Billing & Subscriptions
- Subscription plan management with trial, active, past-due and cancelled states.
- Plan-to-gateway price mapping for Stripe and Paddle.
- Upgrade / downgrade wizard with checkout and entitlement refresh.
- Automatic status updates via verified gateway webhooks.
- Workspace billing settings with invoice and subscription history.

Deployment Guide (Summary)
- Node.js —
DEPLOY_TARGET=node bun run buildthennode app.cjs. PM2 & systemd units included. - Nginx reverse proxy with WebSocket upgrade and TLS.
- cPanel — Setup Node.js App, startup file
app.cjs, Node 20+. - Docker —
docker compose up -dwith dev / staging / production compose files. - Cloudflare Workers — default TanStack Start target.
Who It’s For
- SaaS founders launching a WhatsApp / Omnichannel CRM product.
- Agencies reselling a white-label customer-engagement platform.
- Enterprises consolidating sales, support and marketing into one stack.
- Developers who want a modern React 19 + Supabase codebase they can extend via plugins.
- Anyone replacing fragmented tools with one clean, documented, production-ready system.
What You Get
- Full source code (frontend + server functions + migrations).
- Native Expo mobile app scaffold.
- Docker, Nginx and systemd deployment assets.
- Comprehensive
/docsportal (v4.0.0) with changelog and PDF export. - Extension SDK and plugin templates.
- Regular updates and buyer support.

Swiffer v4.0.0 — Ship a premium, multi-tenant SaaS in days, not months.







