Skip to main content

๐Ÿš€ Welcome to XHub Chat

Modern, type-safe chat SDK for building real-time messaging experiences in React and beyond.


โœจ Why XHub Chat?โ€‹

XHub Chat provides a comprehensive suite of tools for building real-time chat applications with ease. Whether you're building a small team chat or a large-scale messaging platform, XHub Chat has you covered.

Core Strengthsโ€‹

๐ŸŽฏ

Type-Safe

Built with TypeScript for full type safety and IntelliSense support throughout your development workflow.

โšก

Real-Time

WebSocket-based communication with sliding sync, automatic reconnection, and optimistic UI updates.

๐Ÿ’พ

Offline-First

Built-in IndexedDB caching ensures your app works seamlessly offline and syncs when back online.

Developer Experienceโ€‹

  • ๐Ÿ”Œ Framework Agnostic Core - Use with React, Vue, Angular, or vanilla JavaScript
  • ๐Ÿช React Hooks - Powerful, easy-to-use hooks for seamless React integration
  • ๐Ÿ“ฆ Modular Architecture - Use only what you need, fully tree-shakeable exports
  • ๐Ÿงช Well Tested - Comprehensive test coverage with Jest and TypeScript
  • ๐Ÿ“š Extensive Documentation - Detailed guides, API references, and real-world examples
  • ๐ŸŽจ Modern Tooling - Built with latest TypeScript, bundled with tsup

๐ŸŽจ Core Featuresโ€‹

๐Ÿ“ฑ For All Developers

  • ๐ŸŽญ Event-driven architecture
  • ๐Ÿ”Œ Extensible plugin system
  • ๐Ÿ’พ IndexedDB caching for offline support
  • ๐Ÿ’ฌ Message reactions and threading
  • ๐Ÿ  Room management and presence
  • ๐Ÿ“Ž File attachments and media
  • ๐Ÿ”” Push notifications support
  • ๐Ÿ” End-to-end encryption ready

โš›๏ธ For React Developers

  • useXHubChat - Core chat client access
  • useRooms - Room list management
  • useTimeline - Message timeline with pagination
  • useReactions - Message reactions handling
  • useThread - Thread management
  • useTyping - Typing indicators
  • usePresence - User presence tracking
  • And many more custom hooks...

๐Ÿ“ฆ Packagesโ€‹

๐Ÿ“ฆ @xhub-chat/core

Framework-agnostic core chat functionality with WebSocket support, event handling, and storage.

Perfect for: Building chat on any platform or framework

Learn more โ†’

@xhub-chat/react

React hooks and components for seamless integration with the core SDK.

Learn more โ†’

๐Ÿš€ Quick Startโ€‹

Get started in less than 5 minutes:

# Install packages
pnpm add @xhub-chat/core @xhub-chat/react

# Or with npm
npm install @xhub-chat/core @xhub-chat/react

# Or with yarn
yarn add @xhub-chat/core @xhub-chat/react
import { XHubChatProvider, useXHubChat, useRooms } from '@xhub-chat/react';

function App() {
return (
<XHubChatProvider config={{ baseUrl: 'https://api.example.com' }}>
<ChatApp />
</XHubChatProvider>
);
}

function ChatApp() {
const client = useXHubChat();
const { rooms, loading } = useRooms();

return (
<div>
<h1>My Rooms</h1>
{loading ? (
<p>Loading...</p>
) : (
rooms.map(room => (
<div key={room.roomId}>{room.name}</div>
))
)}
</div>
);
}

๐Ÿ“– What's Next?โ€‹

๐Ÿ“š Getting Started

Learn the basics and get your first app running

Installation โ†’

๐Ÿ’ก Core Concepts

Understand the architecture and design principles

Overview โ†’

๐Ÿ“˜ API Reference

Detailed API documentation for all exports

API Docs โ†’

๐Ÿค Community & Supportโ€‹

๐Ÿ“„ Licenseโ€‹

XHub Chat is proprietary software ยฉ 2025 TekNix Corporation. All rights reserved.