Use case

Real-time Chat

Add real-time messaging, presence, and typing indicators to any application. ScaleMule handles the infrastructure for reliable message delivery.

events.scalemule

Event delivery

Production stream

SignedRetry policy

agent.task.completed

Published

webhook.delivery

Queued

customer.app

Delivered

10:24:16Event accepted by stream
10:24:17Webhook signed and queued
10:24:18Endpoint returned 200 OK

Scoped access

API keys, roles, policies, and environments.

Tenant data

Application and tenant context on every request.

Reliable events

Signed delivery, retries, and webhook visibility.

Audit trail

Sensitive changes recorded for review.

The problem

AI can build the first version. Growth still needs a backend model.

01

The first version can work locally while production access, data, events, storage, and audit behavior remain undefined.

02

Backend pieces often arrive as separate patches once customers begin depending on the workflow.

03

Generated product logic needs a stable platform boundary before it can support real customer growth.

ScaleMule model

A shared backend foundation for real-time chat

Use ScaleMule as the backend target for the product pattern you are building, so identity, tenant data, events, storage, and audit stay connected instead of becoming separate glue projects.

Real-time messaging with delivery confirmations

Presence tracking and online/offline indicators

Typing indicators and read receipts

Message history with search and pagination

Common workflows

What teams can build on this foundation

These are examples of the product surfaces ScaleMule helps keep structured as generated code turns into customer-facing software.

Real-time messaging with delivery confirmations

Start from the product pattern and keep the backend primitives visible from the first implementation.

Presence tracking and online/offline indicators

Attach access rules, tenant context, event delivery, storage rules, and audit events to the workflow.

Typing indicators and read receipts

Extend the same model as the product adds users, customers, integrations, and operational requirements.

Developer path

Start with the SDK, keep the backend model explicit

Using @scalemule/chat

Code example
import { ScaleMuleChat } from '@scalemule/chat'

const chat = new ScaleMuleChat({
  apiKey: process.env.SCALEMULE_API_KEY,
  tenant: 'acme-corp'
})

// Join a channel and listen for messages
const channel = await chat.channel('support')
channel.on('message', (msg) => {
  console.log(`${msg.sender}: ${msg.text}`)
})

// Send a message
await channel.send({ text: 'Hello from the agent!' })

Outcomes

Why this matters once customers depend on the product

ScaleMule keeps practical backend controls visible while teams move quickly with AI coding tools.

Real-time Chat can move from prototype to production with fewer backend rewrites.

Access, tenant data, events, storage, functions, and audit controls stay part of the same product model.

Teams get clearer answers when customers ask how the application handles boundaries and operations.

Build with AI. Grow on ScaleMule.

Give real-time chat a backend model that can support real users, real teams, and real customer questions.