Bootstrap the Project
The project provides amake bootstrap command that handles all initial setup.
Run the bootstrap command
- Generate a version file with the current git commit and timestamp
- Install Python dependencies from
requirements_for_test.txtusing uv - Install Node.js dependencies using
npm ci --no-audit - Rebuild node-sass binaries for your platform
- Build frontend assets (JavaScript, CSS, images, fonts)
What Gets Installed
Python Dependencies
The bootstrap process installs all Python packages specified inrequirements_for_test.txt, including:
- Flask and related extensions
- GOV.UK Frontend Jinja templates
- Notify utilities and client libraries
- Testing frameworks (pytest, etc.)
- Linting tools (ruff)
- AWS SDK (boto3) for S3 operations
- Sentry SDK for error tracking
Node.js Dependencies
Thenpm ci command installs:
- GOV.UK Frontend (v6.0.0) for styles and components
- Rollup and plugins for bundling JavaScript
- Sass for compiling stylesheets
- ESLint and Stylelint for code quality
Frontend Build Output
The build process generates:- Compiled JavaScript bundles
- Compiled CSS from SCSS files
- GOV.UK Frontend assets (fonts, images)
- Static assets copied to the appropriate directories
Project Structure
After bootstrapping, your project structure includes:Updating Dependencies
Python Dependencies
The project uses a two-file approach for Python dependencies:Node.js Dependencies
Updating GOV.UK Frontend
The project has GOV.UK Frontend as a dependency in two places:- Python:
govuk-frontend-jinjainrequirements.infor Jinja templates - Node.js:
govuk-frontendinpackage.jsonfor fonts, images, and Sass files
govuk-frontend that govuk-frontend-jinja relies on matches the version in package.json. Check the govuk-frontend-jinja compatibility table.
Updating notifications-utils
To update thenotifications-utils package:
Troubleshooting
node-sass rebuild fails
Ifnpm rebuild node-sass fails during bootstrap:
uv pip install fails
Ensure you’re using the latest version of uv:Version file not generated
The version file requires git to be available:Pre-commit hooks fail
If pre-commit hooks are not running:Once the development environment is set up, proceed to Running Locally to start the application.