This sample app is a mobile web app for DreamHouse that runs on Heroku and optionally uses Heroku Connect to get data from Salesforce. Check out a demo:
This app is built with Ionic and Node.js so you can easily run it locally and on Heroku.
Run Locally:
- Install and start Postgres
- Install Node.js
- Create a database in Postgres named
dreamhouse
- Fetch the NPM dependencies:
npm install
- Start the app:
npm run dev
- Check out the app: http://localhost:8200/
Run on Heroku:
Use Heroku Connect:
- Signup for a Salesforce Developer Org
- Install the DreamHouse package into the org
- Add the Heroku Connect Addon to your Heroku app
- Setup Heroku Connect by clicking on Heroku Connect in the Resources tab of the app's management dashboard:
https://dashboard.heroku.com/apps/YOUR_APP_NAME/resources
- Add a read-only mapping for
Property__c
with the fields:address__c, baths__c, beds__c, broker__c, city__c, description__c, location__latitude__s, location__longitude__s, picture__c, price__c, state__c, tags__c, thumbnail__c, title__c
- Add a read-only mapping for
Broker__c
with the fields:email__c, mobile_phone__c, phone__c, picture__c, title__c
- In Salesforce Setup's Object Manager, navigate to the Fields & Relationships for the Favorite object and add a new Text field with a label of
Id
, length of36
, Unique - case insensetive and check the External ID box - Create a read-write mapping in Heroku Connect for
Favorite__c
withid__c
selected for the unique id for writes and add theproperty__c
field to the mapping - Restart the app so the new database tables are used
- Check out the app and verify that sync works by changing a property's price in Salesforce