Prerequisites
Python 3.13
GOV.UK Notify Admin runs Python 3.13 in production. Ensure you have Python 3.13 installed on your system.Node.js 24
The project uses Node.js version 24 (specified in.nvmrc).
Install Node.js with Homebrew
Using nvm (Recommended)
nvm is a tool for managing different versions of Node.js. Follow the installation guidance on nvm’s GitHub repository.
Once installed, switch to the project’s Node.js version:
Initial Setup
Install uv for Python dependency management
The project uses uv for Python dependency management.See the uv installation docs for alternative installation methods.
Install pre-commit hooks
The project uses pre-commit to ensure committed code meets formatting standards and makes basic fixes automatically.Install pre-commit system-wide:Then install the hooks in this repository:The pre-commit configuration (
.pre-commit-config.yaml) includes:- Trailing whitespace removal
- End-of-file fixer
- YAML validation
- Debug statement detection
- Ruff linting and formatting
Create environment.sh
Create an This file sets up:
environment.sh file in the root directory with required environment variables:NOTIFY_ENVIRONMENT: Identifies the environment as developmentFLASK_APP: Points to the main application fileFLASK_DEBUG: Enables Flask debug mode for auto-reloadWERKZEUG_DEBUG_PIN: Disables the Werkzeug debugger PIN
Bootstrap the application
Run the bootstrap command to install all dependencies and build the frontend:This command:
- Generates a version file (
app/version.py) - Installs Python dependencies from
requirements_for_test.txtusing uv - Installs Node.js dependencies using
npm ci --no-audit - Builds the frontend assets with
npm run build