Skip to content
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.

feedadoc/feedadoc

Repository files navigation

HospitalHero (previously known as Feed a Doc)

This project has now ended. Thank you to all our wonderful volunteers who made it possible. For posterity, there are images of the site as it was at the end of 2020 in hospitalhero-images/.

HospitalHero connects healthcare workers (docs, nurses, specialists, support staff) with volunteers who can provide basic needs during the COVID-19 pandemic response. Please share with anyone you know who needs assistance or can provide it!

We'd love your help! Please join us in Slack.

Tech Stack

Development

The below steps assume you've forked and cloned the repo to your local machine.

Running Ruby and Postgres locally

  1. Bootstrap postgres with Docker or locally
  2. Install Ruby v2.7.0 (see .ruby-version; also, we recommend rvm to manage ruby versions.)
  3. Run bundle
  4. Install Yarn (On OS X: brew install yarn)
  5. Run yarn
  6. Run rails db:create db:migrate
  7. In one Terminal window, run bin/webpack-dev-server. In a second window, run rails s.
  8. Visit http://localhost:3000
  9. If working with emails, map localhost to mailcatcher in your /etc/hosts file and run gem install --no-document mailcatcher && mailcatcher in another window.

Running Postgres with Docker

Install Docker and docker-compose

  1. docker-compose up -d
  2. Prefix rails commands with the database url, like this: export DATABASE_URL="postgresql://127.0.0.1/feedadoc_development?pool=5" && rails s

Running Postgress Locally

Install Postgres (on OS X you can use brew to install it or run Postgres.app

  1. Use psql to create a PG user called feedadoc.
CREATE USER feedadoc WITH SUPERUSER PASSWORD 'password1';

GraphiQL

Visit http://localhost:3000/graphiql to access the in-browser GraphQL IDE.