# Getting started

URL: https://shoptet.dev/tools-resources/addons-repository/getting-started

## Before you start

About Git
If you are not familiar with Git and GitHub, please see the [useful links](/tools-resources/addons-repository/links/) and check the tutorials before you start.

You need a [GitHub account](https://github.com/join) . Using the Addon Repository doesn't require a [paid account](https://github.com/pricing) .

You also need the Addon Repository enabled on your Partner e-shop. Please contact your Partner Manager.

## Installation

### Enable the Addon Repository module

In the administration, open the detail of the addon you want to use and, in the **Codes** tab, enter the URL of the repository in the **Url of the GitHub repository** field, for example `https://github.com/your-organization/your-addon/` . The URL must start with `https://` ; `www.` and the trailing slash are optional. The owner and the repository name may contain only letters, digits, hyphens and underscores – a repository with a dot in its name (for example `my.addon` ) is rejected, so rename it first.

Fill in the URL before the first deployment – a deployment of a repository that is not connected to any addon ends with an error.

Once the repository URL is set, the HTML code editors in the **Codes** tab are no longer shown — the addon's code is managed through the repository only. The field cannot be cleared in the administration; to disconnect the addon from the repository, see [Uninstallation](/tools-resources/addons-repository/uninstallation/) .

warning
Each repository should contain exactly one addon. This keeps the repository structure clean and organized. If you have special needs, e.g. a monorepo, contact your Partner Manager.

![](https://res.cloudinary.com/shoptet/image/upload/q_auto/f_auto/v1/developers/addon_repository/addon_settings?_a=DAJKG5E/ZAA0)

### Install the GitHub app

[Installation link](https://github.com/apps/shoptet-addon-repository)

You can install the app either on a single repository or on all of your repositories. We recommend the single repository option for more precise control and flexibility.

![](https://res.cloudinary.com/shoptet/image/upload/q_auto/f_auto/v1/developers/addon_repository/gh_app_install?_a=DAJKG5E/ZAA0)
Make sure your repository has at least one initial commit. After the installation, a file named `.github/workflows/shoptetAddon.workflow.yml` is added to your repository automatically, and the installation process invites a collaborator to the repository. Once these steps are completed, you can proceed with the deployment.

### Folder structure

The Addon Repository relies on a specific directory structure when deploying. To deploy a visual addon successfully, you must follow this structure. If you used the [Visual Addon Boilerplate](/tools-resources/visual-addon-boilerplate/) , the structure is already in place. Otherwise, follow the structure outlined below:

```text
my-addon/
├─ assets/
│  ├─ font.ttf
│  ├─ picture.png
├─ src/
│  ├─ footer/
│  │  ├─ script1.js
│  │  ├─ script2.js
│  ├─ header/
│  │  ├─ markup.html
│  │  ├─ style.css
│  ├─ orderFinale/
│  │  ├─ remarketing.js
```

How the build turns this structure into the deployed files is described in [Under the hood](/tools-resources/addons-repository/under-the-hood/) .

### Create a new branch and PR

To create a branch and a pull request (PR), follow the GitHub guide [Creating a pull request](https://docs.github.com/en/pull-requests/how-tos/create-pull-requests/creating-a-pull-request) .

The application will automatically:

1. Add a check for the reviewer.
2. Add a check for changes to the workflow file.
3. Add a notification not to merge the PR yourself.
The merge should be performed by a Shoptet reviewer to ensure a smooth workflow.

The application can also open the pull request for you: push a commit whose message contains `Addon check PR` to your branch, and it opens a pull request titled "Addon check pull request" from that branch into the default branch. The match is case-insensitive and applies to the last commit of the push.

### Deployment

A push (or merge) to the `main` / `master` branch deploys the addon automatically. To deploy another branch, for example to test an unapproved addon, go to **Actions → Deploy current version → Run workflow** and select the branch.

![](https://res.cloudinary.com/shoptet/image/upload/q_auto/f_auto/v1/developers/addon_repository/gh_action_build?_a=DAJKG5E/ZAA0)
The application creates a deployment, which should appear as `green` . The green status indicates that the addon's code has been successfully uploaded to the Content Delivery Network (CDN), so the deployment was successful and the addon is ready for use.

![](https://res.cloudinary.com/shoptet/image/upload/q_auto/f_auto/v1/developers/addon_repository/deployment?_a=DAJKG5E/ZAA0)
