spree

Spree is an open source E-commerce platform for Rails 6 with a modern UX, optional PWA frontend, REST API, GraphQL, several official extensions and 3rd party integrations. Over 1 million downloads and counting! Check it out:

Last updated on: February 27 at 06:38 PM

source code bug tracker request upgrade
Opensource
10138 10138 4376
0 / 0
owner:  spree

Gem Version Circle CI Code Climate Test Coverage Slack Status

Spree is a complete open source e-commerce solution built with Ruby on Rails. It was originally developed by Sean Schofield and is now maintained by Spark Solutions. We're open to contributions and accepting new Core Team members.

Spree consists of several different gems, each of which are maintained in a single repository and documented in a single set of online documentation.

  • spree_api (REST API v2 with JavaScript / TypeScript SDK and REST API v1)
  • spree_graphql (GraphQL API - coming soon)
  • spree_frontend (modern mobile-first, blazging fast customizable storefront powered by Turbolinks)
  • spree_backend (feature rich Admin Panel)
  • spree_cmd (command-line tools for developers)
  • spree_core (models, services & mailers, the basic components of Spree)
  • spree_sample (sample data for demo purposes)

You don't need to install all of the components. Only the Core is mandatory.

Demo

Deploy

If you want to run the demo on your local machine, you can use our docker image. It will download and run sample Spree application on http://localhost:3000 shell docker run --rm -it -p 3000:3000 spreecommerce/spree:3.6.4

Admin Panel credentials - login: spree@example.com / password: spree123

Getting Started

Add Spree gems to your Gemfile

Rails 6.0

gem 'spree', '~> 4.1.0.rc3'
gem 'spree_auth_devise', '~> 4.1'
gem 'spree_gateway', '~> 3.7'

Rails 5.2

gem 'spree', '~> 3.7.0'
gem 'spree_auth_devise', '~> 3.5'
gem 'spree_gateway', '~> 3.4'

Rails 5.1

gem 'spree', '~> 3.5.0'
gem 'spree_auth_devise', '~> 3.5'
gem 'spree_gateway', '~> 3.4'

Rails 5.0

gem 'spree', '~> 3.2.7'
gem 'spree_auth_devise', '~> 3.5'
gem 'spree_gateway', '~> 3.4'

Run bundle install

Note: if you run into Bundler could not find compatible versions for gem "sprockets": error message, please run

bundle update

Use the install generators to set up Spree

rails g spree:install --user_class=Spree::User
rails g spree:auth:install
rails g spree_gateway:install

Installation options

Alternatively, if you want to use the bleeding edge version of Spree, add this to your Gemfile:

gem 'spree', github: 'spree/spree'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise'
gem 'spree_gateway', github: 'spree/spree_gateway'

Note: The master branch is not guaranteed to ever be in a fully functioning state. It is unwise to use this branch in a production system you care deeply about.

By default, the installation generator (rails g spree:install) will run migrations as well as adding seed and sample data and will copy frontend views for easy customization (if spree_frontend available). This can be disabled using

rails g spree:install --migrate=false --sample=false --seed=false --copy_storefront=false

You can always perform any of these steps later by using these commands.

bundle exec rake railties:install:migrations
bundle exec rake db:migrate
bundle exec rake db:seed
bundle exec rake spree_sample:load

Browse Store

http://localhost:3000

Browse Admin Interface

http://localhost:3000/admin

If you have spree_auth_devise installed, you can generate a new admin user by running rake spree_auth:admin:create.

Extensions

Spree Extensions provide additional features not present in the Core system.

Extension Spree 3.2+ support Description
spree_gateway Build Status Community supported Spree Payment Method Gateways
spree_auth_devise Build Status Provides authentication services for Spree, using the Devise gem.
spree_i18n Build Status I18n translation files for Spree Commerce
spree-multi-domain Build Status Multiple Spree stores on different domains - single unified backed for processing orders
spree_multi_currency Build Status Provides UI to allow configuring multiple currencies in Spree
spree_multi_vendor Build Status Spree Multi Vendor Marketplace extension
spree-mollie-gateway Build Status Official Mollie payment gateway for Spree Commerce.
spree_braintree_vzero Build Status Official Spree Braintree v.zero + PayPal extension
spree_address_book Build Status Adds address book for users to Spree
spree_digital Build Status A Spree extension to enable downloadable products
spree_social Build Status Building block for spree social networking features (provides authentication and account linkage)
spree_related_products Build Status Related products extension for Spree
spree_static_content Build Status Manage static pages for Spree
spree-product-assembly Build Status Adds opportunity to make bundle of products
spree_editor Build Status Rich text editor for Spree with Image and File uploading in-place
spree_recently_viewed Build Status Recently viewed products in Spree
spree_wishlist Build Status Wishlist extension for Spree
spree_sitemap Build Status Sitemap Generator for Spree
spree_volume_pricing Build Status It determines the price for a particular product variant with predefined ranges of quantities
better_spree_paypal_express Build Status This is the official Paypal Express extension for Spree.
spree_globalize Build Status Adds support for model translations (multi-language stores)
spree_avatax_official Build Status Improve your Spree store's sales tax decision automation with Avalara AvaTax
spree_analytics_trackers Build Status Adds support for Analytics Trackers (Google Analytics & Segment)

