Featured PostWeb Development

Building Sygma Studio: Lessons from Shipping an Enterprise AI Orchestration Platform

How we designed an embeddable, omnichannel AI platform with voice-to-voice simulation, RAG ingestion, and a zero-dependency widget — and what it taught me about scaling frontend architecture.

A
Azar
Mar 18, 20269 min read64 likes

Six months into building Sygma Studio, an enterprise-grade AI orchestration platform, I realized I'd been thinking about frontend architecture entirely wrong. We weren't shipping a web app. We were shipping a control surface for a system that had to talk to LLMs, document extractors, voice simulators, WhatsApp Business, and an embeddable widget — all from a single React codebase.

The Problem We Were Actually Solving

Most "AI chatbot" platforms stop at a chat window. Sygma had to go further. The product team needed RBAC-gated workflows for non-technical operators, a WYSIWYG editor for WhatsApp templates with dynamic variables and carousel previews, a voice-to-voice simulator with sub-second latency, and an embeddable widget that could be dropped into any third-party website without polluting their CSS or JS namespace.

When the surface area of your product is this broad, the cost of every architectural decision compounds. A wrong abstraction in week 2 becomes a four-week refactor in month 4.

Zero-Dependency Widget: The Hardest Constraint

The embeddable widget was the part I was most nervous about. It needed to be dropped into any website with a single script tag, isolated from the host's styles, and weigh less than a typical icon font. We rejected React on the widget side entirely. The final bundle ships as a self-contained ESM module with styled-components for CSS isolation, a custom event bus for host communication, and a shadow-DOM fallback for the environments where styled-components alone wasn't enough.

TypeScript
// Single-script bootstrap — no peer deps, no globals leaked
(function bootstrap() {
  const script = document.currentScript as HTMLScriptElement;
  const tenantId = script.dataset.tenant!;

  // Mount in an isolated container so host CSS can't bleed in
  const host = document.createElement("div");
  host.id = "sygma-widget-root";
  document.body.appendChild(host);

  import(/* webpackIgnore: true */ `${CDN}/widget.${VERSION}.js`).then((m) => {
    m.mount(host, { tenantId, theme: script.dataset.theme });
  });
})();

RAG Ingestion and the Chunking Visualizer

Building a RAG pipeline is well-trodden ground. Making it debuggable for operators is not. Our team kept hitting the same support ticket: "Why didn't the bot find this answer?" The honest answer was always the same — the chunk boundaries fell badly, or the embedding similarity threshold was off. So we shipped a chunking visualizer and a search simulator that let non-engineers inspect both before deploying changes to production.

"The bottleneck in enterprise AI isn't model quality. It's the feedback loop between the operator who notices a wrong answer and the engineer who can fix it. Shorten that loop, and the whole product gets better."

Voice-to-Voice Simulator: Latency Was the Product

Telerobotic, our voice simulator, demanded a different mental model entirely. Frontend latency budgets are usually generous — 100ms here, 200ms there, nobody complains. With voice, anything above 400ms round-trip feels broken. We had to instrument every layer: WebRTC signaling, server-side speech-to-text, LLM inference, tool calls, and TTS playback. The event log visualization wasn't decorative — it was the only way our QA team could tell whether a regression was in our code or in a vendor SDK update.

Build the observability surface before you build the feature. Once you can see what's slow, the optimization opportunities become obvious. Once you can't, every "it feels sluggish" report eats a day of investigation.

What I'd Do Differently

If I rebuilt Sygma from scratch tomorrow, the first thing I'd change is the data layer. We leaned on React Query for everything, which was the right call for cached reads but a poor fit for the streaming, event-driven parts of the app (voice, RAG progress). The mix of imperative event streams and declarative cache invalidation got tangled enough that I'd introduce a dedicated streaming primitive — probably a custom hook over WebSocket subscriptions with explicit lifecycle ownership — much earlier.

The second thing: ship the embeddable widget on day one, even as a stub. We built it last, and a lot of architectural assumptions baked into the dashboard had to be unwound to make the widget feasible. Constraints that arrive late are the most expensive constraints.

Working on enterprise AI? I'd love to hear what you're shipping.
© 2026 Azar. All rights reserved.Sailing the React seas

AZAR

Frontend Developer
Loading