01 About me 02 Experience 03 Achievements 04 Projects 05 Contact Let's talk
Language
ES EN
Back to achievements

Case study

Real-time chat widget

I replaced a third-party chat widget with an in-house one for SKY Airline, keeping the integration with the provider's customer service platform.

Role
Full Stack Developer, in charge of the frontend
Company
Southteams, assigned to Qurable · SKY Airline
Technologies
  • single-spa
  • webpack
  • Jest
  • Web Locks

The starting point

The airline used the widget from NICE CXone, a third-party provider: it was heavy, slow to load and could not be customized. Any visual or functional change depended on the provider. The goal was an in-house frontend, fully customizable by the company, while keeping NICE CXone via WebSocket for the response logic.

I built the frontend from scratch: conversation phases, multi-tab support, expandable input, automatic link detection and a real-time agent typing indicator.

Messages without duplicates

Retrying a send can duplicate a message, even more so with the chat open in several tabs. That is why a message is confirmed by the server echo, and its retries keep the same key across all tabs.

Detecting the last tab

Browsers offer no direct way to know whether a tab is the last one open for a site. I solved it with Web Locks and BroadcastChannel, and documented why I ruled out localStorage and a periodic heartbeat.

From bot to human agent

A conversation goes through three phases: Bot, Queue and Agent. I modeled them as a phase machine that is rebuilt when the page reloads.

Clear layers, no framework

The widget is organized in layers and uses no UI framework. The interface knows nothing about the provider's SDK, and it avoids innerHTML, which reduces the risk of HTML injection.

Result

A significantly lighter and faster-loading widget, with a frontend the company can customize without depending on the provider.