/nextjs-woo

🔥Next.js & WooCommerce integration with Apollo Client & WP-GraphQL for efficient ecommerce functionalities in WordPress.

Primary LanguageTypeScriptMIT LicenseMIT

Jest Tests Codacy Badge CodeFactor Quality Gate Status

nextjs-woo

Next.js & WooCommerce integration with Apollo Client & WP-GraphQL for efficient ecommerce functionalities in WordPress.

Table of Contents

Installation

To get started with this project, follow these steps to set up your development environment.

Prerequisites

Make sure you have the following installed on your machine:

  • Node.js (version specified in the .nvmrc file)
  • Yarn (version specified in the package.json file)

Step 1: Clone the Repository

To get the project files onto your local machine, you need to clone the repository. You can do this by visiting the repository page on GitHub, clicking the green "Code" button, and copying the URL provided. Then, use your preferred Git client or command line to clone the repository to your desired directory.

Step 2: Install Dependencies

Next, install the project dependencies using Yarn:

yarn install

Step 3: Create Environment Variables

Before running the development server, you need to create a .env.local file based on the provided .env.sample file. This file will contain your environment-specific variables.

  1. Copy the sample environment file:
cp .env.sample .env.local
  1. Open .env.local in your preferred text editor and configure the necessary environment variables according to your setup. If you want to change the API URL, you can do this by modifying the NEXT_PUBLIC_GRAPHQL_URL variable in the .env.local file.

Step 4: Run the Development Server

Now you can start the development server:

yarn dev

Your application should now be running at http://localhost:3000.

Contributing

Forking the repository Creating a new branch for your feature or bug fix Submitting a pull request

License

This project is licensed under the MIT License. See the LICENSE file for details.