In developmentPRJ-03 · 2025

Commerce.js

An eCommerce toolkit that ships two ways — open-source SDK or hosted SaaS — sharing one unified data model and pluggable adapters.

Project spec · 8 fields+
StatusPre-alpha
Target2025
TypeOpen-source SDK · Hosted SaaS
SectoreCommerce
Packages18 npm packages
StackTypeScript · Turbo · pnpm
RuntimeNode · Edge · Browser
TeamXYZ

Overview

Commerce.js is an eCommerce toolkit that ships two ways: an open-source TypeScript SDK that developers can embed, and a hosted cloud platform at commercejs.cloud. Both share one unified data model — each platform underneath (currently Salla and Medusa V2) implements a `CommerceAdapter` interface, and payments, delivery, notifications, analytics, and storage follow the same pluggable provider pattern.

The audience splits accordingly: developers who want SDK-level control over the integration, and teams who want eCommerce-as-a-service without standing up infrastructure.

The brief

Every eCommerce platform speaks a different language. Salla, Shopify, WooCommerce, BigCommerce, Medusa — each has its own APIs, data shapes, payment flows, and webhook envelopes. Switching backends means rewriting the integration; supporting multiple at once means writing N integrations and reconciling them in your application logic.

The brief was a provider-agnostic toolkit: one set of types, one set of methods, one event bus, one webhook contract — with adapters that translate to whatever platform sits underneath. Adding a new platform becomes the work of writing one adapter, not rebuilding the application.

Build

The SDK ships as a Turbo monorepo of 18 published npm packages, written in TypeScript and bundled with tsdown. Releases run through Changesets; tests run on Vitest. The architecture is runtime-agnostic and works on Node.js, Edge runtimes, and browsers — same code, same types, anywhere JavaScript runs.

The foundation is `@commercejs/types` — 30+ unified domain types covering cart, order, product, customer, payment, promotion, return, gift-card, wishlist, rental, wholesale, auction, and more. Every other package depends on it, which is what gives the SDK its single shared vocabulary.

`@commercejs/core` is the orchestration engine: `createCommerce()` wires the adapter, payment provider, event bus, and webhook dispatcher into one entry point. `@commercejs/checkout` ships a framework-agnostic state machine for payment flows — at v2.0.0, having already been through one full rewrite. Webhooks are verified cryptographically through our own `@commercejs/webhook-verifier` package — a lightly customised, open-source release of the same `@xyz/webhook-verifier` code that powers Orderly and Employ Bahrain.

Adapters and providers are packaged independently, one per npm module, so teams install only what they need. Currently shipped: platform adapters for Salla and Medusa V2; payment via Tap (redirect-based, PCI-free); delivery via Armada (last-mile) and Parcel (OAuth2, multi-region); notifications via Resend and SMTP; analytics via Google Analytics 4; storage via S3-compatible providers (AWS, R2, Spaces, MinIO).

For teams that don't want to bring an external platform at all, `@commercejs/platform` ships a built-in commerce engine on Neon Postgres with its own Admin API and Profile system — Commerce.js can be the platform, not just the abstraction over one. The same engine powers the hosted SaaS at commercejs.cloud: a managed dashboard for teams who want eCommerce-as-a-service without running their own deployment. A Nuxt module (`@commercejs/nuxt`) ships composables and an auto-generated REST API. A hosted-checkout app packages embedded Tap card elements as a deployable. A CLI (`@commercejs/cli`) handles deploy, init, and environment management.

Status

The SDK is in pre-alpha overall, but maturity is per-package: `@commercejs/checkout` is at v2.0.0 (past one full rewrite), `@commercejs/types` is foundational and stable, `@commercejs/core` is at v0.3.0 and still hardening. Two platform adapters, one payment provider, two delivery providers, two notification providers, plus the platform engine — all live on npm today under the `@commercejs/` org.

The next milestone is core 1.0, which locks the orchestration API and event-bus contract. After that, additional platform adapters (Shopify, WooCommerce, BigCommerce) become incremental package additions rather than architectural work.

Everything is open-source and lives at commerce.js.org. We're prioritising feedback from teams already running on Salla or Medusa who are planning multi-platform expansion, plus teams evaluating `@commercejs/platform` as a Postgres-backed commerce engine of their own.

View project

Have a project
in mind?

Tell us what you're building. We respond within 24 hours.