Skip to main content

HitPay’s storefront starter gives Grok Bot a template to customize per merchant

GitHubGitHubhit-pay2026-11-21

Code and reposGetting startedSource read in fullRead first
GitHubGitHubhit-pay2026-11-21

Open original

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

  1. 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.
  2. 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.md was 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.
  3. 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 needs HITPAY_ACCESS_TOKEN, obtained after /admin login and valid for a year, or HITPAY_API_KEY. Push to GitHub and deploy on Vercel for production. The README states no paid plan requirement.
  4. 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) and npm run dev, then open localhost:3000.
    • Step 2: Under HitPay Developers → App Builder, create an OAuth app and add /api/auth/hitpay/callback under Redirect URI. Request only the four scopes commerce:read/create/update and customer: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 as HITPAY_ACCESS_TOKEN. Restart or redeploy.
    • Step 4: Push to GitHub, import into Vercel, set variables and deploy. Change branding in store.config.ts and public/brand/, and put content pages in content/. Follow the go-live checklist to replace policy placeholders, test checkout end to end and remove public/demo/.
    • Known pitfall: Checkout also needs payments:create, outside the four default scopes. Add it to the OAuth app or use HITPAY_API_KEY.
  5. 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.
  6. 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. /admin requires 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.ts so a bot or person can rebrand a clone in one place. Isolate checkout in src/lib/hitpay/checkout-adapter.ts and document API assumptions in comments. /api/checkout ignores client prices and checks stock and currency on the server through src/lib/checkout/price-cart.ts to 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.

Read the editorial and evidence policy

Other cases in this scenario

This unofficial community project is independent of xAI. xAI has neither approved nor endorsed it. No sign-up. The methods and figures come from the original authors.