# Types of frontstores

## Custom-made frontstore

First way is to create everything on your own with direct cooperation with your client. In this scenario, your next step is the [API section](https://demo.theshop.dev/api).

## Frontstore as a TheShop template

TheShop provides basic frontstore templates that are ready to be used for any e-shop. This template contains all features compatible with TheShop API and it is always up-to-date. You need to [install](#installation) and connect this template to TheShop API.

As TheShop development partner, you will gain access to template repositories. Each of these repositories are maintained by TheShop, so you need to make your own copy of the repository and continue working on these copies.

The following templates are currently available:

* [x] Laravel 8.x – see [TheShop demo frontstore](https://frontstore.theshop.sk/en)
* [ ] Vue.js – *TBA*
* [ ] React – *TBA*

## Template installation

To install the TheShop template, follow the steps below for each of the supported frameworks:

#### Laravel 8.x

1. `git clone https://github.com/theshopdev/frontstore`
2. `mv frontstore my-shop`
3. `cd my-shop`
4. `rm -rf .git`
5. `cp .env.example .env`
6. You need to fill .env file with these mandatory values to run the app. Others values are optional.<br>

   `THESHOP_CATALOG=` – this is the catalog from which the data are retrieved. By default, this is `coreSK` for a demo template, but for TheShop production environment, it's based on the first installation.<br>

   `THESHOP_API_KEY=` – for the demo environment, we will provide you an API key. For TheShop production, you will generate your own API key. In TheShop administration, navigate to **Settings** → **API**, expand **Developer API** and click **Generate new API key**.<br>

   `THESHOP_API_ENDPOINT=` – by default, this is `https://demo.theshop.dev/api/`. For your production environment, it will be based on the domain installation, for example: `https://yourdomain.com/api/`.\
   \
   Do not use `https://yourdomain.com/api/v1` or `https://yourdomain.com/api/v2`, as the API client uses both versions as needed.<br>
7. Configure the following:

   ```php
   config/defaults.php:8
   ```

   and

   ```php
   config/defaults.php:13
   ```
8. Run Docker Desktop.
9. Install composer dependencies:

   ```php
   docker run --rm \
       -u "$(id -u):$(id -g)" \
       -v $(pwd):/var/www/html \
       -w /var/www/html \
       laravelsail/php81-composer:latest \
       composer install --ignore-platform-reqs
   ```
10. `sail up -d`
11. `sail artisan key:generate`
12. `sail npm i`
13. `sail npm run dev`
14. Store will be available on <http://localhost:8080>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.theshop.dev/docs/frontstore/introduction/types-of-frontstores.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
