A simple dictionary of common AI terms with a health and care context, with basic search and navigation.
The terms are currently stored in data/terms.json
following the schema defined in data/terms.schema.json
.
To add new terms, simply add a new item to the terms array following the structure below:
Field | Type | Description |
---|---|---|
title | string | The title of the term e.g. "Artificial Intelligence". |
acronym | string | (optional) an acronym e.g. "AI" |
description | string | The definition of the term. |
slug | string | The short-name of the term for use in the URL and related terms e.g. "ai". |
related | array | Array of slugs of related terms, e.g. "ai" or "machine-learning". |
Take a look at the existing terms in the JSON file as an example of the structure above. You can also edit existing terms or remove them from the array.
- Automated tests run to check valid JSON syntax on every push to this repo.
- To run tests manually, using python3 from the main directory, execute:
pip install -r tests/requirements.txt
jsonschema --instance data/terms.json data/terms.schema.json
cd tests && python validate_json.py
The tool is primarily built using Next.js (v12) and Tailwind CSS (v3) on top of React (v17). There are also some other supporting tools such as Framer Motion, Headless UI and Heroicons.
There is currently no 'backend' for this project. A JSON file (data/terms.json
) is used to house and manage the available terms.
You will need:
- node v14
It is recommended to use a node package manager like nvm to manage node versions.
Once the project has been cloned, ensure you have installed the required dependancies using the command below:
npm i
Now you have installed the required packages, you can start the development server using the following command:
npm run dev
Open http://localhost:3000 with your browser to see the result.
Hot reloading is enabled on this project, so your changes should reflect in realtime when running the dev server without constantly refreshing the page.
If you want to build and export the project locally, then run the commands below:
npm run build
If the build completes successfully, then you can export the project to static HTML files using the command:
npm run export
Note: using the static export feature disables some of the features of Next.js as you can read here. Currently, none of these features are used on this project.
Upon merging into main
, the project is automatically deployed to Github Pages via a Githook Action found in .github/workflows/gh-pages-deploy.yml
.
Unless stated otherwise, the codebase is released under the MIT Licence. This covers both the codebase and any sample code in the documentation.
The documentation including term definitions is © Crown copyright and available under the terms of the Open Government 3.0 licence.