Quick Links
GitHub ๐Ÿ“š Docs ๐Ÿ‘จโ€๐Ÿ’ป Portal ๐Ÿ”‘ Test API Key

Live Demos

Experience the SDK in action. No installation required.

๐Ÿ’
Game

Air Hockey

Real-time multiplayer physics game. Challenge a friend to a quick match with smooth 60 FPS gameplay.

Physics 2-Player
Play Now
๐Ÿ“
Tool

Quick Share

Share files and text instantly with nearby devices. No accounts, no uploads to cloud servers.

File Transfer P2P
Try It Live
๐Ÿ’ฌ
Basic

Chat Demo

Simple chat room demonstrating basic messaging patterns and event handling.

Messaging Events
Open Chat
๐Ÿ“น
Experimental

Video Chat

WebRTC-powered video conferencing with screen sharing and real-time communication.

WebRTC Streaming
Start Call
๐Ÿ”ง
Tool

Connection Tester

Test your API keys, validate connections, and debug integration issues.

Debug Testing
Test Now
๐ŸŽฎ

More Demos

Fall Guys, Race Balls, Quiz Battle, Find the Liar, Channel Storage, and more...

Developer Portal

๐Ÿš€ Quick Start โ€” 3 Steps

1
Include the SDK
<!-- Add to your HTML -->
<script src="web-agent.libs.js"></script>
<script src="web-agent.js"></script>

<!-- Optional: For WebRTC (video/audio/screen sharing) -->
<script src="web-agent.webrtc.js"></script>
2
Connect to a Channel
const agent = new AgentConnection();

agent.connect({
  channelName:     'my-room',
  channelPassword: 'secret123',
  agentName:       'player-1',
  api:             'https://hmdevonline.com/messaging-platform/api/v1/messaging-service',
  apiKey:          'your-api-key'
});
3
Send & Receive Messages
// Simple text message
agent.sendTextMessage('Hello, World!');

// Object format (for advanced options)
agent.sendMessage({
  content:    'Hello, World!',
  type:       'chat-text',
  to:         'player-2'  // Optional: specific agent
});

// Receive messages
agent.onMessage = (msg) => {
  console.log(msg.content);
};

How It Works

Simple architecture, powerful capabilities

๐Ÿ”

Secure by Default

End-to-end encryption ensures your data stays private between clients

โšก

Real-Time Communication

WebSocket-based messaging with sub-50ms latency for smooth interactions

๐ŸŒ

Cross-Platform

SDKs for Web, Java, Python, and C++ with consistent APIs

Show Architecture Details

System Architecture


โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Client A  โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚   Server    โ”‚โ—€โ”€โ”€โ”€โ”€โ”‚   Client B  โ”‚
โ”‚  (Browser)  โ”‚     โ”‚  (Gateway)  โ”‚     โ”‚   (Game)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
      โ”‚                    โ”‚                    โ”‚
      โ”‚    WebSocket       โ”‚    WebSocket       โ”‚
      โ”‚   + Encryption     โ”‚   + Encryption     โ”‚
      โ”‚                    โ”‚                    โ”‚
      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  Real-Time Channel
                        

Channel-Based

Clients join named channels to communicate. No complex room management required.

Message Types

Send any JSON-serializable data. Define your own message protocol.

Presence Tracking

Know when users join, leave, or disconnect from a channel.

WebRTC Relay

Optional P2P connections for video/audio with automatic fallback.

๐ŸŽฎ Mini-Games

Interactive multiplayer games showcasing real-time communication

๐Ÿคฅ
Game

Find the Liar

Social deduction party game where players vote to catch the liar!

3-10 Players Party
Play Now
๐Ÿƒ
Game

Fall Guys Race

Obstacle course racing with 3D graphics and physics.

Multi-player 3D
Play Now
๐Ÿ
Game

Race Balls

3D racing with physics-based ball controls and boost system.

2-4 Players Racing
Play Now
โšก
Game

Reactor

Fast-paced 4-player reaction game testing your reflexes.

4-Player Reaction
Play Now

๐Ÿ—๏ธ System Architecture Overview

The Messaging Platform is a real-time communication system that enables agents (clients) to exchange messages through channels. It supports multiple protocols (HTTP, WebSocket, UDP) and provides features like encryption, WebRTC relay, channel isolation, and ephemeral messaging.

๐Ÿ“Š HIGH-LEVEL ARCHITECTURE MESSAGING PLATFORM Web Agent (Browser) Java Agent (Desktop) Python Agent (Scripts) C++ Agent (Games) API Gateway (Load Balancing / Auth) Messaging Service (Channels / Messages) Kafka Service (Message Broker) Other Services (Extensible) DB Persistence (Sessions / Channels) Caching Layer (High-Performance)

๐Ÿ”‘ API Key System

The platform uses a flexible API key system with two types of keys for different security requirements.

