This project is a full storefront built with Next.js, with:
- Working navigation/search/filter interactions
- Game/category filtering
- Cart drawer with quantity controls
- Checkout API integration via SellAuth
- Fallback demo mode when SellAuth env vars are not set
Create .env.local from .env.example:
cp .env.example .env.localSet:
SELLAUTH_SHOP_IDSELLAUTH_API_KEY- Optional:
SELLAUTH_API_BASE_URL(default:https://api.sellauth.com) - Optional kill switch: set
CHECKOUT_FORCE_DISABLE=trueto pause checkout instantly - Optional:
NEXT_PUBLIC_DISCORD_URL - Optional:
NEXT_PUBLIC_SUPPORT_URL - Optional:
NEXT_IMAGE_REMOTE_HOSTS(comma-separated HTTPS hostnames for external images)
Security note:
- Never commit real API keys to the repository.
- If a key was ever committed, rotate it immediately in SellAuth.
- This repo now includes a CI secret scan (
.github/workflows/security.yml) using Gitleaks. - If a leak happened in old commits, rewrite git history and force-push after rotating keys.
If you have Node installed:
npm installIf you do not have Node globally in this workspace, a portable Node binary is included in .node/.
npm run devOpen:
http://localhost:3000
-
GET /api/storefront- Pulls products/groups/categories/payment methods from SellAuth
- Falls back to demo data if config/API fails
-
POST /api/checkout- Expects:
paymentMethoditems[](productId,quantity, optionalvariantId)- optional
email,couponCode
- Creates SellAuth checkout and returns
redirectUrlwhen available
- Expects:
-
GET /api/sellauth-health- Validates current SellAuth env credentials against your shop
- Use this first when checkout/storefront calls return
401 Unauthenticated
- Without SellAuth env vars, UI remains fully interactive in demo mode.
- With env vars configured, catalog and checkout are driven from your SellAuth dashboard.
- Ensure at least one enabled payment method exists in SellAuth, or checkout cannot proceed.
- SellAuth Checkout API access may require an upgraded SellAuth plan.