Skip to main content

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

Key Directories

/app/components

Reusable UI components:

/app/sections

Theme sections for Weaverse Studio:

/app/weaverse

Core Weaverse configuration files:
  • components.ts - Component registry (the components array passed to WeaverseClient)
  • schema.server.ts - Theme schema
  • index.tsx - WeaverseContent renderer and page-data validation
  • style.tsx - Global styles generated from theme settings
  • csp.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

Need help? Check our Community or FAQ.