Storefront applications use API key authentication to access the Crave API. This is a simple, secure way to authenticate your requests without complex session management.
Add these environment variables to your .env.local:
Copy
# Required - Your API key from the merchantCRAVE_API_KEY=your_api_key_here# Required - API base URLCRAVE_API_BASE_URL=https://api.cravejs.com# Required - Location ID for this storefrontNEXT_PUBLIC_LOCATION_ID=your_location_id_here# Required for payments - Stripe publishable keyNEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...