Skip to content

Woolpert/geoawareness-mobile-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mobile Tracker

GeoAwareness Mobile Tracker is a mobile website that emulates the customer experience for placing an order and tracking location as the customer progresses towards the store.

Prerequisites

  1. Create an API key. Mobile Tracker uses API key authentication for Google Maps and GeoAwareness APIs. Take care to follow API key best practices, including Securing an API key. The API key must have permissions for the Google Maps Platform JavaScript API, Directions API and the GeoAwareness REST API.

  2. Configure - Edit config.json for your environment with proper values.

  • "YOUR_API_KEY" - replace with the API key created from the previous step.
  • "GEOAWARENESS_REST_API_ENDPOINT" - replace with url of the geoawareness-api.
"geoawarenessRestApi": "https://api-sbx.geoawareness.woolpert.dev"

Running Locally

python3 -m http.server

The web application is available at http://locahost:8000.

Deploy to GCP

Mobile Tracker is hosted in Google Cloud Storage as a static website.

  1. Create GCS bucket. Choose a custom domain name and create a bucket.

    # create bucket
    gsutil mb gs://mobile-tracker.<your-domain> # eg. gs://mobile-tracker.geoawareness.woolpert.dev
    
    # set permissions
    gsutil iam ch allUsers:objectViewer gs://mobile-tracker.<your-domain>
    
  2. HTTPs support. Set up Cloud Load balancing for https support.

  3. Deploy website to GCS bucket.

     # remove all files
     gsutil rm -r gs://mobile-tracker.<your-domain>/*
    
     # copy static files
     gsutil cp -r src assets index.html config.json favicon.ico gs://mobile-tracker.<your-domain>
    
     # optionally remove default cache settings, useful for development and testing
     gsutil -m setmeta -r -h "Cache-Control:no-cache, max-age=0" gs://mobile-tracker.<your-domain>/*
    

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published