anhtnt90 / dreamhouse-web-app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DreamHouse Web App

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:

Demo

This app is built with Ionic and Node.js so you can easily run it locally and on Heroku.

Run Locally:

  1. Install and start Postgres
  2. Install Node.js
  3. Create a database in Postgres named dreamhouse
  4. Fetch the NPM dependencies: npm install
  5. Start the app: npm run dev
  6. Check out the app: http://localhost:8200/

Run on Heroku:

  1. Deploy on Heroku
  2. Check out the app: http://<YOUR APP NAME>.herokuapp.com

Use Heroku Connect:

  1. Signup for a Salesforce Developer Org
  2. Install the DreamHouse package into the org
  3. Add the Heroku Connect Addon to your Heroku app
  4. 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
  5. 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
  6. Add a read-only mapping for Broker__c with the fields: email__c, mobile_phone__c, phone__c, picture__c, title__c
  7. 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 of 36, Unique - case insensetive and check the External ID box
  8. Create a read-write mapping in Heroku Connect for Favorite__c with id__c selected for the unique id for writes and add the property__c field to the mapping
  9. Restart the app so the new database tables are used
  10. Check out the app and verify that sync works by changing a property's price in Salesforce

About


Languages

Language:CSS 43.8%Language:TypeScript 29.3%Language:HTML 19.7%Language:JavaScript 7.3%