Convex Comments

Build threaded comment systems in Convex with mentions, reactions, and typing indicators using pre-built backend functions and React components.

Installation

npm install @hamzasaleemorg/convex-comments

About Convex Comments

A comments system for Convex with threads, mentions, reactions, and typing indicators. Includes backend functions and optional React UI components.

Benefits

Use cases

how to add threaded comments to Convex app

Convex Comments provides pre-built Convex functions for creating nested comment threads with parent-child relationships. Install the package and import the schema and functions to enable hierarchical discussions in your application.

real-time typing indicators for comments

The component includes typing indicator functionality that shows when users are actively composing replies. It uses Convex's real-time subscriptions to broadcast typing status across all connected clients viewing the same comment thread.

user mentions in Convex comments

Convex Comments supports @mentions with user tagging and lookup functionality. The system can trigger notifications when users are mentioned and provides autocomplete capabilities for selecting users to mention.

comment reactions and voting system

The package includes reaction functionality allowing users to add emoji reactions or vote on comments. Real-time updates show reaction counts and user participation across all connected clients.

Frequently asked questions

Does Convex Comments work with existing authentication systems?

Convex Comments integrates with Convex's built-in authentication system and can work with custom user schemas. The component uses Convex's user context to associate comments with authenticated users and handle permissions.

Can I customize the comment UI components?

Convex Comments provides optional React UI components that can be styled and customized. You can also use just the backend Convex functions and build your own frontend interface while leveraging the comment system logic.

How does the threading system handle deeply nested comments?

The threading system uses a parent-child relationship model in the Convex schema to create comment trees. Convex Comments handles the complexity of nested queries and provides functions to retrieve comment threads with proper ordering and hierarchy.

Are comment notifications included in the system?

Convex Comments includes the infrastructure for notifications when users are mentioned or when replies are added to threads. The notification delivery mechanism integrates with your existing notification system or can be implemented using Convex actions.

Links