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
Builds the per-request app context, including the Weaverse client. Hydrogen 2026.10 has no createHydrogenContext(), so the theme creates the session, Storefront client and customer account itself:
server.ts
The Oxygen worker entry. It builds the app context, lets Hydrogen answer the routes it owns (/api/cart, /account/login, …), renders the app with React Router, and looks up Shopify URL redirects on a 404 — the Weaverse client itself is created in app/.server/context.ts:
entry.server.tsx
Server-side rendering setup with React Router v7. The CSP header and nonce come from the theme’s own app/utils/csp.ts (see Content Security Policy):
.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