Skip to content

Developer Onboarding

Necessary Tools

  • Outlook
  • BitBucket
  • JIRA/Confluence
  • Slack

Setting up a dev environment

Step 1: Necessary Software

Download the following:

  • Brew
    • /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Composer
    • brew install composer
  • Git
    • Should already be installed
    • brew install git
  • Node / NPM
    • Specify version 8 or Portal components will not install
    • brew install node@8
  • Grunt
    • brew install grunt
  • Bower
    • brew install bower
  • MAMP / MAMP Pro (MAMP = Mac, Apache, MySQL, PHP)
    • brew cask install mamp

Step 2: App

Set up App

  • Clone the repository
  • Composer Install
    • Command: composer install
  • NPM Install
    • Command: npm install
  • Clone .env from example:
    • Command: cp .env.example .env
  • Generate application key:
    • Command: php artisan key:generate

Setup Database (App)

  • Open a SQL tool such as PHPMyADMIN, MySQL Workbench, etc…
    • PHPMyADMIN is installed automatically when you install MAMP/WAMP/LAMP (http://localhost:8888/phpmyadmin)
  • Create a new database
    • DB name: app_dev
  • Import SQL file to database
    • SQL file path: /app/resources/sql/db_structure.sql
  • Add database info into .env file

    • DB_HOST:localhost:8889
    • DB_DATABASE:app_dev
    • DB_USER:root
    • DB_PASS:root
  • Ensure that CACHE_DRIVER is set to file in the .env file

  • Migrate the database:
    • Command: php artisan migrate --seed
  • Clear Cache and Routes
    • Command: php artisan cache:clear
    • Command: php artisan route:cache

Step 3: OAuth

Setup OAuth

  • Clone the repository
  • Composer Install
    • Command: composer install
  • NPM Install
    • Command: npm install
  • Clone .env from example:
    • Command: cp .env.example .env
  • Insert app_key from App created above

Setup OAuth Database

  • Open .env file and
    • Change DB_CONNECTION to app
    • Remove DB_*_PORT options
    • Set DB_SSO_HOST and DB_APP_HOST to localhost:8889
    • DBs DB_APP and DB_SSO should have the same db creds.
      • This will be the same DB that you used in the app above (app_dev)

Finish OAuth Setup

  • Install Passport
    • Command: php artisan passport:install
  • Two keys and two client secrets keys should be generated.
    • Copy keys from /oauth/storage/ to /app/storage.
      • Key names: oauth-private.key && oath-public.key
    • Set permissions for the keys, under the app project.
      • Command #1: chmod 600 /app/storage/oauth-private.key
      • Command #2: chmod 600 /app/storage/oauth-public.key
    • Remember the passwords that were generated from this step.

Step 4: Portal

Setup the portal

  • Clone the repo from bitbucket
  • NPM Install
    • Command: npm install
  • Bower Install
    • Command: bower install
  • Create config.js file
    • File path: /portal/scr/scripts/
    • I will provide content for the file
    • Update the client id and secret key based on the passport:install from the steps above
    • Build Application
      • Command: grunt build

Step 5: Accounts

Setup accounts

  • Under App:
    • Example Command: php artisan qa:data --prefix=test this will prefix all accounts with 'test' (testplatform@gmail.com)

Step 6: Run

Run Applications

  • App
    • Command: php artisan serve --port=8000
  • OAuth
    • Command: php artisan serve --port=8080
  • Portal
    • Command: grunt serve