diff --git a/fundamentals/pin-message.mdx b/fundamentals/pin-message.mdx index 944bf0354..e673b6b4d 100644 --- a/fundamentals/pin-message.mdx +++ b/fundamentals/pin-message.mdx @@ -3,6 +3,10 @@ title: "Pin Message" description: "Pin, unpin, and fetch pinned CometChat messages in one-on-one or group conversations using the Pin Message extension." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + + + ## Extension settings 1. Login to [CometChat](https://app.cometchat.com/login) and select your app. diff --git a/fundamentals/webhooks.mdx b/fundamentals/webhooks.mdx index e18495f70..85531dd78 100644 --- a/fundamentals/webhooks.mdx +++ b/fundamentals/webhooks.mdx @@ -4,6 +4,10 @@ sidebarTitle: "Webhooks" description: "Use CometChat webhooks to send real-time chat, user, group, call, and moderation events to your server." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + + + CometChat Webhooks enable real-time, event-driven communication with your server by sending HTTP POST requests whenever specific events occur in your chat application. ## What Are Webhooks? diff --git a/mcp-server.mdx b/mcp-server.mdx index 1f17019f3..96136b9df 100644 --- a/mcp-server.mdx +++ b/mcp-server.mdx @@ -5,6 +5,10 @@ description: "Connect CometChat to Claude, Cursor, Windsurf, VS Code, and any ot canonical: "https://www.cometchat.com/docs/mcp-server" --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + + + The **CometChat MCP server** lets Claude, Cursor, Windsurf, VS Code, and any other Model Context Protocol–compatible agent integrate CometChat into your app from natural-language prompts. Ask the agent to *"add a chat tab where diff --git a/notifications/ios-fcm-push-notifications.mdx b/notifications/ios-fcm-push-notifications.mdx index 4af018260..fde7c2bcc 100644 --- a/notifications/ios-fcm-push-notifications.mdx +++ b/notifications/ios-fcm-push-notifications.mdx @@ -3,6 +3,10 @@ title: "iOS FCM Push Notifications" description: "Guide to integrating Firebase Cloud Messaging (FCM) push notifications in iOS apps using CometChat." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + + + FCM doesn't support VoIP pushes; use APNs + PushKit for VoIP calls. diff --git a/rest-api/banned-users/unban.mdx b/rest-api/banned-users/unban.mdx index 2052be40e..f6ed6a0d1 100644 --- a/rest-api/banned-users/unban.mdx +++ b/rest-api/banned-users/unban.mdx @@ -3,4 +3,8 @@ openapi: delete /groups/{guid}/bannedusers/{uid} description: "Unban a CometChat user from a group using GUID and UID parameters to restore group access through the REST API." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + + + For the complete error reference, see [Error Guide](/articles/error-guide). diff --git a/rest-api/chat-apis.mdx b/rest-api/chat-apis.mdx index 48dacb434..84e887c83 100644 --- a/rest-api/chat-apis.mdx +++ b/rest-api/chat-apis.mdx @@ -3,6 +3,10 @@ title: "Overview" description: "CometChat REST API documentation for integrating chat functionality into your server-side applications." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + + + Welcome to CometChat's REST API documentation! This documentation provides detailed information on the Chat APIs offered by CometChat, a comprehensive communication platform that enables developers to integrate chat functionality into their server side applications effortlessly. ## API Resources diff --git a/rest-api/messages.mdx b/rest-api/messages.mdx index c31142f67..324481b09 100644 --- a/rest-api/messages.mdx +++ b/rest-api/messages.mdx @@ -3,6 +3,10 @@ title: "Overview" description: "Send, retrieve, and manage CometChat messages with REST APIs for user and group chats, including text, media, threads, and reactions." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + + + A **Message** is the core unit of communication in CometChat. Users can send text, media files, and custom data to other users or groups. Messages support threading, reactions, read receipts, and delivery tracking. ### Key behaviors diff --git a/sdk/android/edit-message.mdx b/sdk/android/edit-message.mdx index 1ef0178ff..30e2fe503 100644 --- a/sdk/android/edit-message.mdx +++ b/sdk/android/edit-message.mdx @@ -4,6 +4,8 @@ sidebarTitle: "Edit Message" description: "Edit CometChat text and custom messages after sending them with the Android SDK and update message state in chats." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + ```kotlin @@ -27,6 +29,8 @@ CometChat.addMessageListener("LISTENER_ID", object : CometChat.MessageListener() ``` + + ## Edit a Message Use `editMessage()` with a [`TextMessage`](/sdk/reference/messages#textmessage) or [`CustomMessage`](/sdk/reference/messages#custommessage) object. Set the message ID using `setId()`. diff --git a/sdk/javascript/3.0/messaging-edit-message.mdx b/sdk/javascript/3.0/messaging-edit-message.mdx index a5fd2a9eb..a7a16b4d0 100644 --- a/sdk/javascript/3.0/messaging-edit-message.mdx +++ b/sdk/javascript/3.0/messaging-edit-message.mdx @@ -3,6 +3,10 @@ title: "Edit A Message" description: "Edit A Message — CometChat documentation." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + + + While [editing a message](/sdk/javascript/3.0/messaging-edit-message#edit-a-message) is straightforward, receiving events for edited messages with CometChat has two parts: diff --git a/snippets/entry-point.mdx b/snippets/entry-point.mdx new file mode 100644 index 000000000..22f480fec --- /dev/null +++ b/snippets/entry-point.mdx @@ -0,0 +1,46 @@ +{/* + The docs entry point: one line under the title, one link to the Start-here guide for the + stack of the page it sits on. The wording lives here and nowhere else, so it changes in + one place (task T-docs-entry.05). + + Props + stack a key of the guides map below. Leave it out when the page has no single stack, + or when the platform has more than one product line and the page does not say + which (a notifications page is read by both UI Kit and SDK users). The line + then points at the page where a reader picks one. + campaign the docs section the page sits in. It becomes utm_campaign. + + The destination is derived from stack, never passed in. An href prop would be a second + source of truth for the same fact, and when it was one the pair drifted on four of nine + pages (reviewed on #585). + + A stack that is not in the map falls back to the chooser rather than throwing. A throw + here would be a build failure, and a build failure in a table cell is what froze five + React pages on live for six weeks, so this component does not add that risk. + + Every link carries utm_source=docs and utm_medium=entry, so a signup that starts on a + docs page can be counted (task T-docs-entry.07). Tracking is built in one place below, + so it comes out in one edit if that decision changes. + + JSX, not Markdown: inside an exported component, Markdown renders literally. The sentence + stays on one line so the serialized .md output is one line too. +*/} + +export const EntryPoint = ({ stack, campaign }) => { + const guides = { + "React": "/ui-kit/react/integration-react", + "Next.js": "/ui-kit/react/integration-nextjs", + "React Native": "/ui-kit/react-native/react-native-cli-integration", + "Android": "/ui-kit/android/getting-started", + "Android SDK": "/sdk/android/setup", + "iOS": "/ui-kit/ios/getting-started", + "JavaScript SDK": "/sdk/javascript/setup-sdk", + }; + const guide = stack ? guides[stack] : undefined; + const [path, fragment] = (guide || "/chat-call").split("#"); + const tracking = `utm_source=docs&utm_medium=entry&utm_campaign=${encodeURIComponent(campaign)}`; + const href = `${path}${path.includes("?") ? "&" : "?"}${tracking}${fragment ? `#${fragment}` : ""}`; + return ( +

