2023-06-30 / DK,Europe
A leading European furniture retailer, JYSK...
JYSK owns and operates its own service-driven IT infrastructure, with in-house developed solutions to POS, Backoffice, Logistics, Inventory, Media management and Transactions, and are rolling out a "unified commerce" solution that connectes key services to provide a seamless shopping experience for both B2B and B2C customers accross physical and digital storefronts.
Our challenge was to design and deliver the foundation for a (new) digital storefront, that could handle the complex data-infrastructure without cluttering the frontend code, reduce response time and define a clear application structure that would be flexible enough to realize both the current visual design pluss an incoming visual and functional re-design.
We settled on a solution design where the webshop would be served by two applications: a lean NextJS + Tailwind fully typed frontend, and a 'back of the frontend' gateway application that would speak GraphQL to the frontend, REST (or any protocol instilled by the various data providers) to the backend services and thereby mediate between the two.
With this principle design established, the team could work quickly to paint the UI with "a broad brush" and defining page- or component-level data-requirements with one hand, while working with the data providers to unify APIs and query architecture with the other.
To ensure quick response times, the gateway application was setup to run inside the same kubernetes cluster as the data providers, so roundtrips on waterfall queries would be as fast as possible, and doing as few roundtrips over the long line to the client application as possible.
The two apps was setup to live next to each other in a Nx monorepo workspace.