Prerequisites
Node.js
Required: Node.js 14.0 or higherCheck your version:
Package Manager
Required: npm, yarn, or pnpmComes with Node.js or install separately
Shopify Store
Optional: For custom dataNeed a Shopify store with Storefront API access
Sanity Account
Optional: For custom dataNeed a Sanity project with Shopify Studio
You can get started immediately with demo data - connecting your own Shopify store and Sanity project is optional.
Installation Steps
Clone the Repository
Clone the Tune Me In starter from GitHub:This creates a new directory called
tune-me-in with the starter code.Core Dependencies
Tune Me In includes these key dependencies:Hydrogen & Shopify
package.json
- Server-side rendering with React 18
- Streaming SSR for fast page loads
- Built-in commerce components
- Storefront API integration
Sanity Integration
package.json
@sanity/client- JavaScript client for querying Sanity@sanity/image-url- Image URL builder for Sanity images@sanity/block-content-to-react- Renders Portable Text contenthydrogen-plugin-sanity- Unified Sanity + Shopify data fetchinggroq- Query language for Sanity
UI & Styling
package.json
Build Tools
package.json
Configuration
- Using Demo Data
- Using Your Own Data
Run with Demo Data
The starter comes pre-configured with demo data. You can start developing immediately:http://localhost:3000 to see the storefront with demo products.The demo configuration points to:
- Shopify Store:
sanity-dev-store.myshopify.com - Sanity Project:
wfr1r0dw(dataset:production)
Verify Installation
After installation and configuration, verify everything is working:Open the Storefront
Navigate to
http://localhost:3000 in your browser.You should see:- Home page with featured products
- Navigation with collections
- Working product links
Available Scripts
Tune Me In includes these npm scripts:Script Usage
Environment Variables (Optional)
For better security in production, use environment variables:Update Configuration Files
Reference environment variables in your config:
shopify.config.js
sanity.config.js
Troubleshooting
Node version error
Node version error
Tune Me In requires Node.js 14.0 or higher. Update Node.js:
Installation fails
Installation fails
Try these steps:
-
Clear npm cache:
-
Delete node_modules and lock file:
- Use a different package manager (try yarn or pnpm)
Shopify connection error
Shopify connection error
Verify your Shopify credentials:
- Store domain should be in format:
your-store.myshopify.com - Storefront token must have Storefront API access enabled
- Check token hasn’t expired
Sanity data not loading
Sanity data not loading
Check your Sanity configuration:
- Project ID is correct (visible in project settings)
- Dataset exists and has data
- Products are synced from Shopify using Sanity Connect
- API permissions allow read access
Build errors
Build errors
Common build issues:
- Ensure all dependencies are installed:
npm install - Check Node.js version:
node --version - Clear Vite cache:
rm -rf node_modules/.vite - Update dependencies:
npm update
Next Steps
Now that Tune Me In is installed, you’re ready to start building:Architecture
Learn how the codebase is organized
Data Fetching
Understand how to query Sanity and Shopify data
Components
Explore available components and create your own
Deployment
Deploy your storefront to production