Skip to content

Latest commit

 

History

History
98 lines (57 loc) · 4.78 KB

README.md

File metadata and controls

98 lines (57 loc) · 4.78 KB

📡 Age UK Boost

An app to connect Age UK volunteers to people in need, without accidentally exposing unnecessary personal data.

Need help setting this app up? Get in touch with me!


Examples of the "explore tasks" feature


This app was created to help an Age UK branch run their home food delivery service during the coronavirus pandemic.

It offers out tasks, which volunteers can then claim and add to their planner.

Personal information about the person in need is only revealed once a volunteer has claimed a task. Soon after a task is marked as done, it will disappear from the volunteer's planner.

Users log in by verifying their phone number using a single-use code - this way it's friendly for volunteers who don't often use email, and for coordinators who may already be organising using WhatsApp groups or similar.

It can work standalone, but works best when tasks are synced from an existing tool, like a Google Sheet or CRM.

Here are some user stories and journeys the app forms a part of.

🧱 How it's made

It's a Rails application backed by a PostgreSQL database.

It has a built-in admin dashboard accessible to authorised users, powered by Administrate.

It uses Twilio to send SMS messages, including to send one-time login codes

It uses Nominatim's free geocoding service to convert postcodes into longitude and latitude data. Beware that Nominatim has an acceptable use policy.

💻 Running it locally

You need ruby and node.js installed, and a PostgreSQL server running.

First, clone the repo:

bundle install
npm install
rails db:setup
rails s

It'll be on localhost:3000.

It will populate the database with some fake demo tasks and an admin user.

Make sure you provide the ADMIN_PHONE environment variable before running rails db:setup.

When developing locally, SMS messages will be logged to the console instead of being sent using Twilio.

🌍 Running it on the web

Deploy

It's suitable for 12-factor app hosting like Heroku. It's a tiny app, so a $7/month hobby dyno is plenty.

It has a Procfile that will automatically run pending rails migrations on every deploy, to reduce downtime.

⏰ Scheduled tasks

You can run rails notify:about_new_tasks on a schedule of your choosing to notify users by SMS about tasks offered in the last day, if they've said they want to recieve those notifications in their profile.

You could use Heroku Scheduler or similar for this.

🧬 Configuration

Variable Why?
HOST The current publicly-accessible URL of the website, used in some SMS notifications
ADMIN_PHONE For the demo admin user when seeding the database. Only needed when seeding a fresh database.
TWILIO_SID and TWILIO_AUTH_TOKEN Can be gained from the Twilio console. Only needed in production.
TWILIO_FROM_NUMBER Should be a valid phone number you've claimed on the Twilio console, in the E.164 format.

You can provide environment config locally using a .env file.

🧪 Roadmap

To do:

  1. redesign the tasks#show action to fetch based on Task.available or current_user.tasks

  2. make a background job to remind users about due tasks too

  3. write google sheet import script and blank template

  4. Limit the number of open tasks a volunteer can claim at once