AI-Native Open-Source Next.js commerce. Powered by Stripe. Ultra fast with typesafe Commerce SDK. Built for AI development (Claude, Codex, Cursor).
翻译准备中
正在加载完整 README。
查看完整 README ↗| AI-Friendly Codebase | Ships with AGENTS.md — idiomatic patterns, Commerce Kit SDK with typed methods. Claude Code, Cursor, and Codex work out of the box |
| Stripe-Native | Direct Stripe API integration — checkout, billing, subscriptions |
| Next.js 16 | App Router, React Server Components, React Compiler |
| Open Source | Self-host anywhere, deploy to Vercel in one click |
git clone https://github.com/yournextstore/yournextstore.git
cd yournextstore && bun install
cp .env.example .env.local # Add your YNS_API_KEY from https://yns.store/manage/settings/api
bun dev
Open localhost:3000 — your store is running.
| Familiar patterns | Idiomatic Next.js App Router (Server Components, Server Actions, "use cache") — matches what LLMs have seen thousands of times |
| Commerce Kit SDK | Methods like productBrowse() and cartUpsert() have defined input/output shapes. LLMs write correct code when they know the contracts |
| Well-defined domain | Products, variants, carts, checkout — the data models already exist with clear types. No need for the LLM to invent them |
| AGENTS.md | Full project context, SDK examples, Biome rules, and validation checklist — AI agents understand the codebase before writing a single line |
Performance and accessibility defaults — prerendered chrome on every route, optimizer-served icons,
WCAG-AA colour tokens, tappable controls — are spelled out in AGENTS.md
and checked by bun run build and bun test.
Copy .env.example to .env.local and set:
YNS_API_KEY — Your API token from the admin panelTwo small scripts in scripts/ talk to the YNS platform using only the store's YNS_API_KEY (read from .env.local / .env):
bun run publish:store # Trigger a production publish (same as the admin "Publish" button) and wait for the build
bun run publish:store --no-wait # Fire and forget
bun run api GET /products?limit=5 # Call any Store API endpoint
bun run api POST /products '{"name":"Tee","price":29.99}'
scripts/publish.sh deploys the tenant repo's remote main — push your commits first. scripts/api.sh is a thin wrapper around curl that handles auth, base-URL resolution, and pretty JSON output for every /api/v1/* endpoint (see the API documentation).
A YNS store is a copy of this repo with no shared history, so it never picks up template changes on
its own. Stores update through the Upgrade button in Design: Elliot's upgrade-storefront skill
(in the YNS platform repo, agent/skills/upgrade-storefront) brings in each template change file by
file, keeps the store's look, and records the template commit it reached in .yns/template.json.
The same script runs on a store checkout:
UPGRADE=<platform>/agent/skills/upgrade-storefront/scripts/upgrade.ts
bun $UPGRADE --store <store dir> # plan: what would change
bun $UPGRADE --store <store dir> --apply # apply everything safe; conflicts are left for you
bun $UPGRADE --store <store dir> --record # after a full refresh: write .yns/template.json
Don't merge or rebase a store onto the template. Its main is published, and Design's version
history restores published versions by their commit.
The three platform-managed files (proxy.ts, lib/track.tsx, instrumentation-client.ts) are the
exception: every publish restores them from the store's own main, so a change to them goes out to
every store with the store-propagate skill.
See CONTRIBUTING.md for coding conventions and PR checklist.
Refer to the API documentation for details on fetching products, managing carts, and building on top of YNS.
Your Next Store ships with 149 ready-made themes across different store categories. Each theme includes a fully redesigned homepage, hero, color palette, and section layout — all built on the same core codebase.
Themes live on branches named theme-001 … theme-149. Switch themes with a single command:
git checkout theme-016
Each theme branch is a single commit on top of main whose message describes the theme's vibe. List them all (id + description) with:
git for-each-ref --sort=refname --format='%(refname:short) %(subject)' 'refs/remotes/origin/theme-*'
All theme branches use a zero-padded three-digit id (
theme-001…theme-149). Themes modify only visual components and static assets — your products, cart, and checkout remain unchanged.