Find MoJ data is an internal service for finding and sharing data across the Ministry of Justice. It is powered by Datahub, an open source data catalogue. This repository contains a custom UI that uses the GOV.UK design system, and focuses on data discovery.
Required for building the front end javascript dependencies
Required for managing python package dependencies. Follow installation instructions here https://docs.astral.sh/uv/getting-started/installation/
Organisational level tool for storing application secrets and passwords securely. There are a number of 1password utilities available to manage credentials from cli and desktop environments.
- Install the 1Password desktop app - https://support.1password.com/get-the-apps/
- Install the 1Password CLI app - https://developer.1password.com/docs/cli/get-started/
- Follow the steps to turn on and test the 1password desktop app integration
Tests will require chromedriver at a version compatible with your chrome browser (https://googlechromelabs.github.io/chrome-for-testing/)
Datahub is the backend for Find MoJ data. These instructions assume you will use the existing development environment hosted in cloud platform.
Please refer to Prerequisites for dependencies and installation instructions
- Export a local var with the environment name
export ENV=local - Run
make buildto install dependencies and build the app- Make any needed customizations required to
.envfile
- Make any needed customizations required to
- Run
make testto run unit tests for the app. This step requireschromedriverup-to-date with your google chrome version: https://googlechromelabs.github.io/chrome-for-testing/ - Run
make runto run the app locally on http://localhost:8000
export ENV=local
make build
make test
make runNote: in local development we are using SQLite. Another option is running the app against RDS.
If you are considering reusing this frontend, please get in touch with us first.
We recommend you follow these steps:
- start with the latest release of Find MoJ data
- replace all references to Find MoJ data in
locale/en/LC_MESSAGES/django.po - generate an access token in Datahub
- review
core/settings.py. Your deployment must set various environment variables for this to work, e.gCATALOGUE_URL, the URL to your Datahub instance, andCATALOGUE_TOKEN, the access token. - alternatively, you can create your own
settings.pyand set theDJANGO_SETTINGS_MODULEenvironment variable.
We have enabled feature switches in find-moj-data. These have been enabled using a package called django-waffle.
Switches can be managed via the cli or via the django admin page.
Our switches are created via the cli; the commands can be seen in the Dockerfile.
Current switches and default settings:
search-sort-radio-buttonsoff - switches on/off radio selection buttons for sort order of search results.display-result-tagsoff - switches on/off the display of tags in search and results pagesshow_is_nullable_in_table_details_columnoff - switches on/off theIs Nullablecolumn in the table details page
