You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Spree** is a complete open source e-commerce solution built with Ruby on Rails. It
19
-
was originally developed by Sean Schofield and is now maintained by [Spark Solutions](http://sparksolutions.co). We're open to [contributions](#contributing) and accepting new [Core Team](https://github.com/spree/spree/wiki/Core-Team) members.
21
+
was started by Sean Schofield and is now developed by [Spark Solutions](http://sparksolutions.co). We're open to [contributions](#contributing).
20
22
21
-
Spree consists of several different gems, each of which are maintained
23
+
Spree consists of several different gems (modules), each of which are maintained
22
24
in a single repository and documented in a single set of
***spree_api** ([REST API v2](https://guides.spreecommerce.org/api/v2) with [JavaScript / TypeScript SDK](https://github.com/spree/spree-storefront-api-v2-js-sdk) and [REST API v1](https://guides.spreecommerce.org/api/))
26
28
***spree_graphql** (GraphQL API - [coming soon](https://github.com/spree/spree/issues/9176))
27
-
***spree_frontend** (modern mobile-first, blazging fast customizable storefront powered by [Turbolinks](https://github.com/turbolinks/turbolinks))
29
+
***spree_frontend** (mobile-first, blazing fast and customizable storefront)
28
30
***spree_backend** (feature rich Admin Panel)
29
31
***spree_cmd** (command-line tools for developers)
30
32
***spree_core** (models, services & mailers, the basic components of Spree)
31
33
***spree_sample** (sample data for demo purposes)
32
34
33
-
You don't need to install all of the components. Only the **Core** is mandatory.
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
41
-
```shell
42
-
docker run --rm -it -p 3000:3000 spreecommerce/spree:3.6.4
**Note: The master branch is not guaranteed to ever be in a fully functioning
114
-
state. It is unwise to use this branch in a production system you care deeply
115
-
about.**
107
+
## Installation options
116
108
117
109
By default, the installation generator (`rails g spree:install`) will run
118
-
migrations as well as adding seed and sample data and will copy frontend views
119
-
for easy customization (if spree_frontend available). This can be disabled using
110
+
migrations as well as adding seed and sample data and will copy storefront data
111
+
for easy customization (if `spree_frontend` available). This can be disabled using
120
112
121
113
```shell
122
114
rails g spree:install --migrate=false --sample=false --seed=false --copy_storefront=false
@@ -126,32 +118,37 @@ You can always perform any of these steps later by using these commands.
126
118
127
119
```shell
128
120
bundle exec rake railties:install:migrations
129
-
bundle execrake db:migrate
130
-
bundle execrake db:seed
121
+
bundle execrails db:migrate
122
+
bundle execrails db:seed
131
123
bundle exec rake spree_sample:load
124
+
bundle exec rails g spree:frontend:copy_storefront
132
125
```
133
126
134
-
Browse Store
135
-
----------------------
127
+
### Headless installation
136
128
137
-
http://localhost:3000
129
+
To use Spree in [API-only mode](https://guides.spreecommerce.org/api/overview/) you need to replace `spree` with `spree_api` in your project Gemfile. This will skip Storefront and Admin Panel. If you would want to include the Admin Panel please add `spree_backend` to your Gemfile.
138
130
139
-
Browse Admin Interface
140
-
----------------------
131
+
## Run rails sever
141
132
142
-
http://localhost:3000/admin
133
+
```bash
134
+
rails s
135
+
```
143
136
144
-
If you have `spree_auth_devise` installed, you can generate a new admin user by running `rake spree_auth:admin:create`.
137
+
## Browse Storefront
145
138
146
-
Extensions
147
-
----------------------
139
+
Go to http://localhost:3000
148
140
149
-
Spree Extensions provide additional features not present in the Core system.
141
+
## Browse Admin Panel
150
142
143
+
Go to http://localhost:3000/admin
144
+
145
+
## Extensions
146
+
147
+
Spree Extensions provide additional features not present in the Core system.
| [spree_gateway](https://github.com/spree/spree_gateway) | [](https://travis-ci.org/spree/spree_gateway) | Payment Gateways (Stripe, Apple Pay, Braintree, Authorize.net and many others)
155
152
| [spree_auth_devise](https://github.com/spree/spree_auth_devise) | [](https://travis-ci.org/spree/spree_auth_devise) | Provides authentication services for Spree, using the Devise gem.
| [spree-multi-domain](https://github.com/spree-contrib/spree-multi-domain) | [](https://travis-ci.org/spree-contrib/spree-multi-domain) | Multiple Spree stores on different domains - single unified backed for processing orders
@@ -175,23 +172,27 @@ Spree Extensions provide additional features not present in the Core system.
175
172
| [spree_avatax_official](https://github.com/spree-contrib/spree_avatax_official) | [](https://travis-ci.org/spree-contrib/spree_avatax_official) | Improve your Spree store's sales tax decision automation with Avalara AvaTax
176
173
| [spree_analytics_trackers](https://github.com/spree-contrib/spree_analytics_trackers) | [](https://travis-ci.org/spree-contrib/spree_analytics_trackers) | Adds support for Analytics Trackers (Google Analytics & Segment)
177
174
178
-
Performance
179
-
----------------------
175
+
## Performance
180
176
181
177
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`.
182
178
183
179
```ruby
184
180
config.assets.debug =false
185
181
```
186
182
183
+
Also in development caching is disabled by defualt. To turn on caching run:
184
+
185
+
```bash
186
+
rails dev:cache
187
+
```
187
188
188
-
Developing Spree
189
-
----------------------
189
+
You will need to restart rails server after this.
190
+
191
+
## Developing Spree
190
192
191
193
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
192
194
application inside of your cloned source directory for testing purposes.
193
195
194
-
195
196
Clone the Git repo
196
197
197
198
```shell
@@ -226,11 +227,10 @@ We use [CircleCI](https://circleci.com/) to run the tests for Spree.
226
227
227
228
You can see the build statuses at [https://circleci.com/gh/spree/spree](https://circleci.com/gh/spree/spree).
228
229
229
-
---
230
-
231
230
Each gem contains its own series of tests, and for each directory, you need to
232
231
do a quick one-time creation of a test application and then you can use it to run
233
232
the tests. For example, to run the tests for the core project.
Copy file name to clipboardExpand all lines: guides/src/content/developer/tutorials/extensions_tutorial.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -48,13 +48,13 @@ end
48
48
49
49
Before we continue development of our extension, let's add it to the Spree application we created in the [last tutorial](/developer/getting_started_tutorial.html). This will allow us to see how the extension works with an actual Spree store while we develop it.
50
50
51
-
Within the `mystore` application directory, add the following line to the bottom of our `Gemfile`:
51
+
Within the `my_store` application directory, add the following line to the bottom of our `Gemfile`:
You may have to adjust the path somewhat depending on where you created the extension. You want this to be the path relative to the location of the `mystore` application.
57
+
You may have to adjust the path somewhat depending on where you created the extension. You want this to be the path relative to the location of the `my_store` application.
0 commit comments