This document discusses building a headless e-commerce website. It evaluates different architectures including using a content management system (CMS) and e-commerce platform separately and connecting them via APIs. It recommends using Next.js for the frontend framework, Cockpit for the CMS due to its REST API, and building a custom e-commerce solution connected via GraphQL schema stitching. The document then discusses implementing the user interface with React and Apollo Client and providing a unified GraphQL API to the client.
2. Mission Briefing
„Hey can you please
build our new website?
It must have Shopping,
CMS and all that stuff,
please send us a quote“
3. Mission Briefing
• We want an apple.com-style
Online Shopping Experience
(SPA)
• We are a startup and don’t have
a lot of money to spend
• We want to automate delivery
but don’t have an ERP system in
place yet
5. Approach: CMS-Bound
• Use Wordpress/Drupal or any other
CMS together with some extensions
like WooCommerce
Shop as Plugin
Frontend as Theme
inside the Monolithic
Framework
More Weird Plugins
Customization
6. Approach: Shop-Bound
• Shop-Defined: Use Magento or any
other Shop together with some
extensions like „Magento Landing
Pages“
CMS as Plugin
Frontend as Theme
inside the Monolithic
Framework
More Weird Plugins
Customization
7. Approach: Headless
• Use CMS and Shop as services and
build the website the way you want
CMS API (Drupal Headless, Cockpit +
101 SaaS solutions and proprietary
systems)
Website
Project
Shop API (Magento Headless + 101
SaaS solutions and proprietary
systems)
8. Bucket List
• Find the right Web Framework that
meets your technical requirements (and
taste, obviously)
• Find the right CMS solution that meets
the requirements and exposes an API
• Find the right Shop solution that
meets the requirements and exposes an
API
• Build the thing
19. GraphQL Schema Stitching
2. Connect the resolvers to the
Cockpit API
// locations.js (resolver function for query locations)
module.exports = async (root, params, { api }) =>
api.find('Locations', params);
3. Actually stitch it
22. 😎
• One round trip from Client to
Server to rule them all
• Consolidated always-up-to-date
documentation of your API
through the GraphQL schema
language
26. 😎
• Please stop waste your time
with JS build tools (!)
• You might not need Redux
• Apollo Client handles caching,
store rehydration and
reactivity for you
27. Build your next shop with
our headless technology
Thank you..
hello@unchained.shop
Unchained
℅ Fliptation GmbH
Mühlebachstrasse 6
8006 Zürich
unchained commerce