Skip to content
This repository was archived by the owner on Apr 19, 2024. It is now read-only.

Commit 7821f4a

Browse files
damianlegawiecgitbook-bot
authored andcommitted
GitBook: [master] one page modified
1 parent e13112e commit 7821f4a

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
lines changed

getting-started/understanding_spree.md

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,46 @@ order: 1
66

77
# Understanding how Spree works
88

9-
Spree is a modular application with a lean Core, REST API, and several optional modules and extensions.
9+
## Headless Commerce
1010

11-
## Rails Engine
11+
Spree is a modular, API-first headless commerce application. What does it mean?
1212

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.
1414

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.
1616

17-
## Spree namespace
17+
There are optional Admin / Storefront packages available also.
1818

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
2020

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).
2222

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.
2424

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 |
3241

3342
--
3443

3544
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).
3645

3746
To change which Spree gems you would like to install you will need to modify your project `Gemfile`.
3847

39-
### Headless installation
48+
### Headless installation \(default\)
4049

4150
```ruby
4251
gem 'spree'
@@ -72,5 +81,5 @@ docker-compose build
7281

7382
## Next steps
7483

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.
7685

0 commit comments

Comments
 (0)