Search Documentation
Search for a documentation page...
Configuration
Configure your YNS storefront — environment variables, constants, and store settings.
Environment Variables
The storefront requires a single environment variable:
| Variable | Required | Description |
|---|---|---|
YNS_API_KEY | Yes | Your YNS API key |
Store Constants
The storefront uses a constants file at lib/constants.ts for store-wide settings:
Modify these to match your store's locale and currency.
Commerce Client
The Commerce SDK is initialized in lib/commerce.ts:
The client reads YNS_API_KEY from the environment automatically. To customize:
Caching
Product pages use Next.js caching with "use cache" and cacheLife("minutes"):
This ensures product data is fresh while keeping pages fast.
Metadata
Each page generates its own metadata for SEO. The root layout sets default metadata, and individual pages override it: