Skip to content
AddHunt
Shopify apps

Nuxt Shopify

Nuxt module for building Shopify storefronts

Open source

  • Open source
  • Licence: MIT

In short

Nuxt Shopify is an open-source Nuxt module that connects a Nuxt app to Shopify's Storefront, Customer Account and Admin APIs with typed GraphQL helpers. It is for Vue and Nuxt developers building custom or headless Shopify stores.

What you get

  • Storefront API composables with typed results
  • Customer Account API login and sessions
  • Server-side Admin API access
  • Zero-config TypeScript codegen from GraphQL
  • Automatic fragment injection and deduplication
  • Lifecycle hooks and headless Shopify analytics

The details

Nuxt Shopify brings Shopify's APIs into a Nuxt project as a module. Instead of wiring up GraphQL clients and authentication by hand, developers call composables such as useStorefrontData inside components and get typed results back.

APIs covered

  • Storefront API access for products, collections, customers and custom shopping flows
  • Customer Account API with a built-in login flow, sessions and access handling
  • Admin API requests from server routes for orders, inventory and other store data, suited to custom dashboards and internal tools

Developer experience

The module creates TypeScript types from GraphQL operations and hot-reloads them without setup, so queries get autocompletion. Reusable GraphQL fragments are added to queries automatically and deduplicated, with no explicit imports. Error handling utilities work with third-party logging, and lifecycle hooks let developers add custom logic at different stages of an API call. Drop-in components send headless analytics events to Shopify.

Notes

Customer login requires an HTTPS domain rather than localhost, and the documentation covers this in its local development guide. A demo store shows the module in use. The project is published under the MIT license in the nuxt-modules organisation on GitHub.

Alternatives to Nuxt Shopify

All alternatives

Questions

Is Nuxt Shopify a Shopify app?

No. It is a Nuxt module that developers add to their own Nuxt project to work with Shopify's APIs.

Which Shopify APIs does it support?

The Storefront API, the Customer Account API and the Admin API.

Can customer login be tested on localhost?

Not directly. Customer login needs an HTTPS domain other than localhost, and the docs describe a local development setup for this.

More like this