# Skncre + Nuxt

Use our **Skncre** starter with Nuxt to create a composable cosmetics storefront starter.

## Quickstart: Clone the Skncre Nuxt starter

To get up and running quickly with Nuxt and Hygraph, clone our **Skncre** starter:

1. [Clone the Hygraph project](https://app.hygraph.com/clone/f67b7c52af504cd9a19de912423b2e40?name=Hygraph%20SKNCRE)
2. [Get the Nuxt code from Github](https://github.com/timbenniks/skncre-cosmetics-hygraph)

Install **Skncre** via terminal:

```
npx degit git@https://github.com/hygraph/skncre-starter-nuxt.git
```

Alternatively, you can [clone <strong>Skncre</strong> from the Hygraph project directory](https://app.hygraph.com/) from the selection of available starters.

**Starter recap:**

All Hygraph starters are located on the project directory after to login. Scroll past the “My Projects” section to the “Start a new Project” section and choose the E-commerce shop starter.

This will create a new hygraph project as well as the frontend template for a website.

### Connecting Hygraph to Nuxt

Change directory to your new **Skncre** project and install dependencies if needed using `yarn install`.

[After initializing permissions](https://hygraph.com/docs/implementations#content-api), we'll create a `.env` file by renaming the `.env.example` file in the root of our Nuxt project.

Add the endpoint URL we copied from Hygraph inside the `.env` file, like this:

```
GQL_HOST=https://<HYGRAPH_CDN_LOCATION>.cdn.hygraph.com/content/<ID>/master
```

### Configure Hygraph assets to work with Nuxt

To work with Nuxt image module, we need to specify Hygraph as an image provider by adding the base URL in the `nuxt.config.ts` file.

Your config file should contain the following code:

```js
// nuxt.config.ts
export default defineNuxtConfig({
... other configuration parameters here
  image: {
    providers: {
      hygraph: {
        baseurl: "https://media.graphassets.com"
      }
    }
  }
})
```

In this case, we are using Hygraph as our image source. You can add additional image providers as needed to the Nuxt config file.

![Skncre](https://hygraph.com/images/docs/implementations/nuxt/skncre.png)

Once you add the `GQL_HOST` and configure the image source, you can spin up your development server with the command `yarn run dev` and your app will be available at `https://localhost:3000.`

**Pro Tip:**

For more Nuxt implementations, [check out our Nuxt microblog starter!](https://github.com/hygraph/hygraph-nuxt-microblog-starter)
