# Developer Portal (Beta)

If you prefer a GUI to manage your deployments over a terminal based CLI, you can manage this from within the Developer Portal itself. When you have been enabled as part of the public beta, you will see both a top level navigation item `IaaS`, that gives you an overview dashboard of your pipelines, plus, each app has a Pipeline configuration page.

The first step to deploy an app is to visit the app detail page in the developer portal at `/apps/:id` If you are part of the beta and have pipelines enabled, you will see a new "Pipeline" menu item for your client side authenticated apps.

### Getting Started - Pre Existing Apps

For apps that pre-exist the IaaS service, this was not possible so you will see this screen:

<figure><img src="/files/gJ7hweuf65auL51ojn0E" alt=""><figcaption></figcaption></figure>

From here you should hit "Create Pipeline" to take you to the new pipeline page.

<figure><img src="/files/OI8abEEUqwf5IZE0xFtj" alt=""><figcaption></figcaption></figure>

From here, you need to tell us about your application, the repo (we support Github and BitBucket), the main branch, the command in your package.json that builds the app and the directory your assets are output to.

On saving this config, you have pre-provisioned an app and you will return to the Pre provisioned app screen.

<figure><img src="/files/GZ5jYYYj909IDws84hfr" alt=""><figcaption></figcaption></figure>

You should now hit "Provision", to build your initial infrastructure on our services. This can take a minute or two. You can also move on to the [Next Steps](#next-steps-all-apps) section below.

### Getting Started - New Apps

If you created a new application, we pre-provision a Pipeline for your application by default. Visiting the "Pipeline" tab you will see this page:

<figure><img src="/files/7R2G8My4c3uZGD6ThflR" alt=""><figcaption></figcaption></figure>

Note the state of the application is "Pre provisioned". This means we have a shell pipeline and have reserved a domain name for your app in our infra.

{% hint style="info" %}
Please be aware, there is sometimes a slight delay between creating an app and the pipeline being available. We are actively working on a fix for this but as a workaround if you don't see the pipeline immediately, a page refresh will solve.&#x20;
{% endhint %}

The first step is to provision your app by hitting the "Provision" button. This will build your initial infrastructure on our services and can take a minute or two.&#x20;

![](/files/6MncAqPhNFxlVIifnHSh)

The next step is to configure your app by clicking on the "Configure" tab or the left hand side button.

![](/files/JkvQf2Sw0emvsvkAdLsY)

On the configure screen, you need to tell us about your application, the repo (we support Github and BitBucket), the main branch, the command in your package.json that builds the app and the directory your assets are output to.&#x20;

<figure><img src="/files/COp6MEu5g6XXaivfUePv" alt=""><figcaption></figcaption></figure>

Hit save config and return to the deployments page. You can then move on to the [Next Steps](#next-steps-all-apps) section below.

![](/files/qGH86ZjhlFyS9xn85iAE)

### Next Steps - All Apps

When you have done this, if your app is on Github, you will need to install our Github App from [this page](https://github.com/apps/reapit) following the steps to configure for your repo. This gives us the permission to pull from your repo and receive webhooks that inform us when you git push to your main branch.&#x20;

For Bitbucket the process is the same but you will need to install the [dedicated app here.](https://bitbucket.org/site/addons/authorize?addon_key=reapit)

{% hint style="info" %}
You should only install the Github / Bitbucket app for a single repo, not your whole organisation as it sets up a webhook on an app by app basis. If you delete your app or pipeline, and set up a new one for your repo, you need to uninstall and re-install the Github app each time.&#x20;
{% endhint %}

Having installed the app, you are ready to do your first build. Hit the "deploy" button.

![](/files/vAP36wevMaWO9VL3tKPs)

The page will start to update in live time as we pull, build and deploy your code.

![](/files/wg7rdy7JmY5HZ7PITBxj)

And that's it! On completion of all the steps, you can then visit your deployed application using the Location Link.

![](/files/Oq6OBt5IJhPFcnCWiim9)

### Additional Features

#### Logs

You can view the logs of your deployment to check for any build errors. These are visible from the slide down in the deployments table you can see above. They will be in plain text form and will open in a new tab in your browser to download.

#### Pushing to master

When you have set up your pipeline, you can trigger a build by simply pushing to master (or your default branch). This is especially useful for setting up CI / CD pipelines with third party providers, if you want to trigger a build on Pull Requests, or if you need to do a local deployment without logging into the dev portal.

Deployments from the master branch are noted as 'Git pushed' in the deployments table.

![](/files/wH2Fcow66geJYaebSIMo)

#### Deleting Pipelines

You can delete pipelines from the pipeline deployments page however, a couple of things to note.&#x20;

Firstly, it will tear down all of your current infra and delete the pipeline record. This means any testing or users that are relying on your deployment will not be able to access the url again. You can create a new pipeline but you can't specify the same location (url), as before.

Secondly, the command issues a request to delete the infra. This process is quite lengthy so you should check back after a few minutes to verify everything has been torn down. See below for an example of a pipeline in it's deletion state.

![](/files/YXHisDbTs1pRynd8wur8)

#### Environment Variables

You can add your Environment variables for your application here. If you supply any key value pair we will write them to the process.ENV object at compile time when building your app.

You can then reference them in your code with the line, where `FOO` is the key of your variable.

`process.env.FOO`

All variables are stored in a secure and encrypted format however, if you are building a web app environment variables are inherently insecure. As such, you should only store values that can be exposed on the client side.

Currently we do not surface your variables over an API when you have stored them for security reasons. If you need to confirm a variable value, we would advise updating it and re-deploying your app.

See below for the Environment Variables UI:

<figure><img src="/files/MxEnGSk5KTOJiKRBvbTn" alt=""><figcaption></figcaption></figure>

#### API Keys

API keys are used by the Reapit CLI to authenticate against our Pipeline endpoints. You don't need them unless you intent to use the CLI. For more on this see [Configuring the CLI here](/app-development/iaas/cli-beta.md#configure-the-cli)

### Pipeline Dashboard

From the top level nav you can also view the IaaS pipeline dashboard that gives you an overview of the current statuses of all your app pipelines. By expanding each row, you have quick links to the deployed app, your Pipeline config and the recent app deployments.

![](/files/5CYoZ6VpHDLHXEsHKCaQ)

### Troubleshooting&#x20;

We will try to update this section regularly with frequently asked questions while we are in beta.

* **My deployment fails immediately after hitting deploy.**  First check you have the Github app installed. Then check you have installed for a single repo, not your whole organisation as it sets up a webhook on an app by app basis. If you delete your app or pipeline, and set up a new one for your repo, you need to uninstall and re-install the Github app each time. Secondly check your config is correct from the "Configure" tab, specifically the repo url. Any errors in the url will mean we can't find or build your app correctly.
* **My deployment fails at one of the build steps.** This is likely because of an issue building you app itself. Check the download logs button in the expandable pipeline table row for build errors and check if you can replicate locally. Also check your config to ensure the build directory, build task and package manager are correct. Any errors here can cause build issues.
* **My app deployed but I see a re-direct mismatch error when first clicking on the link.** We update your app re-direct uris when provisioning a pipeline however, if this fails you may need to update them manually to the location of your deployed app from the `apps/:id/edit` page,  authentication tab. Also, check the client id for your app is the correct one for your pipeline. Redirect URIs are specific to client ids so must match the data we hold on your app.


---

# 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://foundations-documentation.reapit.cloud/app-development/iaas/developer-portal-beta.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.
