Vermont National Hack for Change day application
JavaScript HTML CSS Objective-C PHP Java Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ab
android
api
api_proxy
client
dash-auth
dash
ios
welcome
.gitignore
LICENSE
PURPOSE.md
README.md
green_status.php
index.php
proxy.php

README.md

GreenUp WebClient - v0.01

Powered by XenonApps

GreenUp Repository for Client and Administration

A mobile-web client for GreenUp-VT

  • Tabbed menus
  • Interactive Maps
  • Discussion forum

###Dev Notes

#####Use of the proxy script:
For development: In order to bypass the browser's origin-based security measures, it is necessary to run a php script locally that proxies all HTTP requests to the live web-server.

Using the proxy is simple.
Instead of making requests to http://199.195.248.180:31337/api, I make a request to http://localhost/proxy.php?url=http://199.195.248.180:31337/api.

Whereas the live server would return: { "heartbeat": 1389547522 }
the proxied response looks like: { "status": "http_code": 200 }, "contents": { "heartbeat": 138954752 } }

Note: There will be a line in the ApiConnectors that identifies the origin and switches the proxy script in and out accordingly.

####Problems with SSL and Google OAuth:

The Admin dashboard uses Google Analytics data to feed some of the usage graphs, so when a user enters the admin dash he is prompted to login with google credentials. The dash uses these credentials to authenticate into google analytics, all over HTTPS. If you log in as you... you won't see analytics data, as the site will be looking for an anlytics profile for YOUR account. I am working on fixing this, but until I do, you have to log in as xenonapplab@gmai.com

Furthermore, you have to connect to your localhost using https://127.0.0.1 meaning you'll have to configure Apache to listen for ssl traffic, and generate a certificate.
Mac users, see this tutorial

License

GPLv