项目 / yournextstore/yournextstore

yournextstore/yournextstore

行业推荐
语言 TypeScript标签 nextjsstripecommercetypescriptreactjsai-friendlybuntailwindcssai-native数据更新 2026-11-24 06:50:13 · 仓库 2026-11-23

一段话介绍

Your Next Store 是一套开源的、面向 AI 编程工具的 Next.js 电商模板,支付走 Stripe,并提供类型化的 Commerce Kit SDK。在线演示为 [https://demo.yournextstore.com](https://demo.yournextstore.com)。快速开始可克隆仓库,执行 `bun install`,把 `.env.example` 复制为 `.env.local`,填入在 [yns.store](https://yns.store/manage/settings/api) 申请的 `YNS_API_KEY`,再运行 `bun dev`,于 `http://localhost:3000` 打开店铺。运行需要 Node.js 24 及以上和 Bun 1.0 及以上。仓库附有 [AGENTS.md](https://github.com/yournextstore/yournextstore/blob/main/AGENTS.md),说明惯用模式、SDK 示例和校验清单,供 Claude Code、Cursor、Codex 等工具直接使用。许可为 MIT。说明见[演示站](https://demo.yournextstore.com)和[仓库 README](https://github.com/yournextstore/yournextstore)。

本站整理,非 GitHub 官方 description。

官方 description(GitHub API 原样)
AI-Native Open-Source Next.js commerce. Powered by Stripe. Ultra fast with typesafe Commerce SDK. Built for AI development (Claude, Codex, Cursor).
5,548累计星
674Fork
—峰值日增
0上榜次数
总榜
暂未入榜
日榜
暂未入榜
周榜
暂未入榜
月榜
暂未入榜

官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。

行业与场景

按行业选型 →

电商交易与订单履约

适配系统:电商交易平台、订单履约系统 · 得分 3.0

AI 原生开源电商(Next.js+Stripe)。

更多信息

以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。

我的用法
用法为:复制 .env.example 为 .env.local 并填入从 yns.store 获取的 YNS_API_KEY,运行 bun dev 后访问 localhost:3000 即可看到商店运行。
特点或设计要点
技术栈包括 Next.js 16(App Router、React Server Components、React Compiler)、Bun、Commerce Kit SDK、Tailwind CSS v4、基于 Radix UI 的 Shadcn UI、TypeScript 和 Biome。仓库提供 149 套现成主题,分支名为 `theme-001` 至 `theme-149`,切换主题可用 `git checkout theme-016` 这类命令;主题只改视觉组件和静态资源,不改动商品、购物车和结账逻辑。也可用 `bun run publish:store` 触发发布,或用 `bun run api` 调用 Store API。店铺若要从模板升级,应通过平台的 Upgrade 流程,而不是把店铺 `main` 直接合并回模板。
局限和适用边界
运行该项目需要 Node.js 24+ 或 Bun 1.0+ 环境,并且需要从 yns.store 管理后台获取 API 密钥。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
首次发现 — · 最近在榜 2026-11-23 · 语言 TypeScript · 贡献者 —
llmsdk

GitHub 项目主页介绍

来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 8,231 字节。

<p align="center">
  <a href="https://yournextstore.com">
    <img src="public/logo.svg" height="128">
  </a>
</p>

<h1 align="center">Your Next Store</h1>

<p align="center">
  <strong>Open-source AI-native Next.js e-commerce template.</strong>
</p>
<p align="center">
Powered by Stripe. Built for AI coding tools.
</p>

<div align="center">
  <a href="https://demo.yournextstore.com">
    <img src="public/screenshot.png" alt="Your Next Store Demo" width="800" />
  </a>
  <p><strong>Live Demo:</strong> <a href="https://demo.yournextstore.com">demo.yournextstore.com</a></p>
</div>

<div align="center">
  <a href="https://github.com/yournextstore/yournextstore/stargazers"><img src="https://img.shields.io/github/stars/yournextstore/yournextstore?style=for-the-badge&logo=github&labelColor=181717&color=181717" alt="GitHub Stars" /></a>
  <a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fyournextstore%2Fyournextstore&env=ENABLE_EXPERIMENTAL_COREPACK,YNS_API_KEY&envDescription=Read%20more%20about%20required%20env%20variables%20in%20YNS&envLink=https%3A%2F%2Fgithub.com%2Fyournextstore%2Fyournextstore%2Ftree%2Fupcoming%3Ftab%3Dreadme-ov-file%23add-environmental-variables&project-name=yournextstore&repository-name=yournextstore&demo-title=Your%20Next%20Store&demo-description=A%20Next.js%20boilerplate%20for%20building%20your%20online%20store%20instantly%3A%20simple%2C%20quick%2C%20powerful.&demo-url=https%3A%2F%2Fdemo.yournextstore.com%2F&demo-image=https%3A%2F%2Fyournextstore.com%2Fdemo.png"><img src="https://img.shields.io/badge/Deploy-Vercel-000?style=for-the-badge&logo=vercel&labelColor=000" alt="Deploy with Vercel" /></a>
  <a href="https://yournextstore.com/discord"><img src="https://img.shields.io/discord/1206629600483082341?style=for-the-badge&logo=discord&logoColor=white&labelColor=5865F2&color=5865F2" alt="Discord" /></a>
  <a href="https://www.producthunt.com/posts/your-next-store"><img src="https://img.shields.io/badge/Product%20Hunt-720-DA552F?style=for-the-badge&logo=producthunt&logoColor=white&labelColor=DA552F" alt="Product Hunt" /></a>
</div>

<br/>

| | |
|:---|:---|
| **AI-Friendly Codebase** | Ships with [AGENTS.md](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 |

## Quick Start

```bash
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](http://localhost:3000) — your store is running.

## Why AI Tools Work Better Here

| | |
|---|---|
| **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 |

## Tech Stack

- **Next.js 16** — App Router, React Server Components, React Compiler
- **Bun** — Fast JavaScript runtime and package manager
- **Commerce Kit SDK** — Headless commerce API integration
- **Tailwind CSS v4** — Utility-first styling
- **Shadcn UI** — 50+ accessible components built on Radix UI
- **TypeScript** — Strict type-safe development
- **Biome** — Lightning-fast linter and formatter

Performance and accessibility defaults — prerendered chrome on every route, optimizer-served icons,
WCAG-AA colour tokens, tappable controls — are spelled out in [AGENTS.md](AGENTS.md#performance--accessibility-baseline)
and checked by `bun run build` and `bun test`.

## Prerequisites

- [Node.js 24+](https://nodejs.org/)
- [Bun 1.0+](https://bun.sh/)
- YNS API key from [https://yns.store/manage/settings/api](https://yns.store/manage/settings/api)

### Environment Variables

Copy `.env.example` to `.env.local` and set:

- `YNS_API_KEY` — Your API token from the admin panel

## Publishing & Store API from the CLI

Two small scripts in `scripts/` talk to the YNS platform using only the store's `YNS_API_KEY` (read from `.env.local` / `.env`):

```bash
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](https://yns.store/manage/settings/api)).

## Updating a store to the template

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:

```bash
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 two platform-managed files (`proxy.ts`, `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`](.agents/skills/store-propagate/SKILL.md) skill.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for coding conventions and PR checklist.

## Next Steps

Refer to the [API documentation](https://yns.store/manage/settings/api) for details on fetching products, managing carts, and building on top of YNS.

## Themes

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:

```bash
git checkout theme-016
```

### Browsing themes

Each theme branch is a single commit on top of `main` whose message describes the theme's vibe. List them all (id + description) with:

```bash
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.

## Star History

<a href="https://star-history.com/#yournextstore/yournextstore&Date">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=yournextstore/yournextstore&type=Date&theme=dark" />
    <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=yournextstore/yournextstore&type=Date" />
    <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=yournextstore/yournextstore&type=Date" width="600" />
  </picture>
</a>
↑