New to CometChat? {guide ? `Start with the ${stack} integration guide` : "Pick your stack and start building"}.

+ ); +}; diff --git a/ui-kit/android/guide-new-chat.mdx b/ui-kit/android/guide-new-chat.mdx index 6370344dd..09aeb41d4 100644 --- a/ui-kit/android/guide-new-chat.mdx +++ b/ui-kit/android/guide-new-chat.mdx @@ -4,6 +4,8 @@ sidebarTitle: "New Chat" description: "Enable users to start one-on-one or group chats from a new chat screen with user and group browsing." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + | Field | Value | @@ -15,6 +17,8 @@ description: "Enable users to start one-on-one or group chats from a new chat sc + + Enable users to start one-on-one or group chats by integrating CometChat's **New Chat** screen (`CometChatUsers` + `CometChatGroups`), providing a seamless flow from your conversation list to a specific chat. ## Overview diff --git a/ui-kit/kotlin/2.0/ui-components.mdx b/ui-kit/kotlin/2.0/ui-components.mdx index 2096e00de..279cba57f 100644 --- a/ui-kit/kotlin/2.0/ui-components.mdx +++ b/ui-kit/kotlin/2.0/ui-components.mdx @@ -3,6 +3,9 @@ title: "UI Components" description: "UI Components — CometChat documentation." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + + Version: v2 **UI Components** are building a block of the UI Kit. **UI Components** are a set of custom classes specially designed to build a feature-rich chat app. To achieve high customizability while building an app one can use the UI Components. There are different UI Components available in the UI Kit library. diff --git a/ui-kit/react-native/message-bubble-styling.mdx b/ui-kit/react-native/message-bubble-styling.mdx index 9af6489e3..ac39d8c77 100644 --- a/ui-kit/react-native/message-bubble-styling.mdx +++ b/ui-kit/react-native/message-bubble-styling.mdx @@ -3,6 +3,8 @@ title: "Message Bubble Styling" description: "Customize CometChat React Native UI Kit message bubbles for text, image, video, audio, file, poll, and other message types." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + | Field | Value | @@ -20,6 +22,8 @@ description: "Customize CometChat React Native UI Kit message bubbles for text, + + Customize message bubble appearance by passing bubble styles in `theme.messageListStyles`. diff --git a/ui-kit/react/components/message-composer.mdx b/ui-kit/react/components/message-composer.mdx index 892cb3317..34da93a4d 100644 --- a/ui-kit/react/components/message-composer.mdx +++ b/ui-kit/react/components/message-composer.mdx @@ -3,6 +3,8 @@ title: "Message Composer" description: "Rich text input with attachments, emoji, voice recording, mentions, and formatting for sending messages." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + ```json { @@ -134,6 +136,8 @@ description: "Rich text input with attachments, emoji, voice recording, mentions ``` + + ## Overview `CometChatMessageComposer` is a rich text input component for sending messages. It supports attachments, emoji, voice recording, mentions, rich text formatting, and reply/edit previews. Wire it alongside `CometChatMessageList` and `CometChatMessageHeader` to build a complete messaging experience. diff --git a/ui-kit/react/guide-new-chat-creation.mdx b/ui-kit/react/guide-new-chat-creation.mdx index dc98c3863..425903554 100644 --- a/ui-kit/react/guide-new-chat-creation.mdx +++ b/ui-kit/react/guide-new-chat-creation.mdx @@ -4,6 +4,10 @@ sidebarTitle: "New Chat Creation" description: "Start new one-on-one or group conversations by selecting users or groups from a list." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + + + ## Goal By the end of this guide you will have a chat interface where users can initiate new one-on-one conversations by selecting from a user list, or start group chats by selecting from available groups — then immediately begin messaging. diff --git a/ui-kit/react/next-tab-based-chat.mdx b/ui-kit/react/next-tab-based-chat.mdx index ee8ee4c54..023aaa5a0 100644 --- a/ui-kit/react/next-tab-based-chat.mdx +++ b/ui-kit/react/next-tab-based-chat.mdx @@ -4,6 +4,8 @@ sidebarTitle: "Tab-Based Chat" description: "Build a tab-based chat interface with Chat, Call Logs, and Users tabs in Next.js (App Router)." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + | Field | Value | @@ -18,6 +20,8 @@ description: "Build a tab-based chat interface with Chat, Call Logs, and Users t + + This guide builds a tabbed messaging UI — Chat, Calls, and Users tabs in the sidebar, with a message view on the right. Good for full-featured apps that need more than just conversations. This assumes you've already completed [Next.js Integration](/ui-kit/react/integration-nextjs) (project created, UI Kit installed, init + login working). diff --git a/ui-kit/react/overview.mdx b/ui-kit/react/overview.mdx index 0e05a1456..c86983bf8 100644 --- a/ui-kit/react/overview.mdx +++ b/ui-kit/react/overview.mdx @@ -4,6 +4,8 @@ sidebarTitle: "Overview" description: "Prebuilt React components for chat, voice, and video calling. Supports React.js, Next.js, React Router, and Astro." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + | Field | Value | @@ -18,6 +20,8 @@ description: "Prebuilt React components for chat, voice, and video calling. Supp + + The CometChat React UI Kit provides prebuilt, customizable components for adding chat, voice, and video calling to any React app. Each component handles its own data fetching, real-time listeners, and state — you just drop them into your layout. diff --git a/web-shared/localize.mdx b/web-shared/localize.mdx index 5dd185f54..dc8e5866d 100644 --- a/web-shared/localize.mdx +++ b/web-shared/localize.mdx @@ -3,6 +3,9 @@ title: "Localize" description: "Localize — CometChat documentation." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + + With language localization, CometChat UI Kit adapts to the language of a specific country or region. `CometChatLocalize` allows you to detect the language of your users based on their browser settings and set the language accordingly. ## Supported languages diff --git a/web-shared/reactions-configuration.mdx b/web-shared/reactions-configuration.mdx index 4ab268095..94926b7df 100644 --- a/web-shared/reactions-configuration.mdx +++ b/web-shared/reactions-configuration.mdx @@ -3,6 +3,9 @@ title: "ReactionsConfiguration" description: "ReactionsConfiguration — CometChat documentation." --- +import { EntryPoint } from "/snippets/entry-point.mdx"; + + You can modify the Reaction component's properties using the ReactionsConfiguration object. To use a configuration, you simply need to pass it to respective parameter. The ReactionsConfiguration supports the following properties: