The system, not the sales pitch.
How Sumeru Systems is actually built — event ingest, BullMQ workers, multi-tenant data plane, self-throttling helpers, snapshot-and-undo. With actual code from the runtime.
Production scale. Audited. Observable.
One block diagram. No abstractions left out.
If you can't draw it, you can't operate it. Here's the entire production runtime.
Detection emits a typed event.
Detection paths (decay, score drop, anomaly, opportunity) emit autoaction events. Fire-and-forget; emit failure can never block the detector.
// app/lib/seo-engine/decay-detector.server.js
const findings = await detectDecay(shop, runs);
if (findings.length > 0) {
const { emitAutoAction } = await import("../autoactions/dispatcher.server.js");
const { EVENTS } = await import("../automations/events.js");
await emitAutoAction({
shop,
triggerEvent: EVENTS.SEO_CONTENT_DECAY_DETECTED,
resources: findings.slice(0, 50).map((f) => ({
resourceType: "page",
resourceId: f.page,
payload: { dropPct: f.dropPct, priorClicks: f.priorClicks, nowClicks: f.nowClicks },
})),
});
} Every action: meta + snapshot + handler + undoHandler.
A four-function contract. Adding a new action means dropping a file in app/lib/autoactions/actions/ and registering it. The dispatcher discovers it automatically.
// app/lib/autoactions/actions/refresh-blog-post.server.js
export const meta = {
key: "refresh_blog_post",
triggerEvents: ["seo.content_decay_detected"],
resourceType: "page",
requiredPlan: "pro",
paramSchema: [
{ key: "minDropPct", type: "number", default: 30, min: 10, max: 90 },
],
};
export async function snapshot(shop, resourceId) {
const content = await prisma.seoContent.findFirst({
where: { shop, urlSlug: deriveSlug(resourceId) },
select: { id: true, status: true, content: true },
});
return { contentId: content?.id, prevStatus: content?.status, prevContent: content?.content };
}
export async function handler(shop, resourceId, params, ctx) {
const before = await snapshot(shop, resourceId);
if (!before.contentId) return { skipped: "not_found" };
const queued = await queueContentRefresh(shop, before.contentId, { _manual: true });
return { refreshQueueId: queued.id, scheduledFor: queued.scheduledFor };
}
export async function undoHandler(shop, resourceId, before) {
const pending = await prisma.blogRefreshQueue.findFirst({
where: { shop, contentId: before.contentId, status: "pending" },
});
if (!pending) return { undone: false, reason: "already_processed" };
await prisma.blogRefreshQueue.update({
where: { id: pending.id },
data: { status: "cancelled" },
});
return { undone: true, refreshQueueId: pending.id };
} Subscribe via outbound webhook.
Every applied action fires an outbound webhook to your endpoint. Signed with HMAC-SHA256, retry with exponential backoff, dead-letter after 4 attempts.
// inbound webhook payload (your endpoint)
{
"event": "autoaction.applied",
"eventId": "evt_a8c4f...",
"shop": "yourshop.myshopify.com",
"ruleId": "rule_19fc...",
"ruleName": "Refresh decaying blog posts",
"actionKey": "refresh_blog_post",
"resourceType": "page",
"resourceId": "/products/my-blog-post",
"after": { "refreshQueueId": "q_4f...", "scheduledFor": "2026-05-10T18:24:00Z" },
"occurredAt": "2026-05-10T18:23:42Z"
} What's running in production.
Want a deeper architecture review?
Our engineering team runs a 60-min technical deep-dive for prospective enterprise customers. Whiteboard, runtime walkthrough, Q&A on the specific primitives above.