InBot Chat Widget
My role
Lead developer on a team of 3, with QA, UX and UI. I made about 350 of the 353 commits, from February to October 2026.
I rewrote the widget in React + TypeScript + Vite, shipped as a single file loaded by a <script> tag. The UI runs isolated in a Shadow DOM, so the customer site's CSS never interferes with it. The widget safely renders the HTML the bot sends, which enables rich components such as profile cards, carousels and catalogs with search and filters. It also covers handoff to human agents (queue, typing indicator, resuming after a page reload), attachments, emojis, text-to-speech, saved history, answer rating, 4 languages (pt, en, es, fr) and a window.inbot API so the host site can control the conversation. There are two bundles: production and a preview for the configuration platform.
Before
A legacy widget in plain JavaScript with no build step, scattered configuration and new components added case by case.
The problem
The chat widget is the entry point for every InBot bot on customers' websites. The old version, written in plain JavaScript with no build step, was hard to evolve and test, and every new component the bot needed to show (cards, carousels, catalogs) became a patch in the code.
The solution
I rewrote the widget in React + TypeScript + Vite, shipped as a single file loaded by a <script> tag. The UI runs isolated in a Shadow DOM, so the customer site's CSS never interferes with it. The widget safely renders the HTML the bot sends, which enables rich components such as profile cards, carousels and catalogs with search and filters. It also covers handoff to human agents (queue, typing indicator, resuming after a page reload), attachments, emojis, text-to-speech, saved history, answer rating, 4 languages (pt, en, es, fr) and a window.inbot API so the host site can control the conversation. There are two bundles: production and a preview for the configuration platform.
Decisions and trade-offs
Shadow DOM to isolate the widget from the customer's site, instead of prefixing CSS. A single IIFE file the customer installs with one tag, with no dependencies. A separate bundle for the configuration platform preview, which receives its config via postMessage. HTTP contract, session and telemetry kept compatible with the legacy widget, so the migration required no backend changes.
The results
The new widget runs in production across several bots and is ready for new customers. On InBot's own website alone, which moved to it at the end of September 2026, it powers 9 bots, and in 25 days it handled about 3,000 conversations and 9,300 interactions on desktop and mobile. Each environment (dev, staging and production) has its own folder on the CDN, and nothing reaches production without going through dev and staging first. The code has 116 test files and mutation testing with Stryker.
Results by the numbers
- ~3.000conversations in 25 days on the InBot website
- 9.300+interactions in the same period
- 9website bots running on the widget
- 4interface languages
- 116test files