Create a new Bagisto Headless Commerce project from the official Next.js template.
npm install @bagisto-headless/create@bagisto-headless/create is a CLI tool to quickly bootstrap a new Bagisto Headless Commerce project.
You can create a new project by running:
``bash`
npx @bagisto-headless/create
This command simplifies the setup process by performing the following steps:
1. Clones the Repository: It fetches the latest version of the Bagisto Headless Commerce.
2. Sets up the Project: Creates a new directory with your project name and initializes it.
3. Installs Dependencies: Automatically runs npm install with the necessary flags.NEXT_PUBLIC_BAGISTO_ENDPOINT
4. Configures Environment: Prompts you for essential configuration details:
* : Your Bagisto Shop URL.NEXT_PUBLIC_BAGISTO_STOREFRONT_KEY
* : Your Bagisto Storefront Key.NEXT_PUBLIC_NEXT_AUTH_URL
* : Your Headless Shop URL.NEXT_PUBLIC_NEXT_AUTH_SECRET
* : Your Headless Shop Secret.COMPANY_NAME
* : Your company name..env.local
5. Generates : Saves your configuration to a .env.local file so you're ready to start developing immediately.
Once the setup is complete, you can start your development server:
`bash``
cd
npm run dev
* Bagisto Headless eCommerce: https://bagisto.com/en/headless-ecommerce/
* Headless Documentation: https://headless-doc.bagisto.com/
* API Documentation: https://api-docs.bagisto.com/
* GitHub Repository: https://github.com/bagisto/nextjs-commerce
---
Developed by Bagisto.