{"id":15412968,"url":"https://github.com/ascorbic/next-commerce","last_synced_at":"2026-04-04T13:30:17.338Z","repository":{"id":61975850,"uuid":"556752437","full_name":"ascorbic/next-commerce","owner":"ascorbic","description":"commerce","archived":false,"fork":false,"pushed_at":"2022-10-24T13:01:17.000Z","size":9675,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-23T14:38:26.636Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ascorbic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-24T12:56:54.000Z","updated_at":"2022-10-24T12:58:29.000Z","dependencies_parsed_at":"2022-10-24T14:00:30.581Z","dependency_job_id":null,"html_url":"https://github.com/ascorbic/next-commerce","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascorbic%2Fnext-commerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascorbic%2Fnext-commerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascorbic%2Fnext-commerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascorbic%2Fnext-commerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ascorbic","download_url":"https://codeload.github.com/ascorbic/next-commerce/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239964549,"owners_count":19725952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T16:54:56.765Z","updated_at":"2025-02-21T06:11:31.219Z","avatar_url":"https://github.com/ascorbic.png","language":"TypeScript","readme":"[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fcommerce\u0026project-name=commerce\u0026repo-name=commerce\u0026demo-title=Next.js%20Commerce\u0026demo-description=An%20all-in-one%20starter%20kit%20for%20high-performance%20e-commerce%20sites.\u0026demo-url=https%3A%2F%2Fdemo.vercel.store\u0026demo-image=https%3A%2F%2Fbigcommerce-demo-asset-ksvtgfvnd.vercel.app%2Fbigcommerce.png\u0026integration-ids=oac_MuWZiE4jtmQ2ejZQaQ7ncuDT,oac_9HSKtXld74NG0srzdxSiBGty\u0026skippable-integrations=1\u0026root-directory=site\u0026build-command=cd%20..%20%26%26%20yarn%20build)\n\n# Next.js Commerce\n\nThe all-in-one starter kit for high-performance e-commerce sites. With a few clicks, Next.js developers can clone, deploy and fully customize their own store.\nStart right now at [nextjs.org/commerce](https://nextjs.org/commerce)\n\nDemo live at: [demo.vercel.store](https://demo.vercel.store/)\n\n- Shopify Demo: https://shopify.vercel.store/\n- Swell Demo: https://swell.vercel.store/\n- BigCommerce Demo: https://bigcommerce.vercel.store/\n- Vendure Demo: https://vendure.vercel.store\n- Saleor Demo: https://saleor.vercel.store/\n- Ordercloud Demo: https://ordercloud.vercel.store/\n- Spree Demo: https://spree.vercel.store/\n- Kibo Commerce Demo: https://kibocommerce.vercel.store/\n- Commerce.js Demo: https://commercejs.vercel.store/\n- SalesForce Cloud Commerce Demo: https://salesforce-cloud-commerce.vercel.store/\n\n## Run minimal version locally\n\n\u003e To run a minimal version of Next.js Commerce you can start with the default local provider `@vercel/commerce-local` that has disabled all features (cart, auth) and use static files for the backend\n\n```bash\npnpm install \u0026 pnpm build # run this commands in root folder of the mono repo\npnpm dev # run this commands in the site folder\n```\n\n\u003e If you encounter any problems while installing and running for the first time, please see the Troubleshoot section\n\n## Features\n\n- Performant by default\n- SEO Ready\n- Internationalization\n- Responsive\n- UI Components\n- Theming\n- Standardized Data Hooks\n- Integrations - Integrate seamlessly with the most common ecommerce platforms.\n- Dark Mode Support\n\n## Integrations\n\nNext.js Commerce integrates out-of-the-box with BigCommerce, Shopify, Swell, Saleor, Vendure, Spree and Commerce.js. We plan to support all major ecommerce backends.\n\n## Considerations\n\n- `packages/commerce` contains all types, helpers and functions to be used as base to build a new **provider**.\n- **Providers** live under `packages`'s root folder and they will extend Next.js Commerce types and functionality (`packages/commerce`).\n- We have a **Features API** to ensure feature parity between the UI and the Provider. The UI should update accordingly and no extra code should be bundled. All extra configuration for features will live under `features` in `commerce.config.json` and if needed it can also be accessed programatically.\n- Each **provider** should add its corresponding `next.config.js` and `commerce.config.json` adding specific data related to the provider. For example in case of BigCommerce, the images CDN and additional API routes.\n\n## Configuration\n\n### How to change providers\n\nOpen `site/.env.local` and change the value of `COMMERCE_PROVIDER` to the provider you would like to use, then set the environment variables for that provider (use `site/.env.template` as the base).\n\nThe setup for Shopify would look like this for example:\n\n```\nCOMMERCE_PROVIDER=@vercel/commerce-shopify\nNEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxx\nNEXT_PUBLIC_SHOPIFY_STORE_DOMAIN=xxxxxxx.myshopify.com\n```\n\n### Features\n\nEvery provider defines the features that it supports under `packages/{provider}/src/commerce.config.json`\n\n#### Features Available\n\nThe following features can be enabled or disabled. This means that the UI will remove all code related to the feature.\nFor example: Turning `cart` off will disable Cart capabilities.\n\n- cart\n- search\n- wishlist\n- customerAuth\n- customCheckout\n\n#### How to turn Features on and off\n\n\u003e NOTE: The selected provider should support the feature that you are toggling. (This means that you can't turn wishlist on if the provider doesn't support this functionality out the box)\n\n- Open `site/commerce.config.json`\n- You'll see a config file like this:\n  ```json\n  {\n    \"features\": {\n      \"wishlist\": false,\n      \"customCheckout\": true\n    }\n  }\n  ```\n- Turn `wishlist` on by setting `wishlist` to `true`.\n- Run the app and the wishlist functionality should be back on.\n\n### How to create a new provider\n\nFollow our docs for [Adding a new Commerce Provider](packages/commerce/new-provider.md).\n\nIf you succeeded building a provider, submit a PR with a valid demo and we'll review it asap.\n\n## Contribute\n\nOur commitment to Open Source can be found [here](https://vercel.com/oss).\n\n1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device.\n2. Create a new branch `git checkout -b MY_BRANCH_NAME`\n3. Install the dependencies: `pnpm install`\n4. Build the packages: `pnpm build`\n5. Duplicate `site/.env.template` and rename it to `site/.env.local`\n6. Add proper store values to `site/.env.local`\n7. Run `cd site` \u0026 `pnpm dev` to watch for code changes\n8. Run `pnpm turbo run build` to check the build after your changes\n\n## Work in progress\n\nWe're using Github Projects to keep track of issues in progress and todo's. Here is our [Board](https://github.com/vercel/commerce/projects/1)\n\nPeople actively working on this project: @okbel, @lfades, @dominiksipowicz, @gbibeaul.\n\n## Troubleshoot\n\n\u003cdetails\u003e\n\u003csummary\u003eI already own a BigCommerce store. What should I do?\u003c/summary\u003e\n\u003cbr\u003e\nFirst thing you do is: \u003cb\u003eset your environment variables\u003c/b\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n.env.local\n\n```sh\nBIGCOMMERCE_STOREFRONT_API_URL=\u003c\u003e\nBIGCOMMERCE_STOREFRONT_API_TOKEN=\u003c\u003e\nBIGCOMMERCE_STORE_API_URL=\u003c\u003e\nBIGCOMMERCE_STORE_API_TOKEN=\u003c\u003e\nBIGCOMMERCE_STORE_API_CLIENT_ID=\u003c\u003e\nBIGCOMMERCE_CHANNEL_ID=\u003c\u003e\n```\n\nIf your project was started with a \"Deploy with Vercel\" button, you can use Vercel's CLI to retrieve these credentials.\n\n1. Install Vercel CLI: `npm i -g vercel`\n2. Link local instance with Vercel and Github accounts (creates .vercel file): `vercel link`\n3. Download your environment variables: `vercel env pull .env.local`\n\nNext, you're free to customize the starter. More updates coming soon. Stay tuned..\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBigCommerce shows a Coming Soon page and requests a Preview Code\u003c/summary\u003e\n\u003cbr\u003e\nAfter Email confirmation, Checkout should be manually enabled through BigCommerce platform. Look for \"Review \u0026 test your store\" section through BigCommerce's dashboard.\n\u003cbr\u003e\n\u003cbr\u003e\nBigCommerce team has been notified and they plan to add more details about this subject.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWhen run locally I get `Error: Cannot find module '...@vercel/commerce/dist/config'`\u003c/summary\u003e\n\n```bash\ncommerce/site\n❯ yarn dev\nyarn run v1.22.17\n$ next dev\nready - started server on 0.0.0.0:3000, url: http://localhost:3000\ninfo  - Loaded env from /commerce/site/.env.local\nerror - Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error\nError: Cannot find module '/Users/dom/work/vercel/commerce/node_modules/@vercel/commerce/dist/config.cjs'\n    at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15)\n    at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15)\n    at resolveExports (node:internal/modules/cjs/loader:482:14)\n    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)\n    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)\n    at Function.mod._resolveFilename (/Users/dom/work/vercel/commerce/node_modules/next/dist/build/webpack/require-hook.js:179:28)\n    at Function.Module._load (node:internal/modules/cjs/loader:778:27)\n    at Module.require (node:internal/modules/cjs/loader:1005:19)\n    at require (node:internal/modules/cjs/helpers:102:18)\n    at Object.\u003canonymous\u003e (/Users/dom/work/vercel/commerce/site/commerce-config.js:9:14) {\n  code: 'MODULE_NOT_FOUND',\n  path: '/Users/dom/work/vercel/commerce/node_modules/@vercel/commerce/package.json'\n}\nerror Command failed with exit code 1.\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n```\n\nThe error usually occurs when running `pnpm dev` inside of the `/site/` folder after installing a fresh repository.\n\nIn order to fix this, run `pnpm build` in the monorepo root folder first.\n\n\u003e Using `pnpm dev` from the root is recommended for developing, which will run watch mode on all packages.\n\n\u003c/details\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascorbic%2Fnext-commerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fascorbic%2Fnext-commerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascorbic%2Fnext-commerce/lists"}