HitPay’s storefront starter gives Grok Bot a template to customize per merchant
Overview
HitPay merchants or providers want a branded shop starter that Store Builder Grok Bot can copy and tailor per merchant. It combines a Next.js 16 storefront, HitPay catalog and checkout APIs, and Vercel deployment.
Workflow
- What it is: An open-source Next.js 16 storefront for HitPay merchants. It uses App Router, TypeScript and Tailwind 4 and deploys to Vercel without configuration. Preview mode needs no credentials, uses sample products and disables checkout. The README opens by saying HitPay’s Store Builder Grok Bot clones and customizes it per merchant and claims the result is as good as a hand-edited template. It is MIT licensed.
- Grok Bot parts used: A few lines in the README and PR #1. The name and README describe a starter for Store Builder Grok Bot to clone and customize. The repo has no x.ai/bot template link, skills, prompts or other Grok Bot files. The listed
AGENTS.mdwas not read and may contain customization instructions. Not part of Grok Bot: The storefront app, HitPay OAuth and product and checkout APIs, and Vercel deployment. They work independently. - You need: No credentials for a local preview and several HitPay credentials to go live. Node.js ≥ 20.9 and npm suffice for a preview. Real data needs a HitPay account, defaulting to sandbox, a custom OAuth app with Client ID/Secret and
SESSION_SECRET. The server also needsHITPAY_ACCESS_TOKEN, obtained after/adminlogin and valid for a year, orHITPAY_API_KEY. Push to GitHub and deploy on Vercel for production. The README states no paid plan requirement. - Install: Start a local preview in three steps and connect via /admin for launch.
- Step 1: Run
npm install,cp .env.example .env.local(optional for preview) andnpm run dev, then open localhost:3000. - Step 2: Under HitPay Developers → App Builder, create an OAuth app and add
/api/auth/hitpay/callbackunder Redirect URI. Request only the four scopescommerce:read/create/updateandcustomer:read, without delete, refund or cancel. - Step 3: Put Client ID/Secret and SESSION_SECRET in environment variables. Open
/admin, click Connect to sign in, then Reveal access token and save asHITPAY_ACCESS_TOKEN. Restart or redeploy. - Step 4: Push to GitHub, import into Vercel, set variables and deploy. Change branding in
store.config.tsandpublic/brand/, and put content pages incontent/. Follow the go-live checklist to replace policy placeholders, test checkout end to end and removepublic/demo/. - Known pitfall: Checkout also needs
payments:create, outside the four default scopes. Add it to the OAuth app or useHITPAY_API_KEY.
- After install: A full store with HitPay products and hosted checkout.
- Fetch products and categories from HitPay to generate catalog, product and collection pages. Pre-render them and refresh in the background about every minute after visits.
- The cart is in browser localStorage. At checkout the server ignores browser prices, re-fetches products to check stock and currency, creates hosted HitPay checkout and redirects.
- Content and blog pages use MDX and JSON. It includes 301 redirects, sitemap and robots, and structured product data. Branding lives in
store.config.ts. - Anyone can edit the return status after paying, so treat it as informational. Verify payment in HitPay or by webhook before shipping. The repo has no webhook receiver.
- The README envisions Grok Bot cloning the starter and customizing branding and content for each merchant.
- Did the author run it: The repository has no Grok Bot run records. It shows no history, logs, result table or screenshots. The customization quality claim is from the README (author's claim, not reproduced). It names no merchant who built a shop this way. Vitest and CI test the storefront application, without recording any Grok Bot runs.
Key points and results
- Maturity: At fetch time on 2026-11-23 it was two days old, created on 2026-11-21 and last pushed on Nov 22, with two commits, zero stars, forks and issues, and MIT licensing. The README calls it an open-source starter. The code arrived all at once in PR #1.
- Permissions and boundaries: OAuth requests only product read, create and update and customer read, explicitly excluding deletion, refunds and cancellations. The HitPay client has no DELETE method. Secrets are read only on the server.
/adminrequires a click and uncached POST to reveal a token. Checkout verifies prices on the server and rejects cross-origin requests. - Known limits: The author inferred checkout behavior from docs. HitPay has no storefront checkout endpoint, so it is wrapped in
src/lib/hitpay/checkout-adapter.ts, the only file that needs changing when an official API appears. There is no webhook receiver. The cart does not compute shipping, tax or discounts. The store token lives in environment variables and needs manual annual replacement. Renaming a product changes its URL because the API has no slug field. There is no Grok Bot template link or detail about cloning and tailoring. - Worth borrowing: Put color, fonts, navigation and SEO in
store.config.tsso a bot or person can rebrand a clone in one place. Isolate checkout insrc/lib/hitpay/checkout-adapter.tsand document API assumptions in comments./api/checkoutignores client prices and checks stock and currency on the server throughsrc/lib/checkout/price-cart.tsto prevent price tampering.
Contributions from others
Added by others (not the author) PR #1 (ah2484, 2026-11-22) is the storefront’s initial submission. It adds details on OAuth state and PKCE, paginated catalog endpoints and background cache refresh, localStorage for carts, and server-side price checks at checkout. It also includes Cursor Agent markup, suggesting possible agent help.
Source
- Platform
- GitHub
- Author
- hit-pay
- Published
- Categories
- Code and repos, Getting started
What this evidence label means
Source read in full
We read the source (post, article or transcript). That only means the original was read. It does not mean this site reproduced the author's results.