{"id":19188271,"url":"https://github.com/mathdroid/next-commerce","last_synced_at":"2025-05-08T02:46:25.314Z","repository":{"id":67669598,"uuid":"377228841","full_name":"mathdroid/next-commerce","owner":"mathdroid","description":null,"archived":false,"fork":false,"pushed_at":"2021-06-15T16:34:22.000Z","size":4776,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-20T06:34:54.696Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"commerce-layercode.vercel.app","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/mathdroid.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-15T16:34:12.000Z","updated_at":"2022-05-22T22:40:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"bca8a789-3e39-4eda-b42b-50e5fea27a78","html_url":"https://github.com/mathdroid/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/mathdroid%2Fnext-commerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathdroid%2Fnext-commerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathdroid%2Fnext-commerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathdroid%2Fnext-commerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathdroid","download_url":"https://codeload.github.com/mathdroid/next-commerce/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252989941,"owners_count":21836665,"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-11-09T11:24:14.425Z","updated_at":"2025-05-08T02:46:25.302Z","avatar_url":"https://github.com/mathdroid.png","language":"TypeScript","readme":"[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?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)\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-commerce.vercel.app/\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 and Saleor. We plan to support all major ecommerce backends.\n\n## Considerations\n\n- `framework/commerce` contains all types, helpers and functions to be used as base to build a new **provider**.\n- **Providers** live under `framework`'s root folder and they will extend Next.js Commerce types and functionality (`framework/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- **Providers don't depend on anything that's specific to the application they're used in**. They only depend on `framework/commerce`, on their own framework folder and on some dependencies included in `package.json`\n\n## Configuration\n\n### How to change providers\n\nOpen `.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 `.env.template` as the base).\n\nThe setup for Shopify would look like this for example:\n\n```\nCOMMERCE_PROVIDER=shopify\nNEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxx\nNEXT_PUBLIC_SHOPIFY_STORE_DOMAIN=xxxxxxx.myshopify.com\n```\n\nAnd check that the `tsconfig.json` resolves to the chosen provider:\n\n```\n  \"@framework\": [\"framework/shopify\"],\n  \"@framework/*\": [\"framework/shopify/*\"]\n```\n\nThat's it!\n\n### Features\n\nEvery provider defines the features that it supports under `framework/{provider}/commerce.config.json`\n\n#### Features Available\n\n- wishlist\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 `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](framework/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 yarn: `npm install -g yarn`\n4. Install the dependencies: `yarn`\n5. Duplicate `.env.template` and rename it to `.env.local`\n6. Add proper store values to `.env.local`\n7. Run `yarn dev` to build and watch for code 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 \u0026 @lfades.\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 detailed about this subject.\n\u003c/details\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathdroid%2Fnext-commerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathdroid%2Fnext-commerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathdroid%2Fnext-commerce/lists"}