Setup Checklist
Setup Checklist for Whitelabel Portal
Client Requirements
MagLoft To-Do
1. Create a new Whitelabel Account in Local Development

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
# 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
# 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
Download the
.sketch
file from this link: https://drive.google.com/open?id=1WXARC2w_MlOugZSffpi5kc6vtUPl_mFdUse that
.sketch
file as a template for creating the needed assetsExport & replace all assets in the folder with the updated ones
3. Upload updated assets to CDN
# 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 theresolver
function
Allow proxy for accessing
cloud-server
from the temporary whitelabel domain eg: lighthouse.magloft.devYou can do this by adding a new regex on the if statement of the
resolver
function forcloud-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
Create new
.scss
file in thecloud-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 directoryUpdate 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)
Go to GCP Console
Go to
Network Services > Load Balancing
Click cloud-server
Click Edit
Click Front End Configuration
Click Add frontend IP and port
Fill in the forms with the following value:
Name: use a dash-separated domain name. Example: portal-libroslighthouse-com
Protocol: HTTPS
IP Version: IPv4
IP Address: Create IP Address
Port: 443
Certificate: Create a new Certificate
Click on Done
Click on Update
Last updated
Was this helpful?