The builder compiles, the storefront just runs it
How I built a no-code daily deal widget builder: settings turned into one self-contained widget, previewed live, with no backend or database change.

The ask was simple: a marketer should be able to change the products, the title and the colors of a daily deal widget without writing a line of code.
The widget itself runs on a storefront. So I built a new version of it inside the marketing panel at my day job: a builder where you pick up to 4 products, set titles, colors and a button, and see the result before you save.
What I had to work around
The storefronts are the first constraint. A brand adds the widget to its site and that's it. There is no build step on their side, and I can't assume anything about their theme.
The panel is the second. It's a large shared codebase with many other on-site widgets (countdown, spin wheel, social proof, sticky bars, upsell, exit intent) living next to each other. The first version of the daily deal widget was still live and could not break.
And I gave myself three rules up front:
- no new backend work,
- no database change,
- reuse the existing widget save flow.
That last rule turned out to shape everything.
Decision 1: turn settings into the widget
The obvious design is a generic runtime that loads the settings from somewhere and interprets them every time a page opens.
That would have needed new storage and a new service. So the builder does the work up front instead: when the marketer saves, their settings are turned into one self-contained widget with the settings already inside. The storefront just runs it. Nothing extra is fetched on page load, and nothing new was needed on the server.
When a marketer reopens a saved widget, the builder reads its settings back, so they keep editing in the form instead of starting over.
Decision 2: preview the real thing
My first preview idea was a separate mock of the widget next to the form. It would have drifted from the real widget within a week, and two versions mean two sets of layout bugs.
So the preview runs the same widget the storefront will get, inside an embedded frame, and updates as you type without reloading. The widget stays open while you edit the title, which is what a marketer expects.
Running the real widget on every keystroke also surfaced problems early: code written to run once per page now ran many times. Fixing that in the preview meant it was fixed before any storefront saw it.
The 1, 2, 3 and 4 product layouts all live in the widget itself, so what the preview shows is what shoppers see.
Decision 3: make text survive the round trip
Titles pass through several layers between the panel and the storefront. Turkish characters came back garbled after a save and reopen, so I made sure text is stored in a form that survives every layer, and that older broken text is repaired when a widget is opened again. Tests cover the round trip: build the widget, read it back, compare.
Decision 4: let the storefront fill the products
Manual mode is simple: the marketer picks the products.
Automatic mode picks a source (recommendations, top sellers, new arrivals, trending, price drop) and the widget fills itself on the storefront using what the platform already offered. If a source comes back empty, it falls back to the next one in an order the marketer can see in the builder.
Decision 5: touch shared code as little as possible
The new version lives on its own. Outside it I only changed what I had to, and kept each change as small as possible, because those parts are shared with the other widgets. The first version stayed untouched.
What I'd do differently
Putting everything a widget needs inside each saved widget has a cost I underestimated. When I fix a bug in the widget, existing widgets keep the old behaviour until someone saves them again. A later tracking fix needed exactly that: every existing widget had to be saved once more.
Next time I'd keep the settings per widget, but load the shared widget code from one versioned place.
I'd also decide early what should happen when the preview runs the widget again and again, instead of finding out one bug at a time.
Where it ended up
Marketers build the widget, see the real thing while they edit, and save it through the same flow every other widget uses. The database never noticed.
The rest of the on-site widget work is on the production work page. Try the interactive demo.



Notes on this post
Join in
Leave a comment.
Sign in to add your note to this post.
Only your name and avatar are used.