# Build with Hydrogen

Hydrogen is Shopify's framework for custom storefronts in code. It reads a
mock.shop catalog directly, so you don't need a store yet.

## Scaffold a new project

Ask your agent:

```prompt
Build me a Hydrogen storefront using vesna.mock.shop as the store domain. Setup instructions: vesna.mock.shop/llms.txt
```

Or scaffold it yourself:

```sh
npm create @shopify/hydrogen@latest -- --mock-shop
```

The `--quickstart` flag in the
[Hydrogen getting started guide](https://shopify.dev/docs/storefronts/headless/hydrogen/getting-started)
includes `--mock-shop`.

To start from a template set up for mock.shop instead, use the
[mock.shop starter](resources/mock-shop-starter.md).

## Connect an existing project

In your project's `.env` file, set `PUBLIC_STORE_DOMAIN` to a store host. Leave
the Storefront API token empty.

```dotenv
PUBLIC_STORE_DOMAIN=vesna.mock.shop
```

Hydrogen sends no token to a mock.shop host. Any Storefront API client works the
same way, from a Next.js site to a mobile app.

Every API version, such as `https://<store>.mock.shop/api/2026-07/graphql.json`,
serves the same schema.

## Connect your store

To switch to a real store, change `PUBLIC_STORE_DOMAIN` and
`PUBLIC_STOREFRONT_API_TOKEN` in your `.env` file.

In a Hydrogen project, link the store and pull its credentials instead:

```sh
npx shopify hydrogen link
npx shopify hydrogen env pull
```

Other clients change the store domain and add the store's token. Hydrogen
storefronts deploy to
[Oxygen](https://shopify.dev/docs/storefronts/headless/hydrogen/deployments),
Shopify's hosting for Hydrogen.

For an agent's step-by-step walkthrough, from choosing a catalog to running the
app, read [Build a Hydrogen storefront with mock.shop](hydrogen.md).

## Read the Hydrogen docs

- [Getting started](https://shopify.dev/docs/storefronts/headless/hydrogen/getting-started):
  set up a Hydrogen project.
- [Deployments](https://shopify.dev/docs/storefronts/headless/hydrogen/deployments):
  deploy to Oxygen, Shopify's hosting for Hydrogen.
