Skip to content
← Back to portfolio

Project case study · Web system

Elder Care

Elder-care agency directory covering 360 agencies, with map search and a Cloudflare-backed lead pipeline.

AstroTypeScriptCloudflare WorkersCloudflare D1Cloudflare QueuesCloudflare KVDrizzle ORMStripeLeaflet
Elder Care

Overview

Elder Care is a directory built with a seed set of 360 agencies; it has not been publicly launched. I built it with Astro on Cloudflare, combining search, interactive maps, and a form-driven lead pipeline. Families can submit a care request, and agencies can act on a matched lead through the site.

A family comparing care options can see which agencies cover their area, where each one is in relation to the person who needs care, and how to contact it without leaving the directory.

Architecture

Elder Care architecture: a family form on an Astro SSR Worker writes leads to D1 and publishes to a Cloudflare Queue; a consumer enriches each lead and emails agencies via Brevo, a scheduled Worker runs a 3-stage escalation cascade, and agencies unlock leads through a token-authenticated dashboard with Stripe Checkout.
A queue-backed lead pipeline on Cloudflare, with a scheduled multi-stage escalation cascade.

Frontend: Astro runs on Cloudflare. Leaflet powers the maps for location-based agency search, letting families browse agencies visually instead of scrolling through a flat results list.

Data layer: Cloudflare D1 is the system of record for agencies, leads, and lead matches. The Drizzle ORM schema defines the tables. D1 stores lead status, pricing tiers, unlock timestamps, and agency dashboard tokens.

Lead pipeline: The family form posts to /api/lead. The endpoint applies Cloudflare KV rate limiting, writes the lead to D1, and publishes its ID to Cloudflare Queues. The Queue consumer matches an opted-in agency and fills in missing contact data through Google Places. It then calculates a free or paid pricing tier, mints or reuses an HMAC-signed dashboard token, and sends a Brevo transactional email.

Escalation: A scheduled Worker handler runs from a six-hour cron trigger. It moves each lead through an exclusive match, partner agencies, and then a broadcast to the remaining opted-in agencies. Each transition is stored in D1 and happens after the previous stage times out.

Agency access: Agencies review matched leads in a token-authenticated dashboard. They can unlock free matches in the dashboard. Paid matches launch Stripe Checkout, and a verified payment webhook records the lead unlock.

The directory has been active since May 2026.

Have a project in mind?

Tell me what you're working on and where you need help.