Modeify is an open-source platform for multimodal commuter engagement. Utilizing the latest advances in open transportation technology, Modeify uses personalized outreach to promote commuter behavior change and improve outcomes for travelers, employers, and transportation demand management (TDM) providers.
Development of Modeify is supported by the Mobility Lab Transit Tech Initiative.
Clone to your local directory to begin.
$ git clone git@github.com:conveyal/modeify.git
$ cd modeify
- Node.js version
6.x.x
- Yarn
- R5 url endpoint
- MongoDB
- Mapbox access token and a map id
- Mapzen Search api key
- Auth0
An example configuration can be found in configurations/default
. Copy that directory and edit the settings.yml
and env.yml
files. Add your
MONGODB_URL
toenv.yml
.- Mapbox
access_token
andmap_id
tosettings.yml
. - Mapzen Search
api_key
tosettings.yml
. - R5 url endpoint to
settings.yml
. - Auth0
AUTH0_CLIENT_ID
,AUTH0_DOMAIN
,AUTH0_NON_INTERACTIVE_CLIENT_ID
,AUTH0_NON_INTERACTIVE_CLIENT_SECRET
, andAUTH0_SECRET
toenv.yml
. - Auth0 logo and primary color in
lock > theme
insettings.yml
.
If you have configuration specific images run ./bin/set-deployment ../path/to/your/configuration/directory
to use them.
If Modeify is configured correctly (above) then you will be able to run with npm start
. This will
- Install all of the dependencies.
- Run the node server with automatic restarts using nodemon. It watches for changes in the
/lib
directory. - Build the
client/planner-app
andclient/manager-app
and rebuilds on changes.
Once it starts, you will be able to find the planner at http://localhost:5000 and the manager at http://localhost:5000/manager.
To point it at a different configuration directory run:
$ npm start -- ../path/to/configuration/directory
This repository is setup to deploy automatically to Heroku. All commits to the dev branch will be deployed to staging and all commits to master will be deployed to production. Pull requests will create review apps that run on Heroku Hobby Dynos. The review apps will build their client side files locally while the staging and production apps retrieve their assets from AWS and they need to be deployed manually.
Heroku will run the node server with
$ node lib/server.js
All variables in env.yml
must be set manually as Heroku environment variables. They can be set via the command line with:
$ heroku config:set VARIABLE_NAME=value --app heroku-app-name
The settings.yml
is retrieved from Heroku apps via the MODEIFY_CONFIG
environment variable. To set that value you can run the bin/push-settings-to-heroku
script:
$ ./bin/push-settings-to-heroku ../path/to/configuration/settings.yml heroku-app-name
Deployment is done with mastarm
. See mastarm#deploy for more info on configuration.
$ mastarm deploy --minify --env production --config ../configurations/modeify