{"id":13902740,"url":"https://github.com/bagisto/nextjs-commerce","last_synced_at":"2026-01-06T11:16:49.865Z","repository":{"id":39797844,"uuid":"459935229","full_name":"bagisto/nextjs-commerce","owner":"bagisto","description":"Develop and deploy headless commerce storefronts that convert with Vercel + Bagisto. Build your next store with Next.js and Bagisto","archived":false,"fork":false,"pushed_at":"2025-02-27T05:09:25.000Z","size":6512,"stargazers_count":106,"open_issues_count":0,"forks_count":39,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-28T13:11:12.397Z","etag":null,"topics":["headless","headless-commerce","nextjs","nextjs-commerce"],"latest_commit_sha":null,"homepage":"https://v2-bagisto-demo.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/bagisto.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":"2022-02-16T09:28:57.000Z","updated_at":"2025-03-26T11:49:50.000Z","dependencies_parsed_at":"2024-05-14T11:42:41.450Z","dependency_job_id":"292e916d-f98d-4bba-bf07-8a2a8844f6ec","html_url":"https://github.com/bagisto/nextjs-commerce","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bagisto%2Fnextjs-commerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bagisto%2Fnextjs-commerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bagisto%2Fnextjs-commerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bagisto%2Fnextjs-commerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bagisto","download_url":"https://codeload.github.com/bagisto/nextjs-commerce/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305935,"owners_count":20917208,"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":["headless","headless-commerce","nextjs","nextjs-commerce"],"created_at":"2024-08-06T22:01:21.803Z","updated_at":"2026-01-06T11:16:49.858Z","avatar_url":"https://github.com/bagisto.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://bagisto.com/en/headless-ecommerce/\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/bagisto/temp-media/0b0984778fae92633f57e625c5494ead1fe320c3/dark-logo-P5H7MBtx.svg\"\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://bagisto.com/wp-content/themes/bagisto/images/logo.png\"\u003e\n      \u003cimg src=\"https://bagisto.com/wp-content/themes/bagisto/images/logo.png\" alt=\"Bagisto logo\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://bagisto.com/en/headless-ecommerce/\"\u003eWebsite\u003c/a\u003e | \u003ca href=\"https://bagisto.com/en/bagisto-headless-ecommerce-installation-guide/\"\u003eDocumentation\u003c/a\u003e | \u003ca href=\"https://forums.bagisto.com/\"\u003eForums\u003c/a\u003e | \u003ca href=\"https://www.facebook.com/groups/bagisto/\"\u003eCommunity\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://twitter.com/intent/follow?screen_name=bagistoshop\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/bagistoshop?style=social\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.youtube.com/channel/UCbrfqnhyiDv-bb9QuZtonYQ\"\u003e\u003cimg src=\"https://img.shields.io/youtube/channel/subscribers/UCbrfqnhyiDv-bb9QuZtonYQ?style=social\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://packagist.org/packages/bagisto/bagisto\"\u003e\u003cimg src=\"https://poser.pugx.org/bagisto/bagisto/license.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n#  Bagisto Next.js Commerce\n\nA [**headless eCommerce framework**](https://bagisto.com/en/headless-ecommerce/) built with **Next.js** and powered by **Bagisto**, designed for modern scalability and flexibility.\nThrough layered caching and optimized rendering strategies, it consistently achieves a **100/100 Core Web Vitals score**, delivering lightning-fast performance and seamless shopping experiences.\n\nCheck the [Documentation](https://bagisto.com/en/bagisto-headless-ecommerce-installation-guide/) to quickly set up your Headless eCommerce store.\n\n**Bagisto Version:** v2.3.0\n\n**Bagisto GraphQL API:** v2.3.0\n\n![Bagisto Headless Commerce Image](https://raw.githubusercontent.com/bagisto/temp-media/refs/heads/master/bagisto-headless-commerce-home.png)\n## Features\n\n- **Ultra-fast storefront** with 100/100 Core Web Vitals score.  \n- **Layered caching** for API responses and page rendering.  \n- Fully **responsive and mobile-friendly** design.  \n- SEO optimized with meta tags, OpenGraph, and Twitter cards.  \n- Secure authentication via **NextAuth.js**.  \n- Powered by **Bagisto** GraphQL APIs for robust commerce functionality.  \n- **Incremental Static Regeneration (ISR)** with revalidation.\n  \nBagisto Open Source Headless eCommerce is optimized to deliver a **100/100 Core Web Vitals score** across devices, ensuring top-tier performance and user experience.\n\n![Bagisto Headless Commerce Image](https://raw.githubusercontent.com/bagisto/temp-media/refs/heads/master/bagisto-headless-commerce-performance.png)\n\n## Prerequisites\n\nBefore you begin, ensure you have the following installed:\n\n- **Node.js** 18+ and **pnpm**\n- Check Bagisto [backend requirement detail](https://devdocs.bagisto.com/2.3/introduction/requirements.html#server-configuration)\n\n---\n\n## Installation\n\n1) Install Bagisto\n \n    Begin by [installing the Bagisto](https://devdocs.bagisto.com/) eCommerce platform on your server or local environment.\n\n2) Install the Bagisto Headless Extension\n\n    After installing Bagisto, install the [Bagisto Headless Extension](https://github.com/bagisto/headless-ecommerce/) to expose the required APIs for your frontend.\n\n3) Get your storefront up and running in one command:\n   \n   ```bash\n   npx -y @bagisto-headless/create your-storefront\n   ```\n   \n4) Configure `.env.local` in the Next.js Project\n\n   In your Next.js frontend project, create or update your `.env.local` file with the following variables:\n\n| Variable | Description | Example |\n|----------|-------------|---------|\n| `SITE_NAME` | Your store name | `My Awesome Store` |\n| `BAGISTO_STORE_DOMAIN` | Your Bagisto backend URL | `https://api.mystore.com` |\n| `IMAGE_DOMAIN` | Domain for product images | `api.mystore.com` |\n| `REVALIDATION_DURATION` | ISR cache duration (seconds) | `3600` |\n| `NEXTAUTH_URL` | Your frontend URL | `https://mystore.com` |\n| `NEXTAUTH_SECRET` | Random secret for NextAuth | Generate with `openssl rand -base64 32` |\n\n\n**Important Notes**  \n- You will need to use the environment variables defined in `.env.example` to run Next.js Commerce.  \n- It’s recommended to use **Vercel Environment Variables**, but a `.env` file is sufficient for local development.  \n- **Never commit your `.env` file** to version control — it contains secrets that would allow others to control your Bagisto store.  \n\n---\n\n**Vercel Setup**\n\nInstall the Vercel CLI:\n\n```bash\nnpm i -g vercel\n```\n\nLink your local instance with Vercel and GitHub accounts (this creates the `.vercel` directory):\n\n```bash\nvercel link\n```\n\nDownload your environment variables:\n\n```bash\nvercel env pull\n```\n\n---\n\n**Run the development server:**\n\n```bash\npnpm dev\n```\n\n**Build for production:**\n\n```bash\npnpm build\npnpm start\n```\n\n---\n\n## Usage\n\nStart the development server:\n\n```bash\npnpm dev\n```\nAccess the store at:[http://localhost:3000](http://localhost:3000)\n\n---\n\n## Products\n\nThe Open Source Headless eCommerce allows users to browse a wide range of products with built-in pagination and search functionality. Each product has its own detailed page showcasing images, descriptions, pricing, reviews, and availability.\n\nBagisto Headless Commerce APIs support multiple product types, including simple, configurable, bundled, and downloadable products, ensuring flexibility for different business needs.\n\n![Bagisto Headless Commerce Image](https://raw.githubusercontent.com/bagisto/temp-media/refs/heads/master/bagisto-headless-commerce-product-page.png)\n\n## Categories\n\nProducts are neatly organized into hierarchical categories, making it easy for customers to navigate the store. Each category page displays relevant product listings with filtering and sorting options for a better shopping experience.\n\nThe Open Source Headless eCommerce also ensures SEO-friendly category URLs with meta titles, descriptions, and breadcrumbs for improved discoverability.\n\n![Bagisto Headless Commerce Image](https://raw.githubusercontent.com/bagisto/temp-media/refs/heads/master/bagisto-headless-commercecategory.png)\n \n## Checkout\n\nThe checkout process is fully functional, featuring complete cart management where customers can add, update, or remove items.\n\nBoth guest and logged-in users can proceed through checkout, selecting shipping addresses and preferred payment methods.\n\nOnce the order is placed, it is instantly synchronized with the Bagisto backend, enabling smooth order processing and management.\n\n![Bagisto Headless Commerce Image](https://raw.githubusercontent.com/bagisto/temp-media/refs/heads/master/bagisto-headless-commerce-cart-checkout.png)\n\n## Community\nGet Bagisto Headless Commerce support on [Facebook Group](https://www.facebook.com/groups/bagisto) and [Forum](https://forums.bagisto.com/)\n\n## License\nBagisto headless eCommerce framework that will always remain free under the [MIT License](https://github.com/bagisto/nextjs-commerce/blob/main/license.md).\n\n## Security Vulnerabilities\nIf you think that you have found a security issue in Bagisto Headless Commerce, please do not use the issue tracker and do not post it publicly. Instead, all security issues must be sent to [mailto:support@bagisto.com](mailto:support@bagisto.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbagisto%2Fnextjs-commerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbagisto%2Fnextjs-commerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbagisto%2Fnextjs-commerce/lists"}