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

Commit 6a794a2

Browse files
docs update
1 parent 524cbb8 commit 6a794a2

22 files changed

+69
-532
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Developer's Documentation
22

3-
![Vendo comes with a built-in storefront, features and integrations. Try it for free.](.gitbook/assets/spree\_vendo\_user\_doc.png)
4-
53
[![GitHub stars](https://img.shields.io/github/stars/spree/spree.svg?style=social\&label=Star\&maxAge=2592000)](https://github.com/spree/spree/)
64

75
This is the developer-focused part of Spree Commerce documentation. Here you will find all kinds of information on topics such as Customization, Deployment, Configuration, and inside knowledge on how Spree works under the hood.

SUMMARY.md

Lines changed: 0 additions & 127 deletions
This file was deleted.

advanced/existing_app_tutorial.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
```ruby
66
gem 'spree' # core and API
7-
gem 'spree_backend' # Rails admin panel (optional)
7+
gem 'spree_backend' # Admin panel (optional)
8+
gem 'spree_frontend' # Storefront (optional)
89
gem 'spree_emails' # transactional emails (optional)
910
gem 'spree_sample' # dummy data like products, taxons, etc
10-
gem 'spree_auth_devise', '~> 4.3' # Devise integration (optional)
11-
gem 'spree_gateway', '~> 3.9' # payment gateways eg. Stripe, Braintree (optional)
12-
gem 'spree_i18n', '~> 5.0' # translation files (optional)
11+
gem 'spree_auth_devise' # Devise integration (optional)
12+
gem 'spree_gateway' # payment gateways eg. Stripe, Braintree (optional)
13+
gem 'spree_i18n' # translation files (optional)
1314

14-
# only needed for MacOS and Ruby 3.0
15+
# only needed for MacOS and Ruby 3+
1516
gem 'sassc', github: 'sass/sassc-ruby', branch: 'master'
1617
```
1718

@@ -25,23 +26,23 @@ gem 'sassc', github: 'sass/sassc-ruby', branch: 'master'
2526

2627
```
2728
bin/rails g spree:install --user_class=Spree::User
29+
bin/rails g spree:backend:install
30+
bin/rails g spree:frontend:install
2831
bin/rails g spree:auth:install
2932
bin/rails g spree_gateway:install
30-
bin/rails javascript:install:esbuild
31-
bin/rails g spree:backend:install
3233
```
3334

3435
### Installation options
3536

3637
By default, the installation generator (`rails g spree:install`) will run migrations as well as adding seed. This can be disabled using
3738

38-
```
39+
```bash
3940
bin/rails g spree:install --migrate=false --sample=false --seed=false
4041
```
4142

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

44-
```
45+
```bash
4546
bin/rake railties:install:migrations
4647
bin/rails db:migrate
4748
bin/rails db:seed
@@ -78,7 +79,7 @@ To stop the webserver, hit Ctrl-C in the terminal window where it's running. In
7879

7980
#### Logging Into the Admin Panel
8081

81-
The next thing you'll probably want to do is to log into the admin interface. Use your browser window to navigate to [http://localhost:4000/admin](http://localhost:4000/admin). You can log in with the username `[email protected]` and password `spree123`.
82+
The next thing you'll probably want to do is to log into the admin interface. Use your browser window to navigate to [http://localhost:3000/admin](http://localhost:3000/admin). You can log in with the username `[email protected]` and password `spree123`.
8283

8384
Upon successful authentication, you should see the admin screen:
8485

api/getting-started-with-spree-api.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
# Getting Started with Spree API
22

3-
Spree comes with a fully-featured API that allows it to operate in a fully headless mode.
4-
5-
To use the APIs, install the `spree_api` gem with a version corresponding to your version of Spree. If you're using [spree\_starter](https://github.com/spree/spree\_starter) as a base for your project, the API will be included out of the box.
6-
3+
Spree comes with a fully-featured API that allows it to operate in a fully headless mode (if you wish). This means that you can use Spree as a backend for your custom storefront, mobile app, or any other application that needs to interact with an e-commerce platform.
74

5+
To use the APIs, install the `spree_api` gem with a version corresponding to your version of Spree. If you're using [spree\_starter](https://github.com/spree/spree\_starter) as a base for your project or you have the `spree` gem in your `Gemfile` the API will be included out of the box.
86

97
Currently there are two types of APIs:
108

119
* [Storefront API](storefront-api/) - that's designed to allow customers to interact with the store via external applications (e.g. Vue Storefront or a dedicated mobile app).
1210
* [Platform API](platform-api/) - that provides management capabilities, allowing third party apps to perform actions otherwise available via the admin panel.
1311

14-
15-
16-
Spree also offers a legacy v1 API, that's been extracted to `spree_api_v1`gem in Spree 4.5. It uses an outdated architecture and is now deprecated.
12+
Spree also offers a legacy v1 API, that's been extracted to `spree_api_v1` gem in Spree 4.5. It is not recommended to use it in new projects, but it's still available for existing ones.

api/platform-api/authenticating-requests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Once the application is configured inside Spree, you can use its credentials to
2828

2929
To obtain the token, send the following `POST` request to `/spree_oauth/token`
3030

31-
```
31+
```json
3232
{
3333
"grant_type": "client_credentials",
3434
"client_id": "xxx",

api/storefront-api/authenticating-requests.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Storefront API requires authorization only for certain actions associated with u
66

77
To obtain a token, send the following `POST` request to `/spree_oauth/token`
88

9-
```
9+
```json
1010
{
1111
"grant_type": "password",
1212
"username": "[email protected]",
@@ -22,7 +22,7 @@ OAuth tokens obtained via the previous step are valid only for a specific time.
2222

2323
To refresh a token, send the following `POST` request to `/spree_oauth/token`
2424

25-
```
25+
```json
2626
{
2727
"grant_type": "refresh_token",
2828
"refresh_token": "xxx"
@@ -35,6 +35,12 @@ In the response, you'll receive a new bearer token to use when accessing the API
3535

3636
Endpoints under `/api/v2/storefront/cart` and `/api/v2/storefront/checkout` paths also allow interactions without bearer token, which allows building guest checkouts.
3737

38-
When you first create a cart via `POST /api/v2/storefront/cart`, you'll receive a response containing an empty cart. This response also contains a `token` field. 
38+
When you first create a cart via:
39+
40+
```http
41+
POST /api/v2/storefront/cart
42+
```
43+
44+
You'll receive a response containing an empty cart. This response also contains a `token` field. 
3945

4046
You can store this token in the frontend session and pass it in a `X-Spree-Order-Token: {token}` header. 

cli/contributing-to-spree-cli.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

cli/getting-started-with-spree-cli.md

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)