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():
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.

