Skip to content
Jabran Rafique

Building childcare vouchers business directory

3 minutes read

If you're a parent who signed up to the Childcare Vouchers scheme, you may be wondering where to spend them all. I've struggled to find businesses that accept them, so my wife, Ruby, and I came up with something to help us and everyone else in the same spot.

What is the Childcare Voucher scheme?

With childcare vouchers you give up part of your pre-tax salary each month and save on tax. Various providers hold the savings and pay the businesses you use. The scheme closed to new joiners on 4 October 2018. Since then the alternatives are tax-free childcare and universal credit.

Spending the vouchers is the hard part. You need a business that offers the childcare or activity you want and takes vouchers as payment, and there's no public list of them.

There are loads of holiday camps, after-school clubs and other activities, but not all of them take vouchers. In my experience some hadn't even heard of the scheme.

Last summer holidays we struggled to find activities for our 6 year old. Searching online only turned up information about the scheme itself. A few forums like Netmums mentioned some businesses, but only for particular areas.

So we decided to build a directory where anyone can find businesses that take childcare vouchers.

Enter https://childcare-vouchers.uk 🚀

Technical stuff

I had a lot of fun building it. I wanted a minimal tech stack and a site that's as accessible as possible.

Goals

The goals were to:

  • show a list of businesses
  • show an option to add a business
  • keep it simple
  • keep it accessible
  • keep it performant

Tech stack

It's a simple site and most of its content rarely changes, so Eleventy, a static site generator, was a perfect fit.

The directory needs two sets of businesses:

  • Businesses that manage childcare vouchers. I call them "providers".
  • Businesses that accept childcare vouchers as payment. I call them "consumers".

Both live in the _data directory and feed straight into Eleventy's build.

Roughly:

|_data/
 |-- providers.js
 |-- consumers.js
 |-- consumers-list/

consumers.js is a Node.js script that reads the JSON files in _data/consumers-list/. Each of those files comes from someone submitting the form to add a business.

Adding a business

Anyone can add a business by filling in a short form.

Traffic graph for childcare-vouchers.uk website

I didn't want a separate database for submissions. I borrowed the approach of the Eleventy community repository, with a twist:

  • someone fills in the form on the site
  • it's validated in the browser before it's sent
  • it's validated again on the server (Cloudflare Functions)
  • a valid submission opens a new issue in the GitHub repository with the details

That uses the GitHub API. I get a notification, review the submission by hand, and label it approved if it's fine.

If it ever gets out of hand I'd like to automate this too.

Build and deployment

The label starts a GitHub Actions pipeline that:

  • checks for data integrity
  • checks for a duplicate entry based on the website URL and phone number
  • creates a new JSON file with provided data
  • commits changes back into the repository
  • closes the issue with a comment

If the data check fails or it's a duplicate, no JSON file is created and the issue is just closed.

A new JSON file triggers a Cloudflare Pages build, and the site deploys with the new entry. Everything apart from the review is automated. There are only a couple of page templates, and the UI is simple and responsive. I used Tailwind CSS for styling because it let me get the MVP out quickly.

Traffic from organic search has been growing steadily:

Traffic graph for childcare-vouchers.uk website

I enjoyed building this little side project, and I hope it helps a lot of parents.

Visit it at https://childcare-vouchers.uk