Skip to content

About

🎫 Multi-tenant SaaS helpdesk with real-time chat, Stripe billing & analytics | MERN + Socket.io + Redis + BullMQ | Live: support-flow-gamma.vercel.app

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎫 SupportFlow β€” Multi-Tenant SaaS Helpdesk

A production-ready, multi-tenant helpdesk platform where companies can manage customer tickets, chat in real-time, and analyze performance β€” all with subscription-based billing.

SupportFlow Banner

GitHub License: MIT Node MongoDB React Redis Live Demo

πŸš€ Live Demo

πŸ”‘ Demo Credentials

Role Email Password
Admin amitsir1355@gmail.com 123456

⚠️ Note: Backend runs on Render's free tier β€” the first request may take 30-50 seconds (cold start). This is normal.

πŸ“– About

SupportFlow is a multi-tenant SaaS helpdesk built with the MERN stack. Companies can sign up, create their own isolated workspace, invite agents, and manage customer support tickets β€” all in real time.

Every workspace is fully isolated: users, tickets, messages, and analytics are scoped to the workspace, ensuring enterprise-grade data privacy.

✨ Features

Core

  • 🏒 Multi-tenant architecture β€” isolated workspaces per company
  • πŸ” JWT authentication with refresh token rotation
  • πŸ‘₯ Role-based access control (Admin, Agent, Customer)
  • 🎫 Complete ticket lifecycle β€” create, assign, update, resolve
  • πŸ’¬ Real-time chat with Socket.io (public replies + internal notes)
  • πŸ“§ Email notifications via Nodemailer (ticket created, assigned, new reply)
  • ⏰ SLA tracking with breach alerts (BullMQ + Redis)
  • πŸ“Š Analytics dashboard with charts (Recharts)
  • πŸ’³ Stripe subscription billing with plan-based limits
  • πŸ“Ž File uploads via Cloudinary
  • πŸ” Search, filter, pagination
  • 🎨 Modern UI with TailwindCSS
  • πŸ“± Fully responsive β€” mobile, tablet, and desktop
  • 🐳 Docker + GitHub Actions CI/CD

🎯 How to Use

πŸ‘¨β€πŸ’Ό For Admins (Company Owners)

  1. Sign up β€” Create your workspace with your company name
  2. Invite agents β€” Add team members to handle tickets
  3. Monitor tickets β€” Track all customer tickets in your workspace
  4. Assign tickets β€” Route tickets to the right agent
  5. Chat in real-time β€” Reply to customers instantly with live chat
  6. Track SLA β€” Get alerts before deadlines breach
  7. View analytics β€” Analyze ticket trends, agent performance, response times
  8. Manage billing β€” Upgrade plans via Stripe integration

