Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Improve structure of the documentation

Patryk Zawadzkibffe240d5739
diff --git a/docs/architecture.rst b/docs/architecture.rst
new file mode 100644
index 0000000000..5148a1ef4c
--- /dev/null
+++ b/docs/architecture.rst
@@ -0,0 +1,14 @@
+Architecture
+============
+
+.. toctree::
+ :maxdepth: 1
+
+ architecture/products
+ architecture/stock
+ architecture/orders
+ architecture/i18n
+ architecture/seo
+ architecture/search
+ architecture/payments
+ architecture/settings
diff --git a/docs/localization.rst b/docs/architecture/i18n.rst
similarity index 100%
rename from docs/localization.rst
rename to docs/architecture/i18n.rst
diff --git a/docs/orders.rst b/docs/architecture/orders.rst
similarity index 99%
rename from docs/orders.rst
rename to docs/architecture/orders.rst
index 09ae0253c3..90859420d3 100644
--- a/docs/orders.rst
+++ b/docs/architecture/orders.rst
@@ -1,4 +1,4 @@
-Order management
+Order Management
================
Orders are created after customers complete the checkout process. The `Order` object itself contains only general information about the customer's order.
diff --git a/docs/payments.rst b/docs/architecture/payments.rst
similarity index 100%
rename from docs/payments.rst
rename to docs/architecture/payments.rst
diff --git a/docs/products.rst b/docs/architecture/products.rst
similarity index 90%
rename from docs/products.rst
rename to docs/architecture/products.rst
index 64fb03dc61..f8d0856c53 100644
--- a/docs/products.rst
+++ b/docs/architecture/products.rst
@@ -1,4 +1,4 @@
-Product structure
+Product Structure
=================
Before filling your shop with products we need to introduce 3 product concepts - *product types*, *products*, *product variants*.
@@ -12,12 +12,12 @@ The book is available in hard and soft cover, so there would be 2 *product varia
Type of cover is the only attribute which creates separate variants in our store, so we use *product type* named "Book" with variants enabled and a "Cover type" *variant attribute*.
-Class diagram
+Class Diagram
-------------
-.. image:: img/product_class_tree.png
+.. image:: ../img/product_class_tree.png
-Product variants
+Product Variants
----------------
Variants are the most important objects in your shop. All cart and stock operations use variants. Even if a product doesn't have multiple variants, the store will create one under the hood.
@@ -34,7 +34,7 @@ Describes common details of a few *product variants*. When the shop displays the
Featured products are displayed on the front page.
-Product types
+Product Types
---------------
Think about types as templates for your products. Multiple *products* can use the same product type.
@@ -105,7 +105,7 @@ Your shop sells Coffee from around the world. Customer can order 1kg, 500g and 2
============ ================ ================= =================================
Product type Name Country of origin Description
============ ================ ================= =================================
- Coffee Best Java Coffee Indonesia Best coffee found on Java island!
+ Coffee Best Java Coffee Indonesia Best coffee found on Java island!
============ ================ ================= =================================
.. table:: Variants
@@ -149,6 +149,6 @@ You have great selection of online games items. Each item is unique, important d
============ ================ ===== ============== =========== =======================================================
Product type Name Price Game Max attack Description
============ ================ ===== ============== =========== =======================================================
- Game item Magic Fire Sword $199 Kings Online 8000 Unique sword for any fighter. Set your enemies on fire!
- Game item Rapid Pistol $2500 Target Shooter 250 Fastest pistol in the whole game.
- ============= ================ ===== ============== =========== =======================================================
+ Game item Magic Fire Sword $199 Kings Online 8000 Unique sword for any fighter. Set your enemies on fire!
+ Game item Rapid Pistol $2500 Target Shooter 250 Fastest pistol in the whole game.
+ ============ ================ ===== ============== =========== =======================================================
diff --git a/docs/architecture/search.rst b/docs/architecture/search.rst
new file mode 100644
index 0000000000..0543d72d79
--- /dev/null
+++ b/docs/architecture/search.rst
@@ -0,0 +1,10 @@
+Search
+======
+
+There are two search mechanisms available in Saleor.
+
+The default is to use PotsgreSQL. This is a fairly versatile solution that does not require any additional resources.
+
+A more sophisticated search backend can be enabled if an Elasticsearch server is available. Elasticsearch offers a lot of advanced features, such as boosting to tune the relevance of a query or "more like this" queries. See the `official Elasticsearch website <https://www.elastic.co/products/elasticsearch>`_ to read more about its features. Please note that enabling the Elasticsearch backend does not currently enable any additional features in Saleor.
+
+For installation and configuration instructions see :ref:`elasticsearch`.
diff --git a/docs/seo.rst b/docs/architecture/seo.rst
similarity index 75%
rename from docs/seo.rst
rename to docs/architecture/seo.rst
index ffdda32fe3..d81da0b8d2 100644
--- a/docs/seo.rst
+++ b/docs/architecture/seo.rst
@@ -1,4 +1,4 @@
-Search engine optimization (SEO)
+Search Engine Optimization (SEO)
================================
Out of the box Saleor will automatically handle certain aspects of how search engines see and index your products.
@@ -9,13 +9,14 @@ Sitemaps
A special resource reachable under the ``/sitemap.xml`` URL serves an up to date list of products and categories from your site in an easy to parse Sitemaps XML format understood by all major search engines.
-Meta tags
+Meta Tags
---------
Meta keywords are not used as they are ignored by all major search engines because of the abuse this feature saw in the years since it was introduced.
Meta description will be set to the product's description field. This does not affect the search engine ranking but it affects the snippet of text shown along with the search result.
+
JSON-LD
-------
@@ -24,16 +25,3 @@ All product pages contain semantic descriptions in JSON-LD `Structured Data <htt
It does not directly affect the search engine ranking but it allows search engines to better understand the data ("this is a product, it's available, it costs $10").
It allows search engines like Google to show product photos, prices, ratings etc. along with their search results.
-
-Google for Retail
------------------
-
-Saleor provides product feeds compatible with Google Merchant Center.
-
-It's available under the ``/feeds/google/`` URL.
-
-As generating this feed is quite costly, there is a separate management command responsible for generating the necessary files:
-
-.. code-block:: bash
-
- $ python manage.py update_feeds
diff --git a/docs/settings.rst b/docs/architecture/settings.rst
similarity index 100%
rename from docs/settings.rst
rename to docs/architecture/settings.rst
diff --git a/docs/stock.rst b/docs/architecture/stock.rst
similarity index 95%
rename from docs/stock.rst
rename to docs/architecture/stock.rst
index 20e6eb5729..8882828cd0 100644
--- a/docs/stock.rst
+++ b/docs/architecture/stock.rst
@@ -1,4 +1,4 @@
-Stock management
+Stock Management
================
Each product variant has a stock keeping unit (SKU) and can have any number of stock records.
@@ -12,7 +12,7 @@ Each stock record holds information about *quantity* at hand, quantity *allocate
Each stock records also has a *cost price* (the price that your store had to pay to obtain it).
-Product availability
+Product Availability
--------------------
A variant is *in stock* if at least one of its stock records has unallocated quantity.
@@ -20,7 +20,7 @@ A variant is *in stock* if at least one of its stock records has unallocated qua
The highest quantity that can be ordered is the sum of all available quantities in stock records. It allows each ordered product to be fulfilled in multiple order lines with all stock records.
-Allocating stock for new orders
+Allocating Stock for New Orders
-------------------------------
Once an order is placed, a stock records are selected to fulfil each order line. Default logic will select the stock records with the *lowest cost price* that holds enough stock. Quantity needed to fulfil the order line is immediately marked as *allocated*.
@@ -28,7 +28,7 @@ Once an order is placed, a stock records are selected to fulfil each order line.
**Example:** A customer places an order for another box of shoes and warehouse A is selected to fulfil the order. The stock records **quantity** is **5**, **quantity allocated** is now **4** and **quantity available** becomes **1**.
-Decreasing stock after shipment
+Decreasing Stock After Shipment
-------------------------------
Once a delivery group is marked as shipped, each stock record used to fulfil its lines will have both its quantity at hand and quantity allocated decreased by the number of items shipped.
diff --git a/docs/conf.py b/docs/conf.py
index e324a63dc3..ebc4a29c47 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -110,7 +110,7 @@ todo_include_todos = False
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'default'
+html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
diff --git a/docs/contentsearch.rst b/docs/contentsearch.rst
deleted file mode 100644
index fe65895176..0000000000
--- a/docs/contentsearch.rst
+++ /dev/null
@@ -1,26 +0,0 @@
-Search
-======
-
-There are two possible mechanisms supporting search in Saleor. PostgreSQL full text search capability can be used or external Elasticsearch service.
-
-
-PostgreSQL full text search
----------------------------
-
-PostgreSQL search in enabled by default, see :doc:`postgres_search` for more information.
-
-
-Elasticsearch
--------------
-
-You can integrate Saleor with Elasticsearch service, see :doc:`elasticsearch` for more.
-
-
-Which one to choose
--------------------
-
-Your preference for search backend might depend heavily on project details. PostgreSQL search uses same database as other parts of Saleor, which comes with both pros and cons, making it easy to synchronise content at cost of additional db load. It should be your backend of choice if in doubt as its less complex and easier to maintain. Continue reading on dedicated doc :doc:`postgres_search`.
-
-Elasticsearch service offers a lot of advanced features, such as boosting to tune the relevance of a query or "more like this" queries. See `official website <https://www.elastic.co/products/elasticsearch>`_ to read more about its rich features. To configure elasticsearch in Saleor see :doc:`elasticsearch`.
-
-
diff --git a/docs/contributing.rst b/docs/contributing.rst
new file mode 100644
index 0000000000..44e3e42818
--- /dev/null
+++ b/docs/contributing.rst
@@ -0,0 +1,10 @@
+Contributing Guides
+===================
+
+Please use GitHub issues and pull requests to report problems and discuss new features.
+
+
+Naming Conventions
+------------------
+
+To keep a consistent code structure we follow some rules of naming files. Templates use underscore as a word separator and static files, as they end up as a part of URL, use dashes.
diff --git a/docs/customization.rst b/docs/customization.rst
new file mode 100644
index 0000000000..ca26d32158
--- /dev/null
+++ b/docs/customization.rst
@@ -0,0 +1,12 @@
+Customizing Saleor
+==================
+
+.. toctree::
+ :maxdepth: 1
+
+ customization/docker
+ customization/templates
+ customization/frontend
+ customization/backend
+ customization/tests
+ customization/ci
diff --git a/docs/customization/backend.rst b/docs/customization/backend.rst
new file mode 100644
index 0000000000..3d3fd2a4dd
--- /dev/null
+++ b/docs/customization/backend.rst
@@ -0,0 +1,12 @@
+Working With Python Code
+========================
+
+Python dependencies
+~~~~~~~~~~~~~~~~~~~
+
+To guarantee repeatable installations all project dependencies are managed using `pip-tools <https://github.com/nvie/pip-tools>`_.
+Project's direct dependencies are listed in ``requirements.in`` and running :code:`pip-compile` generates ``requirements.txt`` that has all versions pinned.
+
+We recommend you use this workflow and keep ``requirements.txt`` under version control to make sure all computers and environments run exactly the same code.
+
+
diff --git a/docs/customization/ci.rst b/docs/customization/ci.rst
new file mode 100644
index 0000000000..ae3f1036ac
--- /dev/null
+++ b/docs/customization/ci.rst
@@ -0,0 +1,5 @@
+Continuous Integration
+======================
+
+The storefront ships with a working `CircleCI <https://circleci.com/>`_ configuration file.
+To use it log into your CircleCI account and enable your repository.
diff --git a/docs/customization/docker.rst b/docs/customization/docker.rst
new file mode 100644
index 0000000000..a26023529d
--- /dev/null
+++ b/docs/customization/docker.rst
@@ -0,0 +1,73 @@
+.. _docker_dev:
+
+Using Docker for Development
+============================
+
+Using Docker to build software allows you to run and test code without having to worry about external dependencies such as cache servers and databases.
+
+.. warning::
+
+ The following setup is only meant for local development.
+ See :ref:`docker_deployment` for production use of Docker.
+
+
+Local Prerequisites
+-------------------
+
+You will need to install Docker and
+`docker-compose <https://docs.docker.com/compose/install/>`_ before
+performing the following steps.
+
+To build assets you will need `node <https://nodejs.org/en/download/package-manager/>`_ and `webpack module bundler <https://webpack.github.io/>`_.
+
+.. note::
+
+ Our configuration exposes PostgreSQL, Redis and Elasticsearch ports. If you have problems running this docker file because of port conflicts, you can remove 'ports' section from docker-compose.yml
+
+
+Usage
+-----
+
+1. Install JavaScript dependencies
+
+ .. code-block:: bash
+
+ $ npm install
+
+
+2. Prepare static assets
+
+ .. code-block:: bash
+
+ $ npm run build-assets
+
+
+3. Build the containers using ``docker-compose``
+
+ .. code-block:: bash
+
+ $ docker-compose build
+
+
+4. Prepare the database
+
+ .. code-block:: bash
+
+ $ docker-compose run web python manage.py migrate
+ $ docker-compose run web python manage.py collectstatic
+ $ docker-compose run web python manage.py populatedb --createsuperuser
+
+ The ``--createsuperuser`` switch creates an admin account for
+ ``[email protected]`` with the password set to ``admin``.
+
+
+5. Run the containers
+
+ .. code-block:: bash
+
+ $ docker-compose up
+
+
+By default, the application is started in debug mode, will automatically reload code and is configured to listen on port ``8000``.
+
+
diff --git a/docs/customization/frontend.rst b/docs/customization/frontend.rst
new file mode 100644
index 0000000000..4be08474c7
--- /dev/null
+++ b/docs/customization/frontend.rst
@@ -0,0 +1,30 @@
+Customizing CSS and JavaScript
+==============================
+
+All static assets live in subdirectories of ``/saleor/static/``.
+
+Stylesheets are written in `Sass <http://sass-lang.com/>`_ and rely on `postcss <http://postcss.org/>`_ and `autoprefixer <https://autoprefixer.github.io/>`_ for cross-browser compatibility.
+
+JavaScript code is written according to the ES2015 standard and relies on `Babel <https://babeljs.io/>`_ for transpilation and browser-specific polyfills.
+
+Everything is compiled together using `webpack module bundler <https://webpack.github.io/>`_.
+
+The resulting files are written to ``/saleor/static/assets/`` and should not be edited manually.
+
+During development it's very convenient to have webpack automatically track changes made locally.
+This will also enable *source maps* that are extremely helpful when debugging.
+
+To run webpack in *watch* mode run:
+
+.. code-block:: bash
+
+ $ npm start
+
+.. warning::
+
+ Files produced this way are not ready for production use.
+ To prepare static assets for deployment run:
+
+ .. code-block:: bash
+
+ $ npm run build-assets --production
diff --git a/docs/customization/templates.rst b/docs/customization/templates.rst
new file mode 100644
index 0000000000..b8f272d123
--- /dev/null
+++ b/docs/customization/templates.rst
@@ -0,0 +1,6 @@
+Customizing Templates
+=====================
+
+Default storefront templates are based on `Bootstrap 4 <https://v4-alpha.getbootstrap.com/>`_.
+
+You can find the files under ``/templates/``.
diff --git a/docs/customization/tests.rst b/docs/customization/tests.rst
new file mode 100644
index 0000000000..8f135865ad
--- /dev/null
+++ b/docs/customization/tests.rst
@@ -0,0 +1,20 @@
+Running Tests
+=============
+
+Before you make any permanent changes in the code you should make sure they do not break existing functionality.
+
+The project currently contains very little front-end code so the test suite only covers backend code.
+
+To run backend tests use `pytest <http://docs.pytest.org/en/latest/>`_:
+
+.. code-block:: bash
+
+ $ py.test
+
+You can also test against all supported versions of Django and Python.
+This is usually only required if you want to contribute your changes back to Saleor.
+To do so you can use `Tox <https://tox.readthedocs.io/en/latest/>`_:
+
+.. code-block:: bash
+
+ $ tox
diff --git a/docs/deployment.rst b/docs/deployment.rst
new file mode 100644
index 0000000000..882f832614
--- /dev/null
+++ b/docs/deployment.rst
@@ -0,0 +1,9 @@
+Deployment
+==========
+
+.. toctree::
+ :maxdepth: 1
+
+ deployment/docker
+ deployment/heroku
+ deployment/s3
diff --git a/docs/deployment/docker.rst b/docs/deployment/docker.rst
new file mode 100644
index 0000000000..d0ee3f9bcd
--- /dev/null
+++ b/docs/deployment/docker.rst
@@ -0,0 +1,19 @@
+.. _docker_deployment:
+
+Docker
+======
+
+You will need to install Docker first.
+
+Before building the image make sure you have all of the front-end assets prepared for production:
+
+.. code-block:: bash
+
+ $ npm run build-assets --production
+ $ python manage.py collectstatic
+
+Then use Docker to build the image:
+
+.. code-block:: bash
+
+ $ docker build -t mystorefront .
diff --git a/docs/deploy.rst b/docs/deployment/heroku.rst
similarity index 73%
rename from docs/deploy.rst
rename to docs/deployment/heroku.rst
index 72ce1258ba..3c3a29c6e5 100644
--- a/docs/deploy.rst
+++ b/docs/deployment/heroku.rst
@@ -1,32 +1,8 @@
-Deployment
-==========
-
-.. _docker_deployment:
-
-Docker
-------
-
-You will need to install Docker first.
-
-Before building the image make sure you have all of the front-end assets prepared for production:
-
-.. code-block:: bash
-
- $ npm run build-assets --production
- $ python manage.py collectstatic
-
-Then use Docker to build the image:
-
-.. code-block:: bash
-
- $ docker build -t mystorefront .
-
-
Heroku
-------
+======
-First steps
-***********
+Configuration
+-------------
.. code-block:: bash
@@ -46,24 +22,24 @@ First steps
Heroku's storage is volatile. This means that all instances of your application will have separate disks and will lose all changes made to the local disk each time the application is restarted. The best approach is to use cloud storage such as Amazon S3. See :ref:`amazon_s3` for configuration details.
-Deploy
-******
+Deployment
+----------
.. code-block:: bash
$ git push heroku master
-Prepare the database
-********************
+Preparing the Database
+----------------------
.. code-block:: bash
$ heroku run python manage.py migrate
-Updating currency exchange rates
-********************************
+Updating Currency Exchange Rates
+--------------------------------
This needs to be run periodically. The best way to achieve this is using Heroku's Scheduler service. Let's add it to our application:
diff --git a/docs/deployment/s3.rst b/docs/deployment/s3.rst
new file mode 100644
index 0000000000..6c7e48ec10
--- /dev/null
+++ b/docs/deployment/s3.rst
@@ -0,0 +1,26 @@
+.. _amazon_s3:
+
+Storing Files on Amazon S3
+==========================
+
+If you're using containers for deployment (including Docker and Heroku) you'll want to avoid storing files in the container's volatile filesystem. This integration allows you to delegate storing such files to `Amazon's S3 service <https://aws.amazon.com/s3/>`_.
+
+Set the following environment variables to use S3 to store and serve media files:
+
+``AWS_ACCESS_KEY_ID``
+ Your AWS access key.
+
+``AWS_SECRET_ACCESS_KEY``
+ Your AWS secret access key.
+
+``AWS_MEDIA_BUCKET_NAME``
+ The S3 bucket name to use for media files.
+
+By default static files (such as CSS and JS files required to display your pages) will be served by the application server.
+
+If you intend to use S3 for your static files as well, set an additional environment variable:
+
+``AWS_STORAGE_BUCKET_NAME``
+ The S3 bucket name to use for static files.
+
+
diff --git a/docs/development.rst b/docs/development.rst
deleted file mode 100644
index 57eada0ec2..0000000000
--- a/docs/development.rst
+++ /dev/null
@@ -1,161 +0,0 @@
-Development
-===========
-
-Working with templates
-----------------------
-
-Default storefront templates are based on `Bootstrap 4 <https://v4-alpha.getbootstrap.com/>`_.
-
-You can find the files under ``/templates/``.
-
-
-Working with front-end assets
------------------------------
-
-All static assets live in subdirectories of ``/saleor/static/``.
-
-Stylesheets are written in `Sass <http://sass-lang.com/>`_ and rely on `postcss <http://postcss.org/>`_ and `autoprefixer <https://autoprefixer.github.io/>`_ for cross-browser compatibility.
-
-JavaScript code is written according to the ES2015 standard and relies on `Babel <https://babeljs.io/>`_ for transpilation and browser-specific polyfills.
-
-Everything is compiled together using `webpack module bundler <https://webpack.github.io/>`_.
-
-The resulting files are written to ``/saleor/static/assets/`` and should not be edited manually.
-
-During development it's very convenient to have webpack automatically track changes made locally.
-This will also enable *source maps* that are extremely helpful when debugging.
-
-To run webpack in *watch* mode run:
-
-.. code-block:: bash
-
- $ npm start
-
-.. warning::
-
- Files produced this way are not ready for production use.
- To prepare static assets for deployment run:
-
- .. code-block:: bash
-
- $ npm run build-assets --production
-
-
-Working with backend code
--------------------------
-
-Python dependencies
-~~~~~~~~~~~~~~~~~~~
-
-To guarantee repeatable installations all project dependencies are managed using `pip-tools <https://github.com/nvie/pip-tools>`_.
-Project's direct dependencies are listed in ``requirements.in`` and running :code:`pip-compile` generates ``requirements.txt`` that has all versions pinned.
-
-We recommend you use this workflow and keep ``requirements.txt`` under version control to make sure all computers and environments run exactly the same code.
-
-
-Running tests
--------------
-
-Before you make any permanent changes in the code you should make sure they do not break existing functionality.
-
-The project currently contains very little front-end code so the test suite only covers backend code.
-
-To run backend tests use `pytest <http://docs.pytest.org/en/latest/>`_:
-
-.. code-block:: bash
-
- $ py.test
-
-You can also test against all supported versions of Django and Python.
-This is usually only required if you want to contribute your changes back to Saleor.
-To do so you can use `Tox <https://tox.readthedocs.io/en/latest/>`_:
-
-.. code-block:: bash
-
- $ tox
-
-
-Continuous integration
-----------------------
-
-The storefront ships with a working `CircleCI <https://circleci.com/>`_ configuration file.
-To use it log into your CircleCI account and enable your repository.
-
-
-.. _docker_dev:
-
-Docker
-------
-
-Using Docker to build software allows you to run and test code without having to worry about external dependencies such as cache servers and databases.
-
-.. warning::
-
- The following setup is only meant for local development.
- See :ref:`docker_deployment` for production use of Docker.
-
-
-Local prerequisites
-*******************
-
-You will need to install Docker and
-`docker-compose <https://docs.docker.com/compose/install/>`_ before
-performing the following steps.
-
-To build assets you will need `node <https://nodejs.org/en/download/package-manager/>`_ and `webpack module bundler <https://webpack.github.io/>`_.
-
-.. note::
-
- Our configuration exposes PostgreSQL, Redis and Elasticsearch ports. If you have problems running this docker file because of port conflicts, you can remove 'ports' section from docker-compose.yml
-
-
-Usage
-*****
-
-1. Install JavaScript dependencies
-
- .. code-block:: bash
-
- $ npm install
-
-
-2. Prepare static assets
-
- .. code-block:: bash
-
- $ npm run build-assets
-
-
-3. Build the containers using ``docker-compose``
-
- .. code-block:: bash
-
- $ docker-compose build
-
-
-4. Prepare the database
-
- .. code-block:: bash
-
- $ docker-compose run web python manage.py migrate
- $ docker-compose run web python manage.py collectstatic
- $ docker-compose run web python manage.py populatedb --createsuperuser
-
- The ``--createsuperuser`` switch creates an admin account for
- ``[email protected]`` with the password set to ``admin``.
-
-
-5. Run the containers
-
- .. code-block:: bash
-
- $ docker-compose up
-
-
-By default, the application is started in debug mode, will automatically reload code and is configured to listen on port ``8000``.
-
-
-Naming conventions
-------------------
-
-To keep a consistent code structure we follow some rules of naming files. Templates use underscore as a word separator and static files, as they end up as a part of URL, use dashes.
diff --git a/docs/gettingstarted.rst b/docs/gettingstarted.rst
new file mode 100644
index 0000000000..bf55aace0b
--- /dev/null
+++ b/docs/gettingstarted.rst
@@ -0,0 +1,8 @@
+Getting Started
+===============
+
+.. toctree::
+ :maxdepth: 1
+
+ gettingstarted/installation
+ gettingstarted/configuration
diff --git a/docs/configuration.rst b/docs/gettingstarted/configuration.rst
similarity index 100%
rename from docs/configuration.rst
rename to docs/gettingstarted/configuration.rst
diff --git a/docs/installation.rst b/docs/gettingstarted/installation.rst
similarity index 99%
rename from docs/installation.rst
rename to docs/gettingstarted/installation.rst
index e401bb653a..c51eb40ebe 100644
--- a/docs/installation.rst
+++ b/docs/gettingstarted/installation.rst
@@ -1,5 +1,5 @@
-Getting started
-===============
+Installation
+============
.. note::
diff --git a/docs/index.rst b/docs/index.rst
index 8b00e67286..2b5de446b9 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -8,19 +8,12 @@ Contents:
.. toctree::
:maxdepth: 2
- installation
- configuration
- products
- stock
- orders
- settings
- contentsearch
- localization
- seo
- payments
+ gettingstarted
+ customization
+ contributing
+ architecture
integrations
- development
- deploy
+ deployment
Indices and tables
diff --git a/docs/integrations.rst b/docs/integrations.rst
index ee57f9986e..80688b27dc 100644
--- a/docs/integrations.rst
+++ b/docs/integrations.rst
@@ -1,102 +1,10 @@
Integrations
============
-.. _amazon_s3:
+.. toctree::
+ :maxdepth: 1
-Static file and media storage using Amazon S3
----------------------------------------------
-
-If you're using containers for deployment (including Docker and Heroku) you'll want to avoid storing files in the container's volatile filesystem. This integration allows you to delegate storing such files to `Amazon's S3 service <https://aws.amazon.com/s3/>`_.
-
-Set the following environment variables to use S3 to store and serve media files:
-
-``AWS_ACCESS_KEY_ID``
- Your AWS access key.
-
-``AWS_SECRET_ACCESS_KEY``
- Your AWS secret access key.
-
-``AWS_MEDIA_BUCKET_NAME``
- The S3 bucket name to use for media files.
-
-By default static files (such as CSS and JS files required to display your pages) will be served by the application server.
-
-If you intend to use S3 for your static files as well, set an additional environment variable:
-
-``AWS_STORAGE_BUCKET_NAME``
- The S3 bucket name to use for static files.
-
-
-.. _openexchangerates:
-
-Converting prices to local currencies using Open Exchange Rates
----------------------------------------------------------------
-
-This integration will allow your customers to see product prices in their local currencies.
-Local prices are only provided as an estimate, customers are still charged in your store's default currency.
-
-Before you begin you will need an `Open Exchange Rates account <https://openexchangerates.org/>`_.
-Unless you need to update the exchange rates multiple times a day the free Subscription Plan should be enough but do consider paying for the wonderful service that Open Exchange Rates provides.
-Start by signing up and creating an “App ID”.
-
-Export the following environment variable:
-
-``OPENEXCHANGERATES_API_KEY``
- Your store's Open Exchange Rates “App ID.”
-
-To update the exchange rates run the following command at least once per day:
-
-.. code-block:: bash
-
- $ python manage.py update_exchange_rates --all
-
-.. note::
-
- Heroku users can use the `Scheduler add-on <https://elements.heroku.com/addons/scheduler>`_ to automatically call the command daily at a predefined time.
-
-
-Reporting with Google Analytics
--------------------------------
-
-Because of EU law regulations, Saleor will not use any tracking cookies by default.
-
-We do however support server-side Google Analytics out of the box using `Google Analytics Measurement Protocol <https://developers.google.com/analytics/devguides/collection/protocol/v1/>`_.
-
-This is implemented using `google-measurement-protocol <https://pypi.python.org/pypi/google-measurement-protocol>`_ and does not use cookies at the cost of not reporting things impossible to track server-side like geolocation and screen resolution.
-
-To get it working you need to export the following environment variable:
-
-``GOOGLE_ANALYTICS_TRACKING_ID``
- Your page's Google “Tracking ID.“
-
-
-Send product data to Google Merchant Center
--------------------------------------------
-
-Saleor has tools for generating product feed which can be used with Google Merchant Center. Final file is compressed CSV and saved in location specified by ``saleor.data_feeds.google_merchant.FILE_PATH`` variable.
-
-To generate feed use command:
-
-.. code-block:: bash
-
- $ python manage.py update_feeds
-
-It's recommended to run this command periodically.
-
-Merchant Center has few country dependent settings, so please validate your feed at Google dashboard. You can also specify there your shipping cost, which is required feed parameter in many countries. More info be found at `Google Support pages <https://support.google.com/merchants>`_.
-
-One of required by Google fields is *brand* attribute. Feed generator checks for it in variant attribute named *brand* or *publisher* (if not, checks in product).
-
-Feed can be downloaded from url: ``http://<yourserver>/feeds/google/``
-
-
-Full text search with Elasticsearch
------------------------------------
-
-You can use optional `Elasticsearch <https://www.elastic.co/products/elasticsearch>`_ integration.
-To get it working you need to export following environment variable:
-
-``ELASTICSEARCH_URL``
- URL to Elasticsearch server, for example: `"http://localhost:9200"`. Defaults to ``None``
-
-For more details see :doc:`elasticsearch`
+ integrations/elasticsearch
+ integrations/googleanalytics
+ integrations/googleforretail
+ integrations/openexchangerates
diff --git a/docs/elasticsearch.rst b/docs/integrations/elasticsearch.rst
similarity index 99%
rename from docs/elasticsearch.rst
rename to docs/integrations/elasticsearch.rst
index 3be14b2739..ccb4fbfe1e 100644
--- a/docs/elasticsearch.rst
+++ b/docs/integrations/elasticsearch.rst
@@ -1,3 +1,5 @@
+.. _elasticsearch:
+
Elasticsearch
=============
diff --git a/docs/integrations/googleanalytics.rst b/docs/integrations/googleanalytics.rst
new file mode 100644
index 0000000000..abc479305f
--- /dev/null
+++ b/docs/integrations/googleanalytics.rst
@@ -0,0 +1,13 @@
+Google Analytics
+================
+
+Because of EU law regulations, Saleor will not use any tracking cookies by default.
+
+We do however support server-side Google Analytics out of the box using `Google Analytics Measurement Protocol <https://developers.google.com/analytics/devguides/collection/protocol/v1/>`_.
+
+This is implemented using `google-measurement-protocol <https://pypi.python.org/pypi/google-measurement-protocol>`_ and does not use cookies at the cost of not reporting things impossible to track server-side like geolocation and screen resolution.
+
+To get it working you need to export the following environment variable:
+
+``GOOGLE_ANALYTICS_TRACKING_ID``
+ Your page's Google “Tracking ID.“
diff --git a/docs/integrations/googleforretail.rst b/docs/integrations/googleforretail.rst
new file mode 100644
index 0000000000..88908cd3b6
--- /dev/null
+++ b/docs/integrations/googleforretail.rst
@@ -0,0 +1,18 @@
+Google for Retail
+=================
+
+Saleor has tools for generating product feed which can be used with Google Merchant Center. Final file is compressed CSV and saved in location specified by ``saleor.data_feeds.google_merchant.FILE_PATH`` variable.
+
+To generate feed use command:
+
+.. code-block:: bash
+
+ $ python manage.py update_feeds
+
+It's recommended to run this command periodically.
+
+Merchant Center has few country dependent settings, so please validate your feed at Google dashboard. You can also specify there your shipping cost, which is required feed parameter in many countries. More info be found at `Google Support pages <https://support.google.com/merchants>`_.
+
+One of required by Google fields is *brand* attribute. Feed generator checks for it in variant attribute named *brand* or *publisher* (if not, checks in product).
+
+Feed can be downloaded from url: ``http://<yourserver>/feeds/google/``
diff --git a/docs/integrations/openexchangerates.rst b/docs/integrations/openexchangerates.rst
new file mode 100644
index 0000000000..0cd174a4fe
--- /dev/null
+++ b/docs/integrations/openexchangerates.rst
@@ -0,0 +1,26 @@
+.. _openexchangerates:
+
+Open Exchange Rates
+===================
+
+This integration will allow your customers to see product prices in their local currencies.
+Local prices are only provided as an estimate, customers are still charged in your store's default currency.
+
+Before you begin you will need an `Open Exchange Rates account <https://openexchangerates.org/>`_.
+Unless you need to update the exchange rates multiple times a day the free Subscription Plan should be enough but do consider paying for the wonderful service that Open Exchange Rates provides.
+Start by signing up and creating an “App ID”.
+
+Export the following environment variable:
+
+``OPENEXCHANGERATES_API_KEY``
+ Your store's Open Exchange Rates “App ID.”
+
+To update the exchange rates run the following command at least once per day:
+
+.. code-block:: bash
+
+ $ python manage.py update_exchange_rates --all
+
+.. note::
+
+ Heroku users can use the `Scheduler add-on <https://elements.heroku.com/addons/scheduler>`_ to automatically call the command daily at a predefined time.
diff --git a/docs/postgres_search.rst b/docs/postgres_search.rst
deleted file mode 100644
index b118617621..0000000000
--- a/docs/postgres_search.rst
+++ /dev/null
@@ -1,35 +0,0 @@
-PostgreSQL full text search
-=============
-
-
-Installation
-------------
-
-No additional external dependency is required to enable PostgreSQL search apart from database itself.
-
-If your server runs on distribution (ex. Ubuntu) that splits postgresql package into base and contrib, both must be installed. Database extension won't work otherwise.
-
-
-Environment variables
----------------------
-
-PostgreSQL search is enabled by default if Elasticsearch is not configured. No enviroment variable is needed.
-
-
-Data indexing
--------------
-
-Index is not essential for postgres search and is not configured in Saleor by default. For performance reasons, most likely a `PostgreSQL Gin index <https://www.postgresql.org/docs/current/static/gin.html>`_ should be created on the Product for name and description fields. Reasons for choosing a particular index and configuration strongly depend on particular needs and store size, for each comes with both advantages and limitations. Please read `official PostgreSQL documentation <https://www.postgresql.org/docs/current/static/textsearch-indexes.html>`_ and consider project specifics before making decision.
-
-
-Search integration architecture
--------------------------------
-
-
-There are two backend modules defined in `backends <https://github.com/mirumee/saleor/tree/master/saleor/search/backends>`_, one for storefront and one for dashboard search. There is picker module in backends package for picking right backend, depending on configuration.
-
-
-Testing
--------
-
-Virtually all testing is done in `integration test suite <https://github.com/mirumee/saleor/blob/master/tests/test_postgresql_search.py>`_.