The Chat demo is an open-source Next.js app built with the PubNub Chat SDK. Enter any name to log in. The app creates your user and puts you in two public channels, General Chat and Work Chat. From there you can start 1:1 chats and private groups with other people using the demo.
Users, channels, and memberships are saved with App Context, so your chats are still there when you log in again. Each channel loads its recent messages from Message Persistence. On the hosted demo, messages are kept for one day. Each user gets an Access Manager token before connecting. The demo is open to everyone, so don't post anything private. To see both sides of a chat, open it in two browser windows with different names. The source code is on GitHub.