> For the complete documentation index, see [llms.txt](https://magloft.gitbook.io/whitelabel-portal-checklist/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://magloft.gitbook.io/whitelabel-portal-checklist/master.md).

# Setup Checklist

## Client Requirements

* [ ] Provide a Top Banner Graphic
* [ ] Provide a logo
* [ ] Provide a Color Scheme (Primary & Secondary)
* [ ] Provide a Custom Font if needed
* [ ] Set an **A** record on their DNS
  * [ ] **If they doesn't ask for HTTPS** then DNS record to our server at **`35.186.231.220`**
  * [ ] **If they ask for HTTPS** then the IP will be sent after the Whitelabel setup is completed

## MagLoft To-Do

### 1. Create a new Whitelabel Account in Local Development

![](/files/-Lvn0eLF_OqWyB-dCHnn)

Fields:

* **Identifier :** The white-label account identifier, usually the same as the name but all lower-case
* **Name:** The white-label account name
* **Host:** Domain for accessing the white-label portal, use temporary one for development.
  * *Example:* \[identifier].magloft.dev
* **Match:** Advanced matching for the domain
* **Protocol:** This is either http/https, it depends on wether the client asks for HTTPS or not
* **Portal Version:** Portal version for this account, usually get the latest one on other white-label account
* **Lockin:**
* **Active:** Wether the white-label account is active or not
* **User:** Owner of the white-label account
* **Properties:** Properties to set for the white-label account

docs for properties whitelabel

#### Properties:

clear tmp after change whitelabel recompile when deploy create css template for

```yaml
# Required Properties

preloader_font_family: { type: String }
preloader_font_weight: { type: String }
support_url: { type: String }


# Optional Properties

app_email: { type: String }
app_link: { type: String }
graphics_package_url: { type: String }

# Intercom Properties (Set this when the user asked for Intercom)
intercom_app_id: { type: String }
intercom_secret_key: { type: String }
intercom_visitor_enabled: { type: "Virtus::Attribute::Boolean", default: false }

mascot_name: { type: String }
playstore_link: { type: String }
preloader_color: { type: String }

# Custom SMTP Setting
smtp_from: { type: String }
smtp_settings: { type: Hash }
google_analytics_id: { type: String }

# Apple setting if they are a reseller or they want to build their own app
ari_first_name: { type: String }
ari_last_name: { type: String }
ari_phone_number: { type: String }
ari_email_address: { type: String }
ari_demo_user: { type: String }
ari_demo_password: { type: String }
ari_notes: { type: String }

allow_user_registration: { type: "Virtus::Attribute::Boolean", default: true }
full_access: { type: "Virtus::Attribute::Boolean", default: false }
```

### 2. Setup Whitelabel Portal Assets

#### 1. Get all required Assets from other Whitelabel Account

```bash
# Move to temporary folder
cd /tmp
# Create directory for the assets
mkdir [identifier]
# Download all assets from live CDN
gsutil -m rsync -r gs://cdn.magloft.com/assets/account/amway/ [identifier]/


# Example
cd /tmp
mkdir lighthouse
gsutil -m rsync -r gs://cdn.magloft.com/assets/account/amway/ lighthouse/
```

#### 2. Update all the required assets

1. Download the `.sketch` file from this link: <https://drive.google.com/open?id=1WXARC2w_MlOugZSffpi5kc6vtUPl_mFd>
2. Use that `.sketch` file as a template for creating the needed assets&#x20;
3. Export & replace all assets in the folder with the updated ones

#### 3. Upload updated assets to CDN

```bash
# Move to the temporary folder
cd /tmp
# Upload all UPDATED assets to live CDN
gsutil -m rsync -r [identifier]/ gs://cdn.magloft.com/assets/account/[identifier]/


#example
cd /tmp
gsutil -m rsync -r lighthouse/ gs://cdn.magloft.com/assets/account/lighthouse/
```

#### 4. Create SCSS file for styling the white-label portal

* **Setup Local Proxy**
  * Disable proxy for portal in local development so the portal will be served from the `cloud-server`
    * You can do this by simply adding `return null` on the first line of the `resolver` function
  * Allow proxy for accessing `cloud-server` from the temporary whitelabel domain *eg: lighthouse.magloft.dev*
    * You can do this by adding a new regex on the if statement of the `resolver` function for `cloud-server` proxy
  * Edit your `hosts` file so that a request to the temporary whitelabel domain is routed to localhost
* **Create new stylesheet for the whitelabel portal**
  * &#x20;Create new `.scss` file in the `cloud-server` repository, in this directory: \
    `app/assets/stylesheets/white-label/[identifier].css.scss`
  * Clear tmp by using the rake task
  * Start the `cloud-server`
  * Get all the content from other `.scss` file in the same directory
  * Update all the color code with the one that's provided by the client
* **Make sure there's no missing asset when accessing the portal**
* **Deploy the new scss file created**
  * Make sure to run the precompile and clear tmp rake task before restarting the cloud-server

### 3. Create a new Whitelabel Account in Live

This is the same thing that you did with **Step 1** but in Live environment, the only difference is that we are using the domain that's provided by the client instead of a temporary domain.

### 4. Setup SSL (Optional)

1. Go to GCP Console
2. Go to `Network Services > Load Balancing`
3. Click **cloud-server**
4. Click **Edit**
5. Click **Front End Configuration**
6. Click **Add frontend IP and port**
7. Fill in the forms with the following value:
   1. Name: use a dash-separated domain name.\
      **Example***:* portal-libroslighthouse-com
   2. Protocol: HTTPS
   3. IP Version: IPv4
   4. IP Address: Create IP Address
   5. Port: 443
   6. Certificate: Create a new Certificate
8. Click on Done
9. Click on Update

{% hint style="info" %}
When you've completed the SSL Setup you will get a new IP address for the client to point to on their DNS setting
{% endhint %}