πŸ‘¨β€πŸ’» For Agents (Support Team)

  1. View assigned tickets β€” See all tickets routed to you
  2. Reply to customers β€” Send public replies visible to customers
  3. Add internal notes β€” Collaborate with team (customers can't see these)
  4. Update status β€” Mark tickets as Open β†’ Pending β†’ Resolved β†’ Closed
  5. View performance β€” Track your metrics on analytics dashboard

πŸ‘€ For Customers

  1. Raise a ticket β€” Describe your issue in detail
  2. Chat in real-time β€” Get instant replies from support agents
  3. Track status β€” See real-time updates on your tickets
  4. Attach files β€” Share screenshots or documents
  5. Get email updates β€” Notifications on every reply

πŸ“Έ Screenshots

πŸ” Authentication

Login Register
Login Register

πŸ“Š Dashboard β€” Overview of tickets and stats

Dashboard

🎫 Tickets

Ticket List: Ticket List

Ticket Detail with Real-time Chat: Ticket Detail

Create New Ticket: New Ticket

πŸ“ˆ Analytics β€” Performance Insights

Analytics

πŸ’³ Billing β€” Subscription Plans

Billing

πŸ‘₯ Agents β€” Team Management

Agents

πŸ“± Responsive Design

SupportFlow is fully responsive β€” works seamlessly across all devices.

πŸ“± Mobile View (375px)

Mobile Login Mobile Register Mobile Dashboard

Mobile Tickets Mobile Create Ticket Mobile Analytics

Mobile Navbar Mobile Billing

Mobile Features:

  • πŸ“± Slide-in sidebar drawer with overlay
  • πŸ‘† Touch-friendly tap targets (min 44px)
  • πŸ“Š Responsive charts that adapt to screen size
  • 🎨 Adaptive grid layouts (1-col mobile β†’ 4-col desktop)
  • ✨ Fluid typography that scales with viewport
  • 🚫 Body scroll lock when drawer is open

πŸ› οΈ Tech Stack

Frontend

  • React 18 + Vite
  • Redux Toolkit for state management
  • React Router v6 for routing
  • TailwindCSS for styling
  • Recharts for data visualization
  • Socket.io Client for real-time communication
  • Axios with interceptors for auto-refresh tokens

Backend

  • Node.js + Express
  • MongoDB + Mongoose (multi-tenant data model)
  • Redis + BullMQ for job queues
  • Socket.io for real-time messaging
  • JWT with refresh token rotation
  • Zod for request validation
  • Nodemailer for transactional emails
  • Stripe for subscription billing
  • Cloudinary for file uploads
  • Helmet, CORS, Rate-limit for security

DevOps

  • Docker + docker-compose
  • GitHub Actions for CI/CD
  • Render for backend deployment
  • Vercel for frontend deployment
  • MongoDB Atlas for cloud database
  • Upstash Redis for cloud cache & queues

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  React SPA   │─────▢│  Express API  │─────▢│   MongoDB    β”‚
β”‚  (Vercel)    │◀─────│   (Render)    │◀─────│   (Atlas)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚               β”‚               β”‚
         β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”
         β”‚  Redis   β”‚   β”‚  BullMQ   β”‚   β”‚Socket.io β”‚
         β”‚(Upstash) β”‚   β”‚  Workers  β”‚   β”‚          β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Local Setup

Prerequisites

  • Node.js 18+
  • MongoDB (local or Atlas)
  • Redis (local, Memurai, or Upstash)
  • Gmail account (for SMTP) β€” optional
  • Stripe test account β€” optional
  • Cloudinary account β€” optional

1. Clone the repository

git clone https://github.com/iamdeveloper17/SupportFlow.git
cd SupportFlow

2. Backend setup

cd server
npm install
cp .env.example .env
# Edit .env with your credentials
npm run dev

Server will run on http://localhost:5000

3. Frontend setup

cd ../client
npm install
cp .env.example .env
npm run dev

Client will run on http://localhost:5173

4. Open the app

Navigate to http://localhost:5173/register and create your first workspace.

πŸ”‘ Environment Variables

See server/.env.example and client/.env.example for the full list. Key variables:

Variable Description Required
MONGO_URI MongoDB connection string βœ…
REDIS_URL Redis connection string βœ…
JWT_ACCESS_SECRET JWT signing secret (32+ chars) βœ…
JWT_REFRESH_SECRET Refresh token secret (32+ chars) βœ…
CLIENT_URL Frontend URL for CORS βœ…
SMTP_* Gmail SMTP credentials Optional
STRIPE_* Stripe keys Optional
CLOUDINARY_* Cloudinary keys Optional

πŸ“ Project Structure

SupportFlow/
β”œβ”€β”€ client/                     # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/                # Axios config with auto-refresh
β”‚   β”‚   β”œβ”€β”€ app/                # Redux store
β”‚   β”‚   β”œβ”€β”€ features/           # Redux slices
β”‚   β”‚   β”œβ”€β”€ components/         # UI components
β”‚   β”‚   β”œβ”€β”€ pages/              # Route pages
β”‚   β”‚   β”œβ”€β”€ hooks/              # Custom hooks (useSocket, useAuth)
β”‚   β”‚   └── routes/             # Route guards
β”‚   └── package.json
β”œβ”€β”€ server/                     # Node backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/             # DB, Redis, Stripe, Cloudinary
β”‚   β”‚   β”œβ”€β”€ models/             # Mongoose schemas
β”‚   β”‚   β”œβ”€β”€ controllers/        # Route handlers
β”‚   β”‚   β”œβ”€β”€ routes/             # Express routers
β”‚   β”‚   β”œβ”€β”€ middlewares/        # Auth, RBAC, validation
β”‚   β”‚   β”œβ”€β”€ services/           # Business logic
β”‚   β”‚   β”œβ”€β”€ sockets/            # Socket.io setup
β”‚   β”‚   β”œβ”€β”€ jobs/               # BullMQ queues
β”‚   β”‚   β”œβ”€β”€ validators/         # Zod schemas
β”‚   β”‚   └── utils/              # Helpers
β”‚   └── server.js
β”œβ”€β”€ screenshots/                # Desktop & mobile screenshots
β”œβ”€β”€ .github/workflows/          # GitHub Actions CI
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ LICENSE
└── README.md

🎯 Roadmap

  • Multi-tenancy with isolated workspaces
  • JWT auth + refresh token rotation
  • Role-based access control (4 roles)
  • Complete ticket CRUD lifecycle
  • Real-time chat (Socket.io + Redis adapter)
  • Email notifications (Nodemailer)
  • SLA tracking (BullMQ delayed jobs)
  • Analytics dashboard (MongoDB aggregation)
  • Stripe subscription billing
  • Cloudinary file uploads
  • Docker + GitHub Actions CI
  • Fully responsive design (mobile-first)
  • WhatsApp integration
  • Mobile app (React Native)
  • AI-powered ticket categorization

πŸ’‘ Technical Highlights

  • Cross-domain cookies β€” SameSite=None + Secure + CORS credentials handling for Vercel + Render split deployment
  • JWT expiry handling β€” auto-refresh via Axios interceptor with retry queue and refresh token rotation
  • Duplicate message prevention β€” ID deduplication + Socket.io .except() to exclude sender from broadcast
  • Multi-tenant isolation β€” compound indexes on workspace field for query performance
  • Real-time scaling β€” Socket.io with Redis adapter for multi-instance support
  • Case-sensitive CI fix β€” proper file naming conventions for Linux compatibility
  • Mobile-first design β€” slide-in drawer, adaptive grids, touch-friendly components

🀝 Contributing

Contributions are welcome! Feel free to open an issue or submit a PR.

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Amit Kumar


⭐ If you find this project useful, please give it a star!

About

🎫 Multi-tenant SaaS helpdesk with real-time chat, Stripe billing & analytics | MERN + Socket.io + Redis + BullMQ | Live: support-flow-gamma.vercel.app

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages