Hanzo.js v1.0 shipped to npm in the spring of 2014. React had just been open-sourced by Facebook. Webpack was new. ES6 was a draft specification. The JavaScript ecosystem was on the edge of a transformation that would take three more years to fully arrive.
We were ready for it.
What v1.0 Included
Commerce primitives. Products, variants, orders, cart state, promotions, user accounts — all the entities in the Hanzo Commerce API, with a JavaScript interface designed for the way frontend developers actually think about these things.
Event-based state. Cart state changes emitted events. Components subscribed to the events they cared about. No polling, no callback hell, no manual DOM manipulation. The pattern that React would later make mainstream, implemented with EventEmitter in 2014.
Promise-based async. Every API call returned a promise. This was before the native Promise implementation was universal — we shipped a polyfill. The decision to use promises over callbacks proved right when the JavaScript ecosystem moved in that direction.
Minimal surface area. Core SDK: 8.2KB minified, 3.1KB gzipped. You loaded what you used. Every component was independently importable.
The npm Ecosystem Bet
Shipping to npm was a statement about the direction of frontend development. In 2014, npm was still primarily a Node.js tool — many frontend developers installed jQuery by downloading a file. The module ecosystem for browsers was nascent.
We bet that npm would become the distribution channel for all JavaScript — server and browser — and designed Hanzo.js accordingly. By 2016, that bet had clearly paid off.
Open Source Economics
Hanzo.js was MIT licensed from day one. We received the first external contribution within three weeks of release — a bug fix from a developer who had integrated the SDK into a crowdfunding campaign. Over the following year, the community found and fixed issues faster than we could have internally.
The open-source SDK made Hanzo Commerce adoption frictionless: developers could read the code, understand the API, and trust that the SDK was behaving as documented. Trust matters when you're handling payment flows.
Hanzo.js is at github.com/hanzo-js/hanzo.js. The v1.0 API is still largely intact in the current release.
Read more
hanzo ships to npm: 2015-08-14
The hanzo npm package ships on August 14, 2015: a JavaScript SDK for the Hanzo Commerce API, betting on JS-everything at a time when that bet was not yet obvious.
Coin.js: Crypto Commerce Before It Was Cool
We built Coin.js in 2016 — a JavaScript library for accepting Bitcoin and Ethereum in checkout flows. The moment crypto hit mainstream attention two years later, the infrastructure was already deployed.
shop.js on npm: the storefront layer
shop.js ships December 7, 2015: the storefront rendering layer, separate from the core hanzo API client. Why we split them, what shop.js does, and the API design that made headless commerce composable.