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):Styling
The storefront uses Tailwind CSS 4, which replaces the traditionaltailwind.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:
@theme inline become Tailwind utilities automatically — for example, --color-primary-500 maps to bg-primary-500, text-primary-500, etc.
Components
All components live insrc/components/ and can be customized or replaced:
Data Layer
To customize API behavior, modify the server actions insrc/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.
