Skip to content

nestauk/afs_tiny_happy_people_messaging

Folders and files

NameName
Last commit message
Last commit date
Oct 2, 2024
Mar 5, 2025
Dec 5, 2024
Feb 25, 2025
Mar 5, 2025
Nov 6, 2024
Jan 30, 2025
Jul 11, 2024
Dec 5, 2024
Jul 11, 2024
Mar 5, 2025
Jul 11, 2024
Jan 17, 2025
Oct 14, 2024
Jul 11, 2024
Jan 13, 2025
Jul 11, 2024
Sep 17, 2024
Dec 5, 2024
Dec 5, 2024
Nov 6, 2024
Feb 27, 2025
Mar 5, 2025
Dec 19, 2024
Jul 11, 2024
Jan 30, 2025
Sep 17, 2024
Jan 8, 2025
Jul 11, 2024
Nov 6, 2024

Repository files navigation

Tiny Happy People text messaging service

Sends weekly texts with links to content from BBC's Tiny Happy People to parents.

Users can sign up, and then only interact with the service via text.
Admins maintain content via the admin dashboard.
Local authorities can view sign up and clickthrough data.

Getting started

These instructions will get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Docker

Local setup

  1. Clone the repo

  2. Navigate to the root directory of the project.

  3. Install Ruby dependencies and start the local development server.

docker compose build
docker compose up
  1. Run the database migrations and seed the database
docker compose exec app.local bash
rails db:schema:load

The local development server will now be accessible at http://localhost:3000.
Blazer dashboard can be found at http://localhost:3000/admin.

To view the admin dashboard, create an admin user in the database. Login is done via magic Link.

Most features should work locally though for some you may need to add the appropriate credentials - see the .env.template for an example. You may need to set up accounts for the relevant services - or contact a maintainer for the keys.

Running tests

  • docker compose exec app.local rails test to run unit tests.
  • docker compose exec app.local rails test:system to run system/end-to-end tests.

Deployment

We use Heroku to host and deploy this app.

Heroku Scheduler

The tasks to send messages to parents are set up using Heroku scheduler. See scheduler.rake for those tasks.

Sending texts

We currently use Twilio to send the text messages, and Sendgrid to send login links to administrators.