
Announcing the Jhoose Commerce API for Optimizely Commerce Connect
The Jhoose Commerce Framework is something I’ve been working on for a while, and I’m keen to share it with the wider community.
I originally started this as a learning exercise, but after working across several eCommerce implementations, it became clear that there was an opportunity to simplify how solutions are delivered using Optimizely Commerce Connect.
Why the Jhoose Commerce Framework?
Time to market
Optimizely Commerce Connect is a flexible and scalable platform, but delivering a production-ready solution still requires a significant amount of effort.
The primary goal of the Jhoose Commerce Framework is to shorten time to market by providing a structured, extendable approach to common commerce requirements.
At its core:
The Customer REST API provides access to carts, customer data, and checkout flows
A JavaScript/TypeScript Customer API simplifies the consumption of the REST API when building front-end applications
A micro frontend layer offers reusable React components that can be embedded into any modern web application
Supporting modern architectures
More organisations are moving towards headless eCommerce architectures. The Jhoose Commerce Framework supports this shift by offering:
A dedicated API layer
A JavaScript/TypeScript SDK for frontend development
A Micro UI layer delivering a core set of components that can be used within a headless commerce engine.
This allows Optimizely Commerce Connect to be used as a headless commerce engine without requiring extensive custom development.
Multi-channel support
The REST API can be consumed by multiple channels, including:
Websites
POS systems
Mobile applications
All channels share the same underlying cart, customer, and checkout flows, ensuring consistency across touchpoints.
What does the framework deliver?
The framework is designed to simplify delivery while also providing clear extension points for custom functionality.
It is made up of three layers, each offering a different way of interacting with the commerce platform depending on the use case.
1. REST API Layer
The Jhoose Commerce Framework extends Optimizely Commerce Connect (also known as B2C Commerce).
The REST API layer supports common eCommerce journeys, including:
Cart management
Checkout
Customer profiles
Pricing
Markets
dotnet add package Jhoose.CommerceApi
Read More:
https://github.com/andrewmarkham/CommerceApi/tree/main?tab=readme-ov-file#jhoose-commerce-framework
https://github.com/andrewmarkham/CommerceApi/blob/main/docs/customerRestapi.md
2. JavaScript API Layer
This library provides a clean abstraction over the REST API, making it easier to build both:
Lightweight client-side components using Vanilla JavaScript
More complex applications using frameworks such as Next.js, React, or Angular
Key features include:
Feature parity with the Customer REST API
Built-in caching to improve performance and reduce unnecessary API calls
npm install @jhoose-commerce/core
Read More:
3. Micro UI Layer
The Micro UI layer is an opinionated React-based framework that provides a core set of reusable components to accelerate front-end development.
Available components include:
Add to Basket
Product Price
Mini Cart
Market Selector
Checkout
npm install @jhoose-commerce/components
Read More:
Demo Sites
These demo sites are great examples of how to add the framework to your Optimizely project and deliver a Next.js frontend using the JavaScript API and React components.
Jhoose.Demo
A demonstration Optimizely CMS and Commerce site showcasing the Jhoose Commerce API with Stripe payment integration. This backend powers the Ozone Clothing Next.js headless storefront.
Overview
This demo site demonstrates a complete headless commerce architecture using:
Jhoose.CommerceApi
- RESTful API for cart, checkout, products, and customer management
Jhoose.CommerceApi.Stripe
- Stripe payment processing integration
Optimizely Commerce
- Product catalog and order management
Optimizely Content Graph
- Product indexing and delivery
Auth0
- JWT-based authentication for registered users
Read More:
https://github.com/andrewmarkham/CommerceApi/tree/main/src/Jhoose.Demo
Ozone Clothing
This site, built with Next.js is used to demonstrate the Micro UI layer.
Read More:
https://github.com/andrewmarkham/OzoneClothing/tree/main/ozone-clothing
Closing thoughts
I am really excited to make this framework available and am keen to get feedback from the wider community. I am also happy for people to contribute and extend the functionality.