In-App Chat

Moderate chat messages, images, and users

Moderate a chat app from one dashboard. Filter text and images before they are published, review messages, and flag or ban users. Open source, built with React and the PubNub JavaScript SDK.

The Moderation Dashboard demo: the Users page with a list of chat users and buttons to flag, ban, edit, or delete each one
About this demo

A moderation console for your PubNub keyset

The Moderation Dashboard is an open-source React app built with the PubNub JavaScript SDK. You sign in with your PubNub account, pick a keyset, and moderate the chat app that runs on it. It works with the users, channels, and messages your app already keeps in PubNub.

Text and image filters are saved as Functions that run before a message or file is published. They can mask words, block a message, or send a copy to a banned.<channel> channel for review. Users and channels are App Context metadata, and message edits and deletes are message actions. Flags, bans, mutes, and blocks are saved on each user, and your chat app reads them to enforce them. The demo opens in its own window, signed in to a sample keyset. The source code is open on GitHub.

Features

What you can do

  • Filter words with a word list

    Pick a language and use the default word list or your own. Choose whether to mask the word or block the message. The settings are saved as a Before Publish Function on the channels you select.

  • Detect harmful text automatically

    Connect Tisane.ai and set a filter level for hate speech, cyberbullying, criminal activity, sexual advances, and profanity. Matching messages are masked or blocked before anyone sees them.

  • Screen images

    Connect a Sightengine workflow and set a risk threshold. A Before Publish File Function checks each shared image and blocks the ones that go over it.

  • Review and fix messages

    Join a channel to see stored and live messages. Edit or delete a message, or undo a delete. The Banned tab shows the messages your filters sent to review.

  • Flag, ban, mute, or block users

    Flag a user with a reason, ban them from the app, or mute or block them in one channel. Each action is saved in the user’s App Context data for your chat app to enforce.

  • Manage users and channels

    Browse, search, add, edit, and delete users and channels. Filter for flagged or banned users, and see each channel’s members and who is online.

Build it yourself

Run your own Moderation Dashboard

Clone the dashboard, run it locally, and sign in to moderate the chat apps on your own keysets.

GitHub

pubnub/moderation-dashboard

The complete source. Run npm install and npm start, then sign in with your PubNub account and pick a keyset.

git clone https://github.com/pubnub/moderation-dashboard.git
View on GitHub
Keep building

Build interactive real-time experiences with PubNub

Bring chat, live updates, and real-time interactions into your application without building the infrastructure from scratch.