๐Ÿ” API KEY ARCHITECTURE
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                           API KEY SYSTEM                                         โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                                  โ”‚
โ”‚   ORIGINAL API KEY (Developer Key)                                             โ”‚
โ”‚   โ”œโ”€โ”€ Permanent key issued to developer                                         โ”‚
โ”‚   โ”œโ”€โ”€ Full access to all features                                               โ”‚
โ”‚   โ”œโ”€โ”€ Used for server-side applications                                         โ”‚
โ”‚   โ””โ”€โ”€ Should be kept SECRET (never expose to clients)                           โ”‚
โ”‚                                                                                  โ”‚
โ”‚                          โ”‚                                                       โ”‚
โ”‚                          โ–ผ                                                       โ”‚
โ”‚   TEMPORARY API KEY (Client Key)                                               โ”‚
โ”‚   โ”œโ”€โ”€ Short-lived (expires automatically)                                       โ”‚
โ”‚   โ”œโ”€โ”€ Limited capabilities                                                      โ”‚
โ”‚   โ”œโ”€โ”€ Safe for client-side applications                                         โ”‚
โ”‚   โ””โ”€โ”€ If compromised, expires soon anyway                                       โ”‚
โ”‚                                                                                  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ’ก WHEN TO USE EACH:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚         Original API Key          โ”‚              Temporary API Key              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ โœ“ Server-side applications       โ”‚ โœ“ Web browsers (JavaScript)                  โ”‚
โ”‚ โœ“ Backend services               โ”‚ โœ“ Mobile apps                                โ”‚
โ”‚ โœ“ Trusted environments           โ”‚ โœ“ Untrusted clients                          โ”‚
โ”‚ โœ“ Full feature access needed     โ”‚ โœ“ Limited feature access OK                  โ”‚
โ”‚ โœ— Never in client-side code      โ”‚ โœ“ Safe to expose in client code              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Temporary Key Flow

1

Server Creates Temporary Key

Your backend server uses the original API key to create a temporary key with specific restrictions.

2

Client Receives Temporary Key

The temporary key is sent to the client (browser, mobile app). It's safe to transmit over the network.

3

Client Connects to Channel

The client uses the temporary key to connect. The platform validates it and applies restrictions.

4

Key Expires Automatically

After the expiration time, the key stops working. Client needs a new temporary key to continue.

โœจ Key Features

๐Ÿ” End-to-End Encryption

All messages encrypted by default using DTLS and TLS

๐Ÿ“ก WebSocket + WebRTC

Real-time messaging with ultra-low latency P2P channels

๐ŸŒ Channel-Based

Simple and intuitive room management with named channels

๐Ÿ‘ฅ Presence Tracking

Real-time notifications when users join, leave, or disconnect

๐Ÿ’พ Channel Storage

Persistent key-value storage for game state and settings

๐Ÿ”„ Auto-Reconnection

Built-in logic handles network interruptions gracefully

๐Ÿ’ป Code Examples

Quick code snippets to get you started

1. Include the SDK

<script src="web-agent.libs.js"></script>
<script src="web-agent.js"></script>

2. Connect to a Channel

const agent = new AgentConnection();

agent.connect({
  channelName:     'my-room',
  channelPassword: 'secret123',
  agentName:       'player-1',
  api:             'https://hmdevonline.com/messaging-platform/api/v1/messaging-service',
  apiKey:          'your-api-key'
});

3. Send Messages

// Simple text message
agent.sendTextMessage('Hello, World!');

// Object format
agent.sendMessage({
  content: 'Hello, World!',
  type: 'chat-text',
  to: 'player-2'
});

4. Receive Messages

agent.onMessage = (msg) => {
  console.log(msg.content);
};
View Full Documentation

โœจ Features

Everything you need for real-time applications

๐Ÿ”

End-to-End Encryption

DTLS and TLS encryption by default. Your data stays private.

โšก

Ultra-Low Latency

WebRTC P2P connections for sub-50ms latency in games.

๐ŸŒ

Cross-Platform SDKs

JavaScript, Java, Python, and C++ with consistent APIs.

๐Ÿ“ก

Real-Time Messaging

WebSocket-based instant communication between all clients.

๐Ÿ’พ

Channel Storage

Persistent key-value storage for game state and settings.

๐Ÿ‘ฅ

Presence Tracking

Real-time notifications when users join, leave, or disconnect.

๐Ÿ”„

Auto-Reconnection

Built-in logic handles network interruptions gracefully.

๐ŸŽฎ

Game-Ready

Optimized for real-time multiplayer games and simulations.

๐Ÿ“ฑ

Mobile-Friendly

Works on iOS, Android, and all modern browsers.

๐Ÿ”“

Open Source

MIT License - use it freely in your projects.

๐Ÿ“‹ Current Status

Production readiness and API stability

๐Ÿšง

Pre-Production Status

The Messaging Platform SDK is currently in active development and pre-production stage.

What This Means:

  • โœ… Fully Functional: All core features work and are stable
  • โš ๏ธ API Changes: APIs may change between releases
  • ๐Ÿงช Active Testing: Undergoing extensive testing and optimization
  • ๐Ÿ“– Documentation: Being continuously improved
  • ๐ŸŽฏ Production Ready: Target Q2 2026

Want to use it in production? Join the discussion

๐Ÿš€ Roadmap

What's coming next

Q1 2026 - CURRENT

โœ… Core SDK & Examples

  • JavaScript/Java/Python/C++ SDKs
  • WebSocket + WebRTC support
  • Example games and applications
  • Channel storage API
Q2 2026

๐ŸŽฏ Production Release

  • API stabilization and v1.0 release
  • Complete documentation
  • Performance optimizations
  • Production-ready deployment guides
Q3 2026

๐Ÿš€ Advanced Features

  • Voice/Video chat SDK
  • Screen sharing support
  • Advanced matchmaking
  • Analytics dashboard
Q4 2026

๐ŸŒŸ Enterprise Features

  • Self-hosted server option
  • Custom authentication integration
  • Advanced monitoring and logging
  • SLA and enterprise support

Have suggestions? We'd love to hear from you!

Join Discussions