All Lab Projects
Commerce Infrastructurev0.8.4MIT License Beta / Production-Ready

OpenStore

Composable storefront primitives for teams that want ownership of their stack.

01 THE PROBLEM & MOTIVATION

Why we had to
build this.

OpenStore is an un-opinionated, headless commerce foundation built for Next.js 16 and React 19. It strips away SaaS merchant lock-in, giving product teams complete control over cart state, checkout orchestration, inventory synchronization, and custom pricing models.

The Core Problem:

Traditional hosted platforms force teams into rigid template engines, restrictive checkout APIs, and steep transaction rev-shares. Building from scratch takes months. OpenStore provides the robust primitive layer — cart pipelines, payment adapters, and stock reconcilers — without dictating design or hosting.

Who it is built for:

  • High-growth DTC brands outgrowing Shopify checkout limitations
  • Digital product studios building bespoke client marketplaces
  • Engineering teams requiring multi-currency, localized, offline-first carts

02 SYSTEM ARCHITECTURE

How the pieces
fit together.

A layered edge-first architecture: client-side optimistic UI cart, edge middleware session hydration, and modular provider adapters for Stripe, Razorpay, and custom warehouses.

LAYER 01

Storefront UI

React 19 Server Components with Optimistic Cart Hooks

Next.js 16 / React 19
LAYER 02

Cart Pipeline

State synchronization with conflict resolution and offline queue

IndexedDB / Edge KV
LAYER 03

Adapter Engine

Unified connector interface for Stripe, Medusa, and Postgres

TypeScript
LAYER 04

Inventory Mesh

Idempotent stock allocation with webhooks

Serverless Functions

03 CORE CAPABILITIES

Designed for
real production.

01

Zero-Latency Optimistic Cart

Instant cart modifications that reconcile in the background without blocking layout shifts.

EXAMPLE USAGE
const { addItem, items, subtotal } = useCart()
await addItem({ id: 'sku_123', quantity: 1, optimistic: true })
02

Pluggable Payment Gateway Mesh

Switch from Stripe to Razorpay or local bank rails with a single environment config change.

EXAMPLE USAGE
export const checkout = createCheckoutSession({
  provider: 'stripe',
  mode: 'payment',
  lineItems: cart.items
})
03

Multi-Tenant Currency & Tax Engine

Real-time localized price conversions and VAT calculation at edge without cold start latency.

< 12msCart Hydration
8x faster than Shopify
4.8 kBBundle Size
Zero external runtime
98.4%Test Coverage
240 unit & e2e tests
14.2kWeekly Downloads
+28% this month

04 PUBLIC ROADMAP

What's shipped and
what is next.

Shipped Q3 2026

Multi-Warehouse Inventory Splitting

Route order line items to distinct fulfillment hubs dynamically.

In Progress Q4 2026

One-Click Subscriptions Engine

Recurring billing primitives without third-party vendor lock-in.

Planned Q1 2027

Agentic Checkout Assistant

Natural language shopping interface for mobile and terminal clients.

05 JOIN THE LAB

Contribute to
OpenStore.

Whether you want to file an issue, submit a design example, optimize an edge route, or write documentation, all contributions are welcomed and credited.