GitHub Repository
Source code, issues, and releases.
Next.js Starter
Full example storefront built with Next.js and the SDK.
Features
- HMAC-SHA256 authentication with automatic signature generation for server-to-server requests
- Firebase/Supabase-style query builder with intuitive method chaining
- Universal compatibility — works in browsers, Node.js, Web Workers, and React Native
- TypeScript first with full type safety and IntelliSense
- Automatic retry, caching, and request deduplication
- Singleton pattern for efficient resource usage
- ~15 KB gzipped, zero external runtime dependencies, tree-shakeable
Installation
rmz-storefront-sdk on npm.
Quick Start
Client-side (browser)
On the client side, only apublicKey is needed. The default API URL points to https://front.rmz.gg/api.
Server-side (Node.js / SSR)
On the server, provide bothpublicKey and secretKey to enable HMAC-SHA256 authentication for every request.
SDK Modules
The SDK exposes the following namespaces on the instance returned bycreateStorefrontSDK():
| Namespace | Description | Auth Required |
|---|---|---|
sdk.store | Store info, currencies, settings, features, banners | No |
sdk.products | Product listing, search, query builder, related products | No |
sdk.categories | Category listing and category products | No |
sdk.cart | Cart management, coupons, validation, summary | No (uses cart token) |
sdk.checkout | Create checkout sessions, get payment results | No |
sdk.auth | OTP login, registration, profile management | Partial |
sdk.orders | Order history, subscriptions, courses | Yes |
sdk.wishlist | Wishlist add/remove/check | Yes |
sdk.reviews | Store reviews, submit product reviews | Partial |
sdk.courses | Course access, progress tracking, module completion | Yes |
sdk.pages | Static pages | No |
sdk.components | Homepage components | No |
sdk.management | Analytics, inventory, exports (server-side only) | Secret key |
sdk.customTokens | Generate, list, revoke, and validate API tokens | Yes |
Environment Detection
The SDK automatically detects its runtime environment and adjusts behavior:- Browser: Uses
X-Client-Authheader, warns ifsecretKeyis present. - Node.js: Generates HMAC-SHA256 signatures on every request when
secretKeyis provided. - React Native: Treated as a browser environment.
Health Check
Verify API connectivity at any time:Next Steps
Authentication
Understand the HMAC security model and key management.
Configuration
All configuration options, environment variables, and defaults.
Products
Query builder, search, and product retrieval.
Framework Guides
React, Vue, Angular, and vanilla JS examples.

