Skip to content
项目

关于

开源的 Shopify 替代方案:可自行部署的电商平台,支持 Liquid 主题、管理后台和应用 SDK

商业与金融

这些数字如何统计

402 星标65 复刻 +10 24小时

实测星标增长

24小时
+10
7天
+23
15天
+30
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

ShopNex: a self-hosted Shopify alternative. Run npx create-shopnex, open the setup wizard, start selling. The admin dashboard with sales analytics and installed apps.

Live demo · Self-hosting guide · Roadmap

CI Release License: MIT npm downloads per month Node Join the ShopNex Discord

From zero to a first order in 28 seconds: create the owner account, name the shop and add sample products, check out as a customer on the storefront, then see the order in the admin.
Zero to first order in 28 seconds. Watch it in full quality.

Quick start

Try it on your machine (no Docker, no clone)

Requires Node 22.22+.

npx create-shopnex@latest my-shop

Open http://localhost:3000, follow the setup wizard, and your storefront is on http://localhost:4321.

  • The bundled apps (Stripe, CJ, Shippo, Reviews) start by default. Pick some with --with stripe,cj, or start the shop alone with --no-apps.
  • Everything lives in the my-shop folder (.env, embedded database in .pglite/). Delete it to start over.
  • Production: the only thing to change is the database. Set DATABASE_URL in .env to PostgreSQL (postgres://user:password@host:5432/shopnex) and start again; migrations run on start. To keep your data, run npx shopnex migrate-db. The default embedded database (.pglite/) is for trying it out.
  • The folder also gets a ready docker-compose.yml (ShopNex, the apps and PostgreSQL). See below to run it in Docker.

Production (Docker)

Requires Docker. The my-shop folder from npx create-shopnex already has the compose file:

cd my-shop
docker compose up

Open http://localhost:3000 once the logs settle and follow the setup wizard. Add -d to keep it running in the background. Anyone who reaches a fresh install can claim it, so finish setup right after deploying.

No .env needed. For a public server, set DOMAIN for HTTPS and pin SHOPNEX_VERSION to a release tag; see the self-hosting guide.

ShopNex storefront home page with a hero banner and a Shop now button

What you get

  • Admin: products, collections, orders, discounts, shipping, taxes, staff and settings in the browser
  • Storefront: a bundled Astro storefront with 5 Liquid themes, or bring your own through the typed REST Storefront API
  • Hosted checkout: shipping rates, payment methods, discount codes, order confirmation
  • Extensible: scoped API tokens, signed webhooks, embedded apps and an app marketplace. No third-party code in the core
  • Multi-tenant: one shop by default, many with TENANCY_MODE
  • Yours: MIT licensed, no platform fees, all data in your own PostgreSQL

ShopNex is pre-1.0 and releases often. See the roadmap and releases.

Why I built this

I worked for two years at YUM Brands and learned how easy it is to build a system that's hard to manage, and how complex e-commerce can get. We integrated with systems like DoorDash, and without a clear contract it was hard to make changes without affecting the core.

In ShopNex I set a clear contract between the core and applications. Apps talk to it through an SDK and a bridge, with scoped API tokens and signed webhooks.

Development

Requires Node (see .node-version), pnpm and PostgreSQL.

pnpm install
cp .env.example .env        # set the database URL and app secret
pnpm db:migrate
pnpm dev                    # admin on :3000, storefront on :4321

Documentation

Guides live in apps/docs (pnpm dev:docs, http://localhost:3400). Developer reference is in docs/:

Doc Covers
Development Env setup, pnpm dev options, local ports, OAuth sign-in, end-to-end tests
Architecture Repository layout, API layout, admin routes, tenancy
Storefront API Building an external storefront with @shopnex/storefront-sdk
Apps and marketplace API tokens, building apps with @shopnex/app, embedded apps, marketplace
Webhooks Topics, signatures, delivery and retries
Roadmap What's done and what's next
Releasing How to cut a release

Community

Chat with the team and other users on Discord, or post questions and ideas in GitHub Discussions.

Contributing

Issues and pull requests are welcome: see CONTRIBUTING.md. Report security issues privately, as described in SECURITY.md.

See @shopnex/app for building apps with no database or OAuth code: authenticate, Admin API, per-shop data, signed requests (@shopnex/app/store), and admin-styled UI (@shopnex/app/ui).

License

MIT

探索相关项目

加载中…