Performance

You may notice that your Spree store runs slowly in development environment. This can be because in development each asset (css and javascript) is loaded separately. You can disable it by adding the following line to config/environments/development.rb.

config.assets.debug = false

Developing Spree

Spree is meant to be run within the context of Rails application and the source code is essentially a collection of gems. You can easily create a sandbox application inside of your cloned source directory for testing purposes.

Clone the Git repo

git clone git://github.com/spree/spree.git
cd spree

Install the gem dependencies

bundle install

Sandbox

Create a sandbox Rails application for testing purposes which automatically performs all necessary database setup

bundle exec rake sandbox

Start the server

cd sandbox
rails server

Running Tests

We use CircleCI to run the tests for Spree.

You can see the build statuses at https://circleci.com/gh/spree/spree.


Each gem contains its own series of tests, and for each directory, you need to do a quick one-time creation of a test application and then you can use it to run the tests. For example, to run the tests for the core project. shell cd core BUNDLE_GEMFILE=../Gemfile bundle exec rake test_app bundle exec rspec spec

If you would like to run specs against a particular database you may specify the dummy app's database, which defaults to sqlite3. shell DB=postgres bundle exec rake test_app

If you want to run specs for only a single spec file shell bundle exec rspec spec/models/spree/state_spec.rb

If you want to run a particular line of spec shell bundle exec rspec spec/models/spree/state_spec.rb:7

You can also enable fail fast in order to stop tests at the first failure shell FAIL_FAST=true bundle exec rspec spec/models/state_spec.rb

If you want to run the simplecov code coverage report shell COVERAGE=true bundle exec rspec spec

If you're working on multiple facets of Spree to test, please ensure that you have a postgres user:

createuser -s -r postgres

And also ensure that you have ChromeDriver installed as well. Please follow this instruction to install it.

To execute all the tests, you may want to run this command at the root of the Spree project to generate test applications and run specs for all the facets: shell bash build.sh

Contributing

Spree is an open source project and we encourage contributions. Please review the contributing guidelines before contributing.

In the spirit of free software, everyone is encouraged to help improve this project.

Here are some ways you can contribute:

License

Spree is released under the New BSD License.

About Spark Solutions

Spark Solutions

Spree is maintained by Spark Solutions Sp. z o.o..

We are passionate about open source software. We are available for hire.

comments

No comments yet

