Overview
The Weaverse Hydrogen theme follows a modern Shopify Hydrogen structure, optimized for performance and developer experience. Let’s explore the key components of your theme.Core Structure
my-theme
app
.server
components
graphql
hooks
routes
sections
styles
types
utils
weaverse
entry.client.tsx
entry.server.tsx
routes.ts
root.tsx
public
server.ts
vite.config.ts
react-router.config.ts
.env
Key Directories
/app/components
Reusable UI components:
/app/sections
Theme sections for Weaverse Studio:
/app/weaverse
Core Weaverse configuration files:
components.ts- Component registry (thecomponentsarray passed toWeaverseClient)schema.server.ts- Theme schemaindex.tsx-WeaverseContentrenderer and page-data validationstyle.tsx- Global styles generated from theme settingscsp.ts- Content Security Policy directives for Studio
Essential Files
app/.server/context.ts
Creates the Hydrogen router context and attaches the Weaverse client to it:
server.ts
The Oxygen request handler. It builds the context and hands it to React Router — the Weaverse client itself is created in app/.server/context.ts:
entry.server.tsx
Server-side rendering setup with React Router v7:
.env
Required environment variables:
Development Commands
Next Steps
- Development Guide - Build custom components and sections
- API Reference - Learn about Weaverse APIs and utilities
- Deployment - Deploy your theme to production