> Documentation index: [Saleor](/llms.txt) · [This section](/developer/llms.txt)
> Source: https://docs.saleor.io/developer/extending/apps/developing-apps/running-saleor-apps-locally

# Running App Store locally

You can find the code for all the apps from the Saleor App Store in the [`saleor/apps` monorepo](https://github.com/saleor/apps).

Each app is a [Next.js](https://nextjs.org/docs/getting-started) application based off [saleor-app-template](https://github.com/saleor/saleor-app-template).

In this article, you will learn how to run the Saleor App Store apps locally.

<a id="prerequisites"></a>

#### Prerequisites

To work with the `saleor/apps` repository, you need to install [`pnpm`](https://pnpm.io/). If you haven't already, please do so by running:

```bash
npm install -g pnpm
```

<a id="setup"></a>

#### Setup

1.  Clone the [saleor/apps](https://github.com/saleor/apps) repository.
    
2.  Install the dependencies:
    

```bash
pnpm install
```

3.  Set environment variables by making the copy the `.env.example` file to `.env`. More details about the variables can be found in the section [below](#environment-variables).
    
4.  Start all the dev servers:
    

```bash
pnpm dev
```

You can also start an individual application with:

```bash
pnpm dev --filter=X
```

where X is the app's name (matching apps/X, e.g. "taxes").

<a id="environment-variables"></a>

#### Environment variables

info

If you want to learn more about setting environment variables in Next.js, head over to the [documentation](https://nextjs.org/docs/basic-features/environment-variables).

`SECRET_KEY` (_required_)

A randomly generated key that encrypts metadata stored in Saleor. At least eight characters long.

Although it is not required in the development, we recommend to set it. If not set, a random key will be generated on each app start.

`APL` (_optional_)

Name of the chosen implementation of the [Authentication Persistence Layer](https://github.com/saleor/saleor-app-sdk/blob/main/docs/apl.md).

When no value is provided, `FileAPL` is used by default. See `saleor-app.ts` in the app directory to see supported APLs.

`APP_LOG_LEVEL` (_optional_)

The logging level is based on which the app will decide on what messages to log.

The possible values are: `trace`, `debug`, `info`, `warn`, `error`, `fatal`, and `silent`. The default value is `silent` which means no logs will be printed.

You can read more about our logger in [its documentation](https://getpino.io/#/docs/api?id=loggerlevel-string-gettersetter).

`ALLOWED_DOMAIN_PATTERN` (_optional_)

A regex pattern that prohibits the app from being installed on a Saleor instance that does not match the pattern. If not set, all installations will be allowed.

<a id="build"></a>

#### Build

To build all apps, run:

```bash
pnpm build
```

<a id="forking"></a>

#### Forking

Saleor App Store is a Saleor Cloud feature, but almost all apps are open source and can be used under the [BSD-3 license](https://github.com/saleor/apps/blob/main/LICENSE).

When forking, you are most likely interested in an individual app. This monorepo, however, contains all of the Saleor apps.

Luckily, you can still fork and be able to track and merge the original source code with two strategies:

1.  **Delete unused apps**

The repository contains apps and packages which are imported by apps. Apps never import other apps, so you can safely delete them.

When you remove all the apps except the one you need, Turborepo will continue to work the same way.

Additionally, you can run scripts per individual apps with `turbo run SCRIPT --filter=saleor-app-NAME`.

We recommend not removing anything else to avoid unnecessary conflicts.

If you want to update the repository, you can still merge or rebase it with the original source code. You may face conflicts for apps you don't have anymore, but you can safely delete them again during conflict resolution.

2.  **Keep everything**

To avoid conflicts to a minimum, you can leave other apps and ignore them. These tips can help you with a single app experience:

-   Mark other app folders as "excluded" in your IDE to avoid indexing these files.
-   Run your scripts with Turborepo filters, e.g. `turbo run SCRIPT --filter=saleor-app-NAME`.
-   Use `pnpm` to avoid duplicated packages. `pnpm` installs packages once and links them, which causes minimal performance overhead of node\_modules.
