Skip to main content

What is OpenBridge?

A minimal, type-safe client for Shopify’s Storefront API. Built for modern JavaScript with a chainable query builder pattern.
const { items } = await openbridge.products
    .list()
    .collection('sale')
    .limit(12)
    .select(['title', 'priceRange', 'featuredImage'])

Features

TypeScript First

Full type inference and autocompletion

Chainable API

Intuitive query builder pattern

Zero Dependencies

Single file, no runtime deps

Field Selection

Request only what you need

Quick Look

// Initialize
openbridge.init({
    token: 'your-storefront-token',
    storeDomain: 'store.myshopify.com'
})

// Collections
const collections = await openbridge.collections.list()
const collection = await openbridge.collections.get('summer-sale')

// Products
const products = await openbridge.products.list()
const product = await openbridge.products.get('blue-shirt')

// Products by collection
const { items } = await openbridge.products.list().collection('sale')

// With options
const result = await openbridge.products
    .list()
    .collection('new')
    .limit(6)
    .select(['title', 'handle', 'priceRange'])

// Cart
await openbridge.cart.init()
await openbridge.cart.add('gid://shopify/ProductVariant/123', 2)
openbridge.cart.checkout()

// Customer Authentication
const customer = await openbridge.customer.login('email@example.com', 'password')
const { orders } = await openbridge.customer.orders()
await openbridge.customer.logout()

API Reference

Products

List, get, filter

Collections

List, get, search

Cart

Add, update, checkout

Customer

Auth, orders, addresses

Types

Interfaces