Spree

Spree是一个使用Ruby on Rails构建的完整的开源电子商务解决方案。(Spree is a complete open source ecommerce solution for Ruby on Rails.)

Github星跟蹤圖

Spree是一个使用Ruby on Rails构建的完整的开源电子商务解决方案。它最初由Sean Schofield开发,现在由Spark Solutions和Vinsol的开发人员维护。 Spree是世界上最大的开源软件项目之一,已被成千上万的开发商使用,在全球建立超过45,000个在线商店。

spree 特性:

  • 全功能和模块化:Spree storefront 提供了一个完整的功能集,并建立在共同的标准之上,所以你不必牺牲市场的速度、效率或创新。 模块化平台允许您轻松配置,补充或替换所需的任何功能,以便您可以构建所需的确切店面。
  • 强大的定制功能:灵活和响应的网站设计;Spree提供了一个开箱即用的响应式设计,为所有设备带来最佳的用户体验。使用动画、现场视频或其他创新技术来吸引您的购物者,参观您的产品线。
  • 全面的API:Spree Commerce为系统的几乎所有方面提供了完整的API。 在创纪录的时间内,很容易创建你想要的任何经验。
  • 拥有解决方案:当您使用Spree平台时,您拥有代码,并且可以根据需要修改软件。因为平台是建立在现代标准之上,所以不需要专有的编程技能。代码是你的,只要你需要它。 没有任何附加条件。
  • 成熟和受信任的平台:Spree Commerce是世界上最受欢迎的电子商务平台之一。 现有超过45,000家网店用户,并且在不断增长中,以及一个活跃的社区。
  • 强大的开源社区:Spree的活跃社区贡献的功能,是由世界各地的使用平台的超过45,000家商店的真实世界体验驱动的。 Spree已翻译成30多种语言。
Spree由几个不同的gem组成,每个gem都保存在单个存储库中,并在一组在线文档中记录。
  • spree_api(RESTful API)
  • spree_frontend(客户前端)
  • spree_backend(管理面板)
  • spree_cmd(命令行工具)
  • spree_core(Models&Mailers,Spree的基本组件,它不能运行)
  • spree_sample(示例数据)

概覽

名稱與所有者spree/spree
主編程語言Ruby
編程語言Ruby (語言數: 4)
平台
許可證BSD 3-Clause "New" or "Revised" License
發布數326
最新版本名稱v4.7.1 (發布於 )
第一版名稱v0.2.0 (發布於 2008-06-05 22:03:00)
創建於2008-03-10 14:45:35
推送於2024-04-21 17:21:28
最后一次提交
星數12.6k
關注者數80
派生數4.9k
提交數24.9k
已啟用問題?
問題數4172
打開的問題數227
拉請求數3498
打開的拉請求數80
關閉的拉請求數4217
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

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 (new REST API v2 and legacy REST API v1, GraphQL support coming soon) - we also have an official API v2 JavaScript / TypeScript SDK
  • spree_frontend (default Rails customer frontend)
  • spree_backend (Admin Panel)
  • spree_cmd (Command-line tools)
  • spree_core (Models, Services & Mailers, the basic components of Spree that it can't run without)
  • spree_sample (Sample data)

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

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.rc1'
gem 'spree_auth_devise', '~> 4.1.0.rc1'
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.

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.

DB=postgres bundle exec rake test_app

If you want to run specs for only a single spec file

bundle exec rspec spec/models/spree/state_spec.rb

If you want to run a particular line of spec

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

FAIL_FAST=true bundle exec rspec spec/models/state_spec.rb

If you want to run the simplecov code coverage report

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:

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.

去到頂部