This guide shows you how to build a complete commenting system with threaded replies, emoji reactions, and user mentions — all synced in real time.
What You’ll Build
- A threaded comment feed with replies
- Emoji reactions on comments and replies
- User tagging with notifications
- Real-time sync across all participants
Prerequisites
- A CollabKit server running with a room and users created
@collab-kit/client and @collab-kit/utils installed
Step 1: Set Up the Client
Comment writes require an editor session. Viewers receive comment updates, but cannot create comments, replies, reactions, or tags.
Comments support one level of nesting:
Step 5: Add Reactions
Step 6: Tag Users
Step 7: Listen for Real-Time Updates
Next Steps
- Anchor comments to specific UI elements or text selections
- Add user @mention autocomplete using
client.users.list(...) and client.users.all
- Combine with stores to attach comments to specific entities
- Use webhooks to send email notifications for tagged users