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
{{ message }}
This repository was archived by the owner on Apr 19, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: getting-started/understanding_spree.md
+26-17Lines changed: 26 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,37 +6,46 @@ order: 1
6
6
7
7
# Understanding how Spree works
8
8
9
-
Spree is a modular application with a lean Core, REST API, and several optional modules and extensions.
9
+
## Headless Commerce
10
10
11
-
## Rails Engine
11
+
Spree is a modular, API-first headless commerce application. What does it mean?
12
12
13
-
Spree is a [Ruby on Rails Engine](https://guides.rubyonrails.org/engines.html), which means it's an application that provides functionality to their host applications \(that is your store application\).
13
+
Spree comes with a set of [APIs](https://api.spreecommerce.org/) you can work with directly or via [SDK](https://github.com/spree/spree-storefront-api-v2-js-sdk) to build your own Storefront.
14
14
15
-
Spree is a collection of Models, Views, and Controllers that your application gains access to when you install Spree. You can easily combine Spree with any Ruby on Rails application meaning you can add e-commerce capabilities to your existing RoR applications.
15
+
For application to application integration, you can use Platform API.
16
16
17
-
## Spree namespace
17
+
There are optional Admin / Storefront packages available also.
18
18
19
-
All Spree models, controllers and other classes are namespaced by the `Spree` keyword, eg. `Spree::Product`. This means that those files are also located in `spree` sub-directories eg. [app/models/spree/product.rb](https://github.com/spree/spree/blob/master/core/app/models/spree/product.rb).
19
+
##Spree codebase
20
20
21
-
## Spree modules
21
+
Spree API is written in Ruby on Rails framework and is mounted into a Rails application as [a Rails Engine](https://guides.rubyonrails.org/engines.html).
22
22
23
-
Spree is divided into several modules / gems which you can opt-out if you would like. Installing Spree via Spree Starter gives you access to all of Spree features such as Stoprefront, API and Admin Panel. Not all of the modules are required, eg. headless installations will not require Storefront at all.
23
+
You don't need to be a Rails developer to work with Spree. You can install Spree via Spree Starter or Docker and not touch the underlying codebase at all and work only with the APIs.
24
24
25
-
| Spree module | Description | Required? |
26
-
| :--- | :--- | :--- |
27
-
|**api**| REST API for |**yes**|
28
-
|**backend**| Admin Panel UI | no |
29
-
|**core**| Data models, Services and libraries |**yes**|
30
-
|**frontend**| Storefront UI | no |
31
-
|**sample**| Sample seed data | no |
25
+
### Spree namespace
26
+
27
+
All Spree models, controllers and other Ruby classes are namespaced by the `Spree` keyword, eg. `Spree::Product`. This means that those files are also located in `spree` sub-directories eg. [app/models/spree/product.rb](https://github.com/spree/spree/blob/master/core/app/models/spree/product.rb).
28
+
29
+
### Spree modules
30
+
31
+
Spree is divided into several modules / gems which you can install independently.
32
+
33
+
Installing Spree via [Spree Starter](https://github.com/spree/spree_starter) gives you access to all of Spree features such as Storefront, API and Admin Panel.
34
+
35
+
| Spree module | Description |
36
+
| :--- | :--- |
37
+
|**spree**| Data models, Services and APIs |
38
+
|**spree\_backend**| Admin Panel UI \(Rails\)|
39
+
|**spree\_frontend**| Storefront \(Rails\)|
40
+
|**spree\_sample**| Sample seed data |
32
41
33
42
--
34
43
35
44
There are many other Spree-gems providing additional functionality to your Store called [Extensions](https://github.com/spree/spree-dev-docs/tree/0628094f68853238d9b13aa3b24d7b1e1b13fca4/extensions/README.md).
36
45
37
46
To change which Spree gems you would like to install you will need to modify your project `Gemfile`.
38
47
39
-
### Headless installation
48
+
### Headless installation\(default\)
40
49
41
50
```ruby
42
51
gem 'spree'
@@ -72,5 +81,5 @@ docker-compose build
72
81
73
82
## Next steps
74
83
75
-
We recommend you go over [Internals section](../internals/stores.md) to learn more about how Spree works under the hood. This knowledge will be very useful when you'll decide you want to [customize your Spree store](../customization/dependencies.md).
84
+
We recommend you go over [Internals section](../internals/stores.md) to learn more about how Spree works under the hood.
0 commit comments