$ cat /work/embeddable-assessment-widget.md
industry
Beauty / specialty retail
region
Türkiye
year
2024
status
●Live
# at a glance
Eight-axis recommendation engine packaged as one widget that ships in three deployment modes — standalone, embed, modal — from a single codebase.
# problem
A retailer needed a guided product-discovery flow that could ship as a standalone campaign page, embed inside an existing site, or pop as a modal — without maintaining three separate codebases.
The recommendation logic itself wasn't trivial: an eight-axis questionnaire mapped to weighted product cohorts, with the result needing to feel curated, not algorithmic.
# approach
One Next.js codebase, three render modes selected by a single flag. State machine for the questionnaire so navigation, validation, and result resolution are all explicit transitions.
Recommendation engine kept in plain TypeScript: each axis has a weighting matrix; the result is the highest-scoring cohort, with tiebreakers based on context.
Locked the type ramp and the questionnaire pacing so the widget reads as editorial copy, not a form.
# outcome
Live across multiple deployment surfaces. Same widget runs as the campaign landing, embedded inside the main site, and as a modal launched from product pages.
# stack