@jaimin28/shopify-mobile-sdk
v1.5.2
Published
A production-ready Shopify SDK for React Native with a JSON-first API (/home, /product/:handle), offline-first local cart and wishlist (Zustand + MMKV), and built-in cart validation and auto-refresh powered by the Storefront API.
Downloads
686
Maintainers
Readme
@jaimin28/shopify-mobile-sdk
A production-ready, ultra-fast Shopify Storefront SDK for React Native. Build headless commerce apps with ease using managed state, local-first logic, and smart cart synchronization.
✨ Features
- 🏎️ JSON-First Data: No more GraphQL nesting. Returns UI-ready flat JSON objects.
- 🛒 Managed Cart: Local-first cart with quantity grouping, total calculation, and auto-sync.
- ❤️ Local Wishlist: Pre-built wishlist logic for instant user feedback.
- 🏠 CMS Layout: Dynamic homepage engine powered by Shopify Metafields.
- 🔄 Smart Sync: Automatically reconciles local cart items with live Shopify stock levels.
- 🛡️ Storage Agnostic: Inject your own storage engine (MMKV, AsyncStorage, etc.).
- 🔐 Admin Support: Optional Admin API bridge for inventory and backend data.
📖 Proper Documentation
- Quick Start & Integration Guide → (Read this first)
- Advanced Usage & Method API →
- Technical Architecture (File-by-File) →
🚀 Quick Example
import { createShopifySDK, useCart } from '@jaimin28/shopify-mobile-sdk';
// 1. Initialize
const sdk = createShopifySDK({
domain: 'your-store.myshopify.com',
token: 'st_token...',
storage: myMMKVBridge
});
// 2. Use in UI
const MyComponent = () => {
const { cart, total, addItem } = useCart();
return (
<Button
title={`Buy for $${total}`}
onPress={() => addItem(product, variantId, 1)}
/>
);
}🤝 Peer Dependencies
To ensure maximum compatibility and minimum bundle size, you should have these installed in your host project:
zustandgraphql-requestreact-native-mmkv(or equivalent storage)
📜 License
MIT © Jaimin Vaghasiya