Add article
tags
e-commerce ecommerce rails ruby rubyonrails spree spreecommerce
compatible spree versions
tags spree versions
master s.version
v0.2.0
v0.4.0
v0.4.1
v0.5.0
v0.5.1
v0.6.0
v0.7.0
v0.7.1
v0.8.0
v0.8.1
v0.8.2
v0.8.3
v0.8.4
v0.8.5
v0.9.0
v0.9.1
v0.9.2
v0.9.3
v0.9.4
v0.10.0.beta
v0.10.0
v0.10.1
v0.10.2
v0.11.0
v0.11.1
v0.11.2
v0.11.3
v0.11.4
v0.11.99
v0.30.0.beta1 version
v0.30.0 version
v0.30.1 version
v0.30.2 version
v0.40.0 version
v0.40.1 version
v0.40.2 version
v0.40.3 version
v0.40.4 version
v0.50.0 version
v0.50.1 version
v0.50.2 version
v0.50.3 version
v0.50.4 version
v0.60.0.RC1 version
v0.60.0 version
v0.60.1 version
v0.60.2 version
v0.60.3 version
v0.60.4 version
v0.60.5 version
v0.60.6 version
v0.70.0.rc2 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v0.70.0 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v0.70.1 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v0.70.2 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v0.70.3 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v0.70.4 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v0.70.5 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v0.70.6 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v0.70.7 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.0.0.rc1 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.0.0.rc2 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.0.0.rc3 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.0.0.rc4 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.0.0 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.0.1 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.0.2 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.0.3 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.0.4 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.0.5 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.0.6 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.0.7 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.1.0.rc1 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.1.0.rc2 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.1.0 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.1.1 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.1.2.rc1 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.1.2 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.1.3 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.1.4 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.1.5 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.1.6 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.2.0.rc1 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.2.0.rc2 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.2.0 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.2.1 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.2.2 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.2.3 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.2.4 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.2.5 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.3.0.rc1 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.3.0.rc2 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.3.0 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.3.1 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.3.2 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.3.3 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.3.4 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v1.3.5 File.read(File.expand_path("../SPREE_VERSION", __FILE__)).strip
v2.0.0.rc1 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.0 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.1 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.2 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.3 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.4 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.5 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.6 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.7 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.8 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.9 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.10 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.11 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.0.12 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.0 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.1 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.2 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.3 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.4 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.5 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.6 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.7 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.8 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.9 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.10 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.11 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.1.12 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.0 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.1 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.2 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.3 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.4 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.5 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.6 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.7 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v.2.2.8 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.8 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.9 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.10 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.11 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.12 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.13 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.2.14 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.0 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.1 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.2 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.3 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.4 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.5 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.6 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.7 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.8 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.9 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.10 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.11 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.12 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.3.13 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.0.rc1 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.0.rc2 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.0.rc3 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.1 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.2 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.3 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.4 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.5 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.6 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.7 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.8 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.9 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v2.4.10 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.0.rc1 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.0.rc2 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.0.rc3 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.0.rc4 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.0 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.1 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.2 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.3 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.4 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.5 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.6 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.6.1 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.7 File.read(File.expand_path('../SPREE_VERSION', __FILE__)).strip
v3.0.8 s.version
v3.0.9 s.version
v3.0.10 s.version
v3.1.0.rc1 s.version
v3.1.0.rc2 s.version
v3.1.0.rc3 s.version
v3.1.0.rc4 s.version
v3.1.0 s.version
v3.1.1 s.version
v3.1.2 s.version
v3.1.3 s.version
v3.1.4 s.version
v3.1.5 s.version
v3.1.6 s.version
v3.1.7 s.version
v3.1.8 s.version
v3.1.10 s.version
v3.1.11 s.version
v3.1.12 s.version
v3.1.13 s.version
v3.1.14 s.version
v3.2.0.rc1 s.version
v3.2.0.rc2 s.version
v3.2.0.rc3 s.version
v3.2.0 s.version
v3.2.1 s.version
v3.2.2 s.version
v3.2.3 s.version
v3.2.4 s.version
v3.2.6 s.version
v3.2.7 s.version
v3.2.8 s.version
v3.2.9 s.version
v3.3.0.rc1 s.version
v3.3.0.rc2 s.version
v3.3.0.rc3 s.version
v3.3.0.rc4 s.version
v3.3.0 s.version
v3.3.1 s.version
v3.3.3 s.version
v3.3.4 s.version
v3.3.5 s.version
v3.3.6 s.version
v3.4.0.rc1 s.version
v3.4.0.rc2 s.version
v3.4.0 s.version
v3.4.1 s.version
v3.4.2 s.version
v3.4.3 s.version
v3.4.4 s.version
v3.4.5 s.version
v3.4.6 s.version
v3.5.0.rc1 s.version
v3.5.0.rc2 s.version
v3.5.0 s.version
v3.6.0.rc1 s.version
v3.6.0 s.version
v3.6.1 s.version
v3.6.2 s.version
v3.6.3 s.version
v3.6.4 s.version
v3.6.5 s.version
v3.6.6 s.version
v3.7.0.beta s.version
v3.7.0.rc1 s.version
v3.7.0.rc2 s.version
v3.7.0.rc3 s.version
v3.7.0 s.version
v3.7.1 s.version
v3.7.2 s.version
v3.7.3 s.version
v3.7.4 s.version
v3.7.5 s.version
v3.7.6 s.version
v3.7.8 s.version
v3.7.9 s.version
v3.7.10 s.version
v4.0.0.beta s.version
v4.0.0.rc1 s.version
v4.0.0.rc2 s.version
v4.0.0.rc3 s.version
v4.0.0 s.version
v4.0.1 s.version
v4.0.2 s.version
v4.0.3 s.version
v4.1.0.rc1 s.version
v4.1.0.rc2 s.version
v4.1.0.rc3 s.version
authors
Sean Schofield