# gatsby-starter-medusa

> A starter to get you started with building your e-commerce site with Medusa and Gatsby

Latest version **2.0.0** (published 2022-03-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-starter-medusa
pnpm add gatsby-starter-medusa
yarn add gatsby-starter-medusa
bun add gatsby-starter-medusa
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-03-13 |
| First published | 2022-03-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 31 |
| Unpacked size | 481.3 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 80 |
| Author | Kasper Fabricius Kristensen |
| Maintainers | xcxcx1996 |
| Keywords | gatsby, medusa, e-commerce |

## Links

- npm: https://www.npmjs.com/package/gatsby-starter-medusa
- Repository: https://github.com/medusajs/gatsby-starter-medusa
- Homepage: https://github.com/medusajs/gatsby-starter-medusa#readme
- Issues: https://github.com/medusajs/gatsby-starter-medusa/issues
- npm.io page: https://npm.io/package/gatsby-starter-medusa

## Dependencies (31)

- [yup](https://npm.io/package/yup.md) ^0.32.11
- [react](https://npm.io/package/react.md) ^17.0.2
- [sharp](https://npm.io/package/sharp.md) ^0.30.2
- [formik](https://npm.io/package/formik.md) ^2.2.9
- [gatsby](https://npm.io/package/gatsby.md) ^4.0.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [postcss](https://npm.io/package/postcss.md) ^8.4.5
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.2
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [@mdx-js/mdx](https://npm.io/package/@mdx-js/mdx.md) ^1.6.22
- [react-query](https://npm.io/package/react-query.md) ^3.34.16
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^10.4.0
- [react-helmet](https://npm.io/package/react-helmet.md) ^6.1.0
- [@mdx-js/react](https://npm.io/package/@mdx-js/react.md) ^1.6.22
- [@heroicons/react](https://npm.io/package/@heroicons/react.md) ^1.0.6
- [@headlessui/react](https://npm.io/package/@headlessui/react.md) ^1.4.2
- [@stripe/stripe-js](https://npm.io/package/@stripe/stripe-js.md) ^1.21.2
- [gatsby-plugin-mdx](https://npm.io/package/gatsby-plugin-mdx.md) ^3.3.0
- [@tailwindcss/forms](https://npm.io/package/@tailwindcss/forms.md) ^0.4.0
- [@medusajs/medusa-js](https://npm.io/package/@medusajs/medusa-js.md) ^1.0.7
- [gatsby-plugin-image](https://npm.io/package/gatsby-plugin-image.md) ^2.0.0
- [gatsby-plugin-sharp](https://npm.io/package/gatsby-plugin-sharp.md) ^4.9.0
- [gatsby-source-medusa](https://npm.io/package/gatsby-source-medusa.md) ^0.0.41
- [gatsby-plugin-postcss](https://npm.io/package/gatsby-plugin-postcss.md) ^5.0.0
- [gatsby-plugin-purgecss](https://npm.io/package/gatsby-plugin-purgecss.md) ^6.1.0
- [@stripe/react-stripe-js](https://npm.io/package/@stripe/react-stripe-js.md) ^1.6.0
- [gatsby-source-contentful](https://npm.io/package/gatsby-source-contentful.md) ^7.7.2
- [gatsby-source-filesystem](https://npm.io/package/gatsby-source-filesystem.md) ^4.0.0
- [gatsby-transformer-sharp](https://npm.io/package/gatsby-transformer-sharp.md) ^4.9.0
- [@tailwindcss/aspect-ratio](https://npm.io/package/@tailwindcss/aspect-ratio.md) ^0.4.0
- [gatsby-plugin-react-helmet](https://npm.io/package/gatsby-plugin-react-helmet.md) ^5.0.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-03-13

## README

<p align="center">
  <a href="https://www.medusa-commerce.com">
    <img alt="Medusa" src="https://user-images.githubusercontent.com/7554214/153162406-bf8fd16f-aa98-4604-b87b-e13ab4baf604.png" width="100" />
  </a>
</p>
<h1 align="center">
  Medusa Gatsby Starter
</h1>
<p align="center">
Medusa is an open-source headless commerce engine that enables developers to create amazing digital commerce experiences.
</p>
<p align="center">
  <a href="https://github.com/medusajs/medusa/blob/master/LICENSE">
    <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Medusa is released under the MIT license." />
  </a>
  <a href="https://github.com/medusajs/medusa/blob/master/CONTRIBUTING.md">
    <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="PRs welcome!" />
  </a>
  <a href="https://discord.gg/xpCwq3Kfn8">
    <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
  </a>
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@medusajs" alt="Follow @medusajs" />
  </a>
</p>

> **Prerequisites**: To use the starter you should have a Medusa server running locally on port 9000. Check out [medusa-starter-default](https://github.com/medusajs/medusa-starter-default) for a quick setup.

## 🚀 Quick Start

1. **Create a new Gatsby project**

```zsh
  npx gatsby new my-medusa-storefront https://github.com/medusajs/gatsby-starter-medusa

  # or

  git clone https://github.com/medusajs/gatsby-starter-medusa.git my-medusa-storefront
```

2. **Install dependencies**

```zsh
  cd my-medusa-storefront
  yarn
```

3. **Link to your backend**

In the folder `my-medusa-storefront` you should have a `.env.template` file with the following content:

```shell
GATSBY_MEDUSA_BACKEND_URL=http://localhost:9000
```

Before you can start developing your site you first need to copy this file into a new file named `.env.development`.

```zsh
mv .env.template .env.development
```

Per default your Medusa server should be running on `localhost:9000`, but if you have changed this you will then need to replace `GATSBY_MEDUSA_BACKEND_URL` with the URL of your Medusa server.

```zsh
GATSBY_MEDUSA_BACKEND_URL=<link to your server>
```

4. **Start development**

You should now be able to start developing your site.

```zsh
yarn start
```

5. **Open the source code and start editing!**

   Your site is now running at `http://localhost:8000`!

   _Note: You'll also see a second link: _`http://localhost:8000/___graphql`_. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.com/tutorial/part-five/#introducing-graphiql)._

   Open the `my-medusa-starter` directory in your code editor of choice and edit `src/pages/index.jsx`. Save your changes and the browser will update in real time!

---
_Source: https://npm.io/package/gatsby-starter-medusa · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
