| title | Development |
|---|---|
| description | Complete guide to developing themes and components for Weaverse Hydrogen storefronts |
This comprehensive guide covers everything you need to know to develop themes and components for Weaverse Hydrogen storefronts.
Before you start developing with Weaverse, ensure you have:
- Node.js 18+ installed
- Familiarity with React and TypeScript
- Basic knowledge of Shopify Hydrogen
- Understanding of Tailwind CSS (recommended)
Get your development environment up and running in minutes:
Use the Weaverse CLI to create a new theme:
npx @weaverse/cli@latest create --template=pilot --project-id=your-project-idOr clone an existing theme repository:
git clone your-theme-repository
cd your-theme-directorynpm installCreate a .env file with your Weaverse and Shopify credentials:
# Core Variables
SESSION_SECRET="your-session-secret"
PUBLIC_STORE_DOMAIN="your-store.myshopify.com"
PUBLIC_STOREFRONT_API_TOKEN="your-storefront-api-token"
WEAVERSE_PROJECT_ID="your-weaverse-project-id"
# Optional: Use demo data during development
# PUBLIC_STORE_DOMAIN="mock.shop"npm run devYour storefront will be available at http://localhost:3456
npm run dev # Start development server
npm run dev:ca # Start dev server with Customer Account API (via CF tunnel)
npm run build # Production build
npm run start # Start production server
npm run preview # Build and start productionnpm run typecheck # TypeScript checking
npm run biome # Check code quality with Biome
npm run biome:fix # Fix code quality issues automatically
npm run format # Format code with Biome
npm run format:check # Check formatting without changesnpm run e2e # Run end-to-end tests with Playwright
npm run e2e:ui # Run E2E tests with Playwright UI- Set up your development environment
- Create your first component with schema
- Add input settings for customization
- Test in Weaverse Studio
- Implement proper TypeScript types
- Add error boundaries and loading states
- Performance: Keep components lightweight and optimize images
- Accessibility: Follow WCAG guidelines and use semantic HTML
- Mobile-First: Design responsive components from the start
- Schema Design: Create intuitive settings that merchants will understand
- Error Handling: Gracefully handle missing data and API failures
# Or start on a different port
npm run dev -- --port 3457
```
*Note: If you change the port, update the Preview URL in Weaverse Studio accordingly*
Once you've mastered the basics:
- Explore Advanced Features
- Learn about Styling & Theming
- Study the API Reference
- Join the Developer Community