Skip to main content
Before you can run the Document Download Frontend, you need to install several dependencies and tools.

Prerequisites

Node.js and nvm

The project requires Node.js version 24 (as specified in .nvmrc).
1

Install Node.js via Homebrew (if not already installed)

If you don’t have Node.js on your system:
brew install node
2

Install nvm

nvm is a tool for managing different versions of Node.js. Follow the guidance on nvm’s GitHub repository to install it.Once installed, you can switch between Node.js versions easily.
3

Switch to the correct Node.js version

Run the following command in the project directory:
nvm use
If you don’t have Node.js v24 installed, nvm will tell you how to install it:
nvm install 24

Python and uv

The project uses uv for Python dependency management.
1

Install uv

Install uv using the official installation script:
curl -LsSf https://astral.sh/uv/install.sh | sh
Alternatively, you can use other installation methods described in the uv documentation.

Pre-commit

The project uses pre-commit to ensure that committed code meets basic standards for formatting.
1

Install pre-commit system-wide

brew install pre-commit
2

Install pre-commit hooks in the repository

Navigate to the project directory and run:
pre-commit install --install-hooks
This will set up the following hooks:
  • Trailing whitespace removal
  • End-of-file fixer
  • YAML validation
  • Debug statement detection
  • Ruff linting and formatting

Python Dependencies

The project uses several Python packages including:
  • Flask (3.1.3) - Web framework
  • Flask-WTF (1.2.1) - Form handling
  • govuk-frontend-jinja (4.0.0) - GOV.UK Design System templates
  • notifications-utils - Shared utilities from GOV.UK Notify
  • notifications-python-client (10.0.0) - Notify API client
  • Gunicorn (25.1.0) - WSGI HTTP server
  • Sentry SDK (1.45.1) - Error tracking
  • Whitenoise (6.2.0) - Static asset management

Node.js Dependencies

The project uses:
  • govuk-frontend (6.0.0) - GOV.UK Design System assets
  • Rollup - JavaScript bundler
  • Sass - CSS preprocessor
  • ESLint - JavaScript linting
  • Stylelint - SCSS linting

Verification

After installation, verify that all tools are available:
# Check Node.js version
node --version  # Should show v24.x.x

# Check npm version
npm --version

# Check uv version
uv --version

# Check pre-commit installation
pre-commit --version
Once all prerequisites are installed, proceed to the Development Setup guide to bootstrap the project.

Build docs developers (and LLMs) love