• Stars
    star
    167
  • Rank 221,843 (Top 5 %)
  • Language Vue
  • License
    GNU Affero Genera...
  • Created over 3 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚡️ Nuxt 3 and Vue 3 headless eCommerce site with WooCommerce backend and Algolia search

Playwright Tests Codacy Badge CodeFactor Quality Gate Status

Nuxt 3 Ecommerce site with WooCommerce backend

Project screenshot

Table Of Contents (TOC)

Features

  • Nuxt 3
  • Vue 3 and Composition API with <script setup> syntax
  • Tailwind CSS
  • Nuxt Apollo
  • Pinia with pinia-plugin-persistedstate for cart and state management
  • Responsive design
  • Swiper integration for Hero section
  • Support for simple and variable products
  • Stock quantity on simple and variable products
  • CSS animations and transitions
  • Form handling and validation with Formkit, Vee Validate and Yup
  • Checkout process
  • Animated mobile menu
  • Basic Playwright test(s) integrated with Github actions

Installation

  1. Install and activate the following required plugins, in your WordPress plugin directory:
  • woocommerce Ecommerce for WordPress.
  • wp-graphql Exposes GraphQL for WordPress.
  • wp-graphql-woocommerce Adds WooCommerce functionality to a WPGraphQL schema. Currently only confirmed to be working with version 0.62 of this plugin.
  • wp-algolia-woo-indexer WordPress plugin coded by me. Sends WooCommerce products to Algolia. Required for search to work.

Optional plugin:

  • headless-wordpress Disables the frontend so only the backend is accessible.
  • wp-graphql-cors Ensures that CORS works correctly. Remember to add the domain to the store under Extend "Access-Control-Allow-Origin” header

The current release has been tested and is confirmed working with the following plugin versions:

  • WordPress version 6.1.1
  • WooCommerce version 7.4.0
  • WP GraphQL version 1.13.8
  • WooGraphQL version 0.12.0
  • WPGraphQL CORS version 2.1
  1. Make sure WooCommerce has some products already or import some sample products

    The WooCommerce sample products CSV file is available at wp-content/plugins/woocommerce/sample-data/sample_products.csv or Sample products

    Import the products at WP Dashboard > Tools > Import > WooCommerce products(CSV)

  2. Clone or fork the repo and modify .env with the URL to the GraphQL endpoint (or set environment variables in the configuration UI for your deployment solution)

  3. Start the server with npm run dev

  4. Enable COD (Cash On Demand) payment method in WooCommerce

  5. Add a product to the cart

  6. Proceed to checkout

  7. Fill in your details and place the order

Troubleshooting

I am getting a cart undefined error or other GraphQL errors

Check that you are using the 0.12.0 version of the wp-graphql-woocommerce plugin

I encounter a bug with add to cart

Try logging off wp-admin and try again.

The products page isn't loading

Check the attributes of the products. Right now the application requires Size and Color.

More Repositories

1

nextjs-woocommerce

🔥 Next.js (React) headless eCommerce site with Typescript, WordPress (WooCommerce) backend and Algolia search
TypeScript
422
star
2

laravel-vue-ecommerce

Laravel 10 eCommerce site with Vue 3 and Stripe
JavaScript
125
star
3

wp-algolia-woo-indexer

✏️ WordPress plugin that sends WooCommerce products to Algolia. Used with headless eCommerce.
PHP
29
star
4

Modern-JavaScript-for-the-Impatient

Code for the book Modern JavaScript for the Impatient
JavaScript
27
star
5

headless-wp

Plugin to enable a headless WP experience
PHP
23
star
6

dfweb-v3

🏡 DFWeb personal portfolio version 3 with Next.js, Sanity.io, Framer Motion, Storybook, Tailwind CSS, Cypress, Playwright and more. 98% test coverage.
TypeScript
20
star
7

todo-hooks

React TODO app with Hooks and Ant Design for UI
JavaScript
11
star
8

sveltekit-chatGPT

Web interface for chatGPT with Sveltekit
Svelte
6
star
9

wordpress-resources

A curated list of interesting Wordpress resources
PHP
5
star
10

sanity-ecommerce

Sanity ecommerce
JavaScript
4
star
11

earthdoom

🌎 Full-stack strategy game inspired by Planetarion. Built with T3 stack, Typescript, Prisma, tRPC, mySQL, Tailwind, Next.js, Clerk and more.
TypeScript
4
star
12

astro-woocommerce

Ecommerce with Woocommerce backend and frontend with Astro framework and Vue 3
Vue
3
star
13

stein-saks-papir

✂️ Rock, paper and scissors game implemented in React.
JavaScript
3
star
14

PHP-MVC-Framework

A MVC PHP framework to work as a starting point for an application
PHP
2
star
15

React-themes-tailwind

React themes and components created with Tailwind CSS
JavaScript
2
star
16

firestore-ecommerce

Security rules example for Firestore
2
star
17

Statens-Vegvesen

Display vehicle information from https://www.vegvesen.no. Uses Vite, Typescript, HTML5 and Bootstrap 5..
TypeScript
2
star
18

fullstack-nextjs-typescript

Fullstack application with Strapi, Nextjs, Typescript and Bootstrap
TypeScript
1
star
19

nav-jobs

Showing jobs from https://arbeidsplassen.nav.no
TypeScript
1
star
20

w3bdesign

Secret README for my profile
1
star
21

Codewars-PHP

PHP solutions for Codewars challenges
PHP
1
star
22

express

SaaS App with Node.js, Express, MongoDB and PassportJS for authentication
CSS
1
star
23

vanilla-js-methods

Vanilla JS implementation of Javascript methods
1
star
24

carasent-react-typescript

Kodeøvelse med React og Typescript
TypeScript
1
star