PawPals connects dog owners with dog walkers in their community that they can hire, with streamlined scheduling, purchasing, and real-time tracking of their dogs.
View the project Trello Board here. View the project roadmap here.
See CONTRIBUTING.md for contribution guidelines.
See the deployed app here.
- Node 6.11.2
- Redis 4.0.1
- Postgresql 9.6.5, server 9.6.4
- Yarn 1.x
brew install yarn
brew install redis
brew install postgresql
yarn global add grunt-cli knex eslint
yarn install
Override settings config/default.json
in any environment by making a copy of config/ENV.example.json
and naming it config/ENV.json
and setting the appropriate variable.
For environments that require use of environment variables, you can supply variables as defined in config/custom-environment-variables.json
.
See https://www.npmjs.com/package/config And https://github.com/lorenwest/node-config/wiki/Environment-Variables#custom-environment-variables
Follow the instructions for Passport's Google Strategy, this will require making a new project and app in that project. Fill in the Client ID, secret, and callback URL into config files. You will also need to enable the Google+ API for your project.
This project uses the Google Places API Javascript Library and the Google Static Maps API. Set up requires enabling each API in your google project and including the key wherever the API is used.
This project uses FileStack for image uploading. To use FileStack, register for an API key. Free usage is limited to 250 photos per month.
PawPals uses the Stripe API and Stripe's Connect to facilitate payments. You will need both a publishable key and a secret key, found in your developer dashboard. Set redirect URI's in your dashboard, you will need one for each URL you want to serve the app from (localhost, heroku staging, heroku produciton, etc.). Test card numbers are provided by Stripe.
Heroku requires all config variables listed in custom-environment-variables.json
and in app.json
. Most are API keys to be obtained from the other sections in this readme. The variables in custom-environment-variables.json
will be checked for in the environment by the config
npm module, so match the names (e.g. "DATABASE_URL"
will be replaced by process.env.DATABASE_URL
if it exists). If you are using a Heroku pipeline, make sure to keep callback URLs hostname specific (https://app-name-staging.herokuapp.com/callback vs https://app-name.herokuapp.com/callback).
Follow the instructions for continuous integration with Travis-CI. To access config variables needed for tests, add them to your Travis-CI environment.
IMPORTANT: ensure postgres
is running before performing these steps.
Use grunt to create a new database for your development and test environments:
Development envronment: grunt pgcreatedb:default
Other environments, specify like so: NODE_ENV=test grunt pgcreatedb:default
In terminal, from the root directory:
To migrate to the latest version, run:
knex migrate:latest --env NODE_ENV
To rollback a version, run:
knex migrate:rollback --env NODE_ENV
To populate the database with seed data, run:
knex seed:run --env NODE_ENV
Note: --env NODE_ENV
may be omitted for development. For example, knex migrate:latest
will run all migrations in the development environment, while knex migrate:latest --env test
will migrate in the test environment.
If using Heroku to deploy, migrations can be run by prepending heroku run
to all commands. For example, to migrate to latest, run:
heroku run knex migrate:latest
To run webpack build: yarn run build
To run server: yarn run start
To run tests: yarn run test
To run your redis server for the session store redis-server