• Stars
    star
    128
  • Rank 280,396 (Top 6 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 1 year ago
  • Updated 4 months ago

Reviews

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

Repository Details

๐Ÿ›๏ธ Medusa module for Nuxt

Nuxt Medusa

nuxt-medusa

npm version npm downloads License

Medusa module for Nuxt.

Features

  • Nuxt 3 ready
  • Wrapper around @medusajs/medusa-js
  • Handy composables like useMedusaClient
  • Usage in API server routes with serverMedusaClient
  • TypeScript support

Quick Setup

  1. Add nuxt-medusa dependency to your project
npm install --save-dev nuxt-medusa # pnpm or yarn
  1. Add nuxt-medusa to the modules section of nuxt.config.ts:
export default defineNuxtConfig({
  modules: ['nuxt-medusa'],
})
  1. Create .env file with following MEDUSA_URL variable:
MEDUSA_URL=<YOUR_MEDUSA_URL> # By default http://localhost:9000

And that's it! You can now fetch data from Medusa in Nuxt โœจ

<script setup lang="ts">
  const client = useMedusaClient();
  const { products } = await client.products.list();
</script>

If you are encountering problems with CORS from Medusa, make sure that process.env.STORE_CORS in medusa-config.js file is pointing to your local Nuxt project. By default, Medusa has CORS set for http://localhost:8000 while Nuxt is running by default on http://localhost:3000

Development

# Install dependencies
yarn

# Generate type stubs
yarn dev:prepare

# Develop with the playground
yarn dev

# Build the playground
yarn dev:build

# Run ESLint
yarn lint

# Run Vitest
yarn test
yarn test:watch

# Release new version
yarn release

More Repositories

1

nuxt-security

๐Ÿ›ก Automatically configure your app to follow OWASP security patterns and principles by using HTTP Headers and Middleware
TypeScript
785
star
2

microservice-template

๐Ÿ“– Nest.js based microservice repository template
TypeScript
249
star
3

nuxt-lazy-hydrate

๐Ÿ’ฆ Lazy Hydration Module for Nuxt
TypeScript
89
star
4

nuxt-newsletter

โœ‰๏ธ Nuxt module for first class integration with popular newsletter providers
TypeScript
57
star
5

nuxt-shopify-tailwind

Headless Commerce website with Nuxt 3, Shopify, and Tailwindcss
Vue
57
star
6

cache

๐Ÿ”‹ Browser and Server Cache module for Nuxt 3
TypeScript
35
star
7

compression

๐Ÿ—œ Compression module for Nuxt 3
TypeScript
32
star
8

lazy-load

๐ŸŒ… Lazy Loading module for Nuxt 3
TypeScript
29
star
9

next-security

๐Ÿ›ก Security plugin for Next.js based on OWASP and Helmet
TypeScript
25
star
10

nuxt3-structure-modules-pinia

Using Modules and Pinia to structure Nuxt 3 app
TypeScript
23
star
11

nuxt-shopify-storyblok

Composable Commerce with Nuxt, Shopify, and Storyblok
Vue
23
star
12

nuxt-histoire

Histoire module for Nuxt 3
TypeScript
12
star
13

nuxt-backend

Example Nuxt Backend Microservice
TypeScript
10
star
14

map

๐Ÿ—บ Map Module for Nuxt 3
Vue
10
star
15

nest-microservice

TypeScript
10
star
16

nest-demo

TypeScript
9
star
17

nuxt-module-template

TypeScript
8
star
18

nuxt3-algolia

Nuxt 3 with Algolia search boilerplate project
Vue
7
star
19

nuxt-helm

Security Headers Module for Nuxt 3
TypeScript
6
star
20

nuxt3-tailwind-supabase

Cat Image Gallery built with Nuxt 3, TailwindCSS and Supabase, deployed to Vercel
Vue
6
star
21

nuxt3-algolia-storyblok

Nuxt 3 starter with Algolia, Storyblok, and Indexer
TypeScript
5
star
22

nuxt-a11y

๐Ÿ‘ค Accessibility (A11Y) Module for Nuxt
TypeScript
5
star
23

nuxt-apollo-tailwind

Repository for Nuxt 3, Apollo, and Tailwind Crash Course
Vue
4
star
24

nuxt-partytown

Demo of improving Performance in Nuxt with Partytown and Plausible
TypeScript
4
star
25

nuxt-lighthouse-ci

Demo repository of Nuxt.js project with Lighthouse CI Github workflows
Vue
3
star
26

nuxt-tailwind-medusa

Demo application for the article about Nuxt, Medusa, and Tailwind
Vue
3
star
27

jamstack-nuxt-storyblok

Example Jamstack app with Nuxt 3, Content, and Storyblok deployed to Vercel
Vue
2
star
28

nuxt3-algolia-stackblitz

A demo of Nuxt 3 with Algolia and deployed to Stackblitz
Vue
1
star
29

nuxt-medusa-tailwind

Simple Headless Commerce with Nuxt, Medusa, and TailwindCSS
Vue
1
star
30

dxp-nuxt3-storyblok-algolia-tailwindcss

Digital Experience Platform with Nuxt 3, Storyblok, Algolia, and TailwindCSS
Vue
1
star
31

test-shopify-storyblok

Vue
1
star
32

nuxt-commerce-theme

Vue
1
star
33

vsf2-custom-integration-example

Example of Custom Integration for VSF 2
TypeScript
1
star
34

headless-avuengers

Demo of Nuxt 3 app powered by Headless CMS and Search Engine
Vue
1
star
35

nuxt-storyblok-shopify

Vue
1
star
36

nuxt-image-gallery

Vue
1
star
37

nuxt-storyblok-algolia-tailwindcss

Simple Digital Experience Platform (DXP) with Nuxt 3, Algolia, Storyblok, and TailwindCSS deployed to Vercel
Vue
1
star