Skip to main content
The storefront is yours to modify — the code ships in your project so you can restyle it, swap components, and change the data layer directly. Scaffold a project with create-spree-app, then edit the storefront under apps/storefront/.

Tracking Upstream Updates

The storefront evolves upstream. To keep pulling improvements while you customize, own the code in your own Git repository (a fork of spree/storefront, or your own repo with the storefront as an upstream remote):
Resolve any conflicts in your customized files, then commit.

Styling

The storefront uses Tailwind CSS 4, which replaces the traditional tailwind.config.ts with CSS-native configuration via the @theme directive in src/app/globals.css.

Theme Customization

Edit the @theme inline block in src/app/globals.css to change colors, fonts, and other design tokens:
Variables defined in @theme inline become Tailwind utilities automatically — for example, --color-primary-500 maps to bg-primary-500, text-primary-500, etc.

Components

All components live in src/components/ and can be customized or replaced:
Components use standard React patterns — modify them directly or replace them entirely with your own implementations.

Data Layer

To customize API behavior, modify the server actions in src/lib/data/. Each file handles a specific domain: These server actions call @spree/sdk directly, using helpers in src/lib/spree/ for auth cookies and locale resolution. You can add custom logic, caching strategies, or additional transformations as needed.

Adding New Pages

Follow the existing App Router pattern with localized routes. Place pages under the (storefront) route group to inherit the shared header/footer layout:

Transactional Emails

The storefront can render and send its own order, shipment, and account emails with react-email and Resend, driven by Spree webhooks. See the dedicated Transactional Emails guide.

Building a Custom Storefront

If you prefer to build from scratch instead of using the starter, you can use the @spree/sdk package directly in any Next.js application. The storefront’s src/lib/spree/ directory contains reusable helpers for cookie-based auth, locale resolution, middleware, and webhook verification that you can copy into your own project.