Production-ready patterns you can copy
Explore curated examples covering backend services, realtime overlays, automation scripts, and workflow integrations. Each project includes detailed READMEs, infrastructure diagrams, and deployment runbooks.
Server-side matchmaking
Quickly assemble a matchmaking service that uses AeThex queues, weighting rules, and player telemetry streams.
import { createQueue, matchPlayers } from "@aethex/matchmaking";
const queue = await createQueue({
region: "us-central",
size: 4,
constraints: [
{ field: "skillRating", tolerance: 120 },
{ field: "latency", max: 90 },
],
});
export async function enqueuePlayer(player) {
await queue.enqueue(player.id, {
skillRating: player.mmr,
latency: player.ping,
});
const match = await matchPlayers(queue);
if (match) {
await queue.lock(match.id);
return match;
}
return null;
}Open repositoryRealtime activity overlays
Broadcast live deployment and incident updates to your in-game HUD or operations dashboard using AeThex events.
import { useEffect, useState } from "react";
import { subscribe } from "@aethex/events";
export function ActivityOverlay() {
const [events, setEvents] = useState([]);
useEffect(() => {
const unsubscribe = subscribe("deployment.*", (event) => {
setEvents((current) => [event, ...current].slice(0, 5));
});
return () => unsubscribe();
}, []);
return (
<aside className="rounded-xl border border-purple-500/40 bg-black/60 p-4">
<h3 className="text-sm font-semibold text-purple-200">Live activity</h3>
<ul className="mt-3 space-y-2 text-xs text-gray-200">
{events.map((evt) => (
<li key={evt.id} className="rounded border border-purple-500/20 bg-purple-900/20 p-2">
<span className="font-mono text-purple-300">{evt.type}</span>
<span className="ml-2 text-gray-400">{evt.payload.summary}</span>
</li>
))}
</ul>
</aside>
);
}Open repositoryWorkshop automation
Automate the packaging and publishing of custom workshop content across AeThex environments using the CLI.
#!/usr/bin/env bash
set -euo pipefail
WORKSPACE=${1:-"mods"}
npm install
aethex login --token "$AETHEX_TOKEN"
aethex workshop package "$WORKSPACE" --out dist/
aethex deploy --environment production --artifact dist/workshop.tgz
echo "Workshop build published"Open repositoryDeploy faster with templates
Commerce hooks
Sync AeThex purchase events into your billing or CRM system using the webhook relay template.
Continue learningLive operations dashboard
Combine project metrics, incident response playbooks, and player sentiment into a single React dashboard.
Continue learningCross-platform presence
Mirror AeThex voice and party status with your Discord or Slack community using the presence bridge sample.
Continue learningAnalytics pipeline
Export gameplay events to your data warehouse with the managed streaming connectors.
Continue learningNeed a custom integration?
Our professional services team partners with studios to build tailored pipelines, analytics dashboards, and automation workflows on top of AeThex.