Website for NICE British National Formulary (BNF) and British National Formulary for Children (BNFC) built with Gatsby and using the NICE Design System
🚀 Jump straight to getting started
The BNF, or British National Formulary, provides guidance to health practitioners on prescribing, dispensing and administering medicines.
It's a microsite, updated once a month from a feed. It's built with Gatsby, a React-based static site generator, and is styled using components from the NICE Design System.
This project produces website for both the BNF (standard formulary) and BNFc (the version for children).
| Folder | Purpose |
|---|---|
| gatsby | Static site built with React and Gatsby |
| functional-tests | Browser-based functional tests in WebdriverIO |
Note: Each of these folders has its own readme with detailed setup steps etc
This is the high level stack. Each of the sub-projects (gatsby/functional-tests) has its own readme with more detailed stack.
- VS Code IDE
- With recommended extensions (VS Code will prompt you to install these automatically)
- Gatsby v4 and React for static site generation
- WebdriverIO v7 for browser-based functional tests
- NICE Design System
The easiest way to get the project running is:
- Use Volta to automatically use the correct version of Node pinned in package.json; or install the correct version of Node manually if you're not using Volta
- Clone this repository
- Open the root of the repository in VS Code
- Install recommended extensions when prompted
- Install dependencies:
- Run
npm ciin each folder with a package.json manually.
- Run
- Go to the 'Run and Debug' panel (Ctrl+Shift+D) in VS Code
- Run
LAUNCH BNF/BNFC
Launching the app via LAUNCH BNF/BNFC runs the Gatsby site in dev mode on http://localhost:8000/, and launches it in Chrome for debugging once it's built and running.
Note: there are more granular ways to run each part of the project, either via an IDE or via the command line. See each sub-folders's readme for more details.