Skip to content

Find NHS Dentists near you and filter them by the patients they're currently accepting.

Notifications You must be signed in to change notification settings

rjackson/dentists

Repository files navigation

dentists on a map

The NHS lists numerous dental practises through the Find a Dentist service, and its underlying data is available through the NHS' Service Search API (organisations (version 2)).

The Find a Dentist service serves a flat list of results. Dentists on a map aims to present the same data in a friendlier format for end users, as well as adding search, filtering & notification capabilities.

Configuration

This project relies on third-party services:

Configure .env.local with credentials for these providers. .env.example has been provided as a template for expected settings.

Environmental variable Note
NHSDIGITAL_ODATA_ENDPOINT Preset to https://api.nhs in .env.uk/
NHSDIGITAL_ODATA_SUBSCRIPTION_KEY Your subscription key for the NHS API. You can retrieve this from your My Account page
NEXT_PUBLIC_GEONAMES_USERNAME Your username for the Geonames Web Services
CLOUDFLARE_API_TOKEN Your credentials for the Cloudflare API. Needs read and edit access to "Workers KV Storage"
CLOUDFLARE_ACCOUNT_ID The ID of the Cloudflare account under which the Cloudflare KV namespace is set up
CLOUDFLARE_KV_NAMESPACE The ID for the Cloudflare KV namespace under which notification data will be saved
SENDGRID_API_KEY The API Key for Sendgrid, to send email alerts for new dentists
EMAIL_FROM_NAME What name any e-mails we send should come from
EMAIL_FROM_ADDRESS What address any e-mails we send should come from
MAX_DENTISTS Development setting to limit how many dentists are loaded on screen at any one time.
CRON_API_KEY Shared secret to authorise a scheduling system to prod API routes for cron jobs.
NEXT_PUBLIC_FALLBACK_SITE_URL The public site URL to fall back upon if we cannot automatically derive the current site URL (e.g. in Github Actions)
NEXT_PUBLIC_FATHOM_CUSTOM_DOMAIN Analytics via Fathom
NEXT_PUBLIC_FATHOM_TRACKING_CODE Analytics via Fathom

Running the Next.js development server

npm run dev

Open http://localhost:3000 with your browser to see the result.

Refreshing the dentists data

The list of dentists, and whether they are currently accepting patients, is managed offline and committed into the repository nightly from the refresh-data Github Action.

You can manually update this data locally with:

npm run refresh-data

About

Find NHS Dentists near you and filter them by the patients they're currently accepting.

Topics

Resources

Stars

Watchers

Forks