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
- Command:
- NPM Install
- Command:
npm install
- Command:
- Clone .env from example:
- Command:
cp .env.example .env
- Command:
- Generate application key:
- Command:
php artisan key:generate
- Command:
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:8889DB_DATABASE:app_devDB_USER:rootDB_PASS:root
-
Ensure that
CACHE_DRIVERis set tofilein the .env file - Migrate the database:
- Command:
php artisan migrate --seed
- Command:
- Clear Cache and Routes
- Command:
php artisan cache:clear - Command:
php artisan route:cache
- Command:
Step 3: OAuth
Setup OAuth
- Clone the repository
- Composer Install
- Command:
composer install
- Command:
- NPM Install
- Command:
npm install
- Command:
- Clone .env from example:
- Command:
cp .env.example .env
- Command:
- 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
- Command:
- 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
- Key names:
- 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
- Command #1:
- Remember the passwords that were generated from this step.
- Copy keys from /oauth/storage/ to /app/storage.
Step 4: Portal
Setup the portal
- Clone the repo from bitbucket
- NPM Install
- Command:
npm install
- Command:
- Bower Install
- Command:
bower install
- Command:
- 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
- Command:
Step 5: Accounts
Setup accounts
- Under App:
- Example Command:
php artisan qa:data --prefix=testthis will prefix all accounts with 'test' (testplatform@gmail.com)
- Example Command:
Step 6: Run
Run Applications
- App
- Command:
php artisan serve --port=8000
- Command:
- OAuth
- Command:
php artisan serve --port=8080
- Command:
- Portal
- Command:
grunt serve
- Command: