# Spree Commerce

Spree Commerce is an open-source, headless e-commerce platform built on Ruby on Rails that lets self-hosters build B2B, marketplace, and enterprise online stores using REST APIs, a TypeScript SDK, a React admin.

Canonical page: https://ourlocalhost.com/app/8781/spree-commerce

## Description

Spree Commerce is an open-source, headless e-commerce platform built on Ruby on Rails that lets self-hosters build B2B, marketplace, and enterprise online stores using REST APIs, a TypeScript SDK, a React admin dashboard, and a production-ready Next.js storefront — with no platform fees under the BSD 3-Clause license.

## Platform availability

Available on 1 of 10 platforms: Any server.

## Health score

78/100 (Good), based on 3 of 4 factors.
- Maintained: 100 (last commit 1 day ago)
- Popular: 84 (15,848 GitHub stars)
- Easy to install: 25 (1 install platform, install notes)

## Links

- Official website: https://spreecommerce.org
- GitHub: https://github.com/spree/spree
- Documentation: https://spreecommerce.org/docs

## Common questions

### How do I initialize a local Spree backend with a database and API key?

Run spree init in your Spree project folder to start the Docker services, seed the database, and create an API key. If you skip this, the app has no database or API key for stores or admins.

### How do I point the Next.js storefront at the Spree backend?

Copy .env.local.example to .env.local and add your Spree API key there so the store can talk to the backend. Without this, the storefront cannot find products or settings.

### Do I need to start the storefront separately during local development?

Yes, open a second terminal, go to my-store/apps/storefront, and run pnpm dev to start the local storefront at localhost:3001. If you skip this, the backend may be running but there is no public store page to open.

### Can I build a mobile app that uses the same Spree backend?

Yes, Spree provides REST APIs that allow mobile app developers to build commerce experiences against a shared backend.

### Can I manage the store with an AI agent or MCP interface?

Spree ships with an MCP server that can manage the store via chat. It also includes agent skills for coding agents.

## Alternatives

- Etsy: Marketplace for handmade, vintage, and unique items offering direct sales from independent creators worldwide, including crafts, art, and d…
- LiteCart: Lightning fast e-commerce platform built in PHP.
- Medusa: Medusa is an automatic video library manager for TV shows.
- OpenCart: OpenCart is a free open-source PHP e-commerce platform that lets merchants, homelab admins, and store owners create and manage online store…
- Payhip: Platform simplifies sales of digital products like ebooks, courses, and coaching services.
- PrestaShop: PrestaShop is an open-source e-commerce free software powering nearly 200,000 online stores.
- Sell.app: Sell.app is the easiest way to sell digital products online.
- Shopify: A cloud-based e-commerce platform offering customizable online store creation, channel sales, inventory management, secure payments, and sh…
- WooCommerce: Open-source ecommerce platform supporting physical and digital sales, customizable storefronts, booking and subscription features, and wide…

---
Source: Our Local Host (https://ourlocalhost.com/app/8781/spree-commerce), the self-hosted and open-source app directory.
