Overview of Swell.js
masterSwell.js is a universal JavaScript SDK designed for interacting with Swell's Frontend API. It provides client-safe access to store and customer data, making it suitable for use in JAMstack or SSR (Server-Side Rendering) applications.
Key capabilities include:
- Product & Content Management: Fetch products, categories, store settings, navigation menus, and custom content.
- Cart Management: Create, recover, and update shopping carts.
- Checkout & Subscriptions: Build custom checkout and subscription flows.
- Customer Management: Authenticate customers and manage account details, orders, and subscriptions.
- Dynamic Content: Resolve linked content to generate page URLs and format prices according to the store's currency.
Security Note: This SDK is authorized using a public key and a session token, making it safe for client-side use. For operations requiring secret keys, you must use Swell's Backend API in a server-side environment only.