Skip to main content

Document Download Frontend

Secure, accessible frontend application for downloading documents sent through GOV.UK Notify. Built with Flask, GOV.UK Frontend components, and robust security controls.

document.pdf2.4 MB

Quick Start

Get the Document Download Frontend running locally in minutes

1

Install dependencies

First, install Python dependencies using uv and Node.js dependencies:
# Install uv (Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Bootstrap the application
make bootstrap
This installs all Python and Node.js dependencies and builds frontend assets.
2

Configure environment

Set up required environment variables:
export NOTIFY_ENVIRONMENT=development
export API_HOST_NAME=http://localhost:6011
export DOCUMENT_DOWNLOAD_API_HOST_NAME=http://localhost:7000
export SECRET_KEY=dev-notify-secret-key
export ADMIN_CLIENT_SECRET=dev-notify-secret-key
These are development defaults. See Environment Variables for production configuration.
3

Run the application

Start the Flask development server:
make run-flask
The application will be available at http://localhost:7001.
To automatically rebuild frontend assets on changes, run npm run watch in a separate terminal.
4

Test your setup

Verify the application is running by accessing the health check endpoint:
curl http://localhost:7001/_status
Expected response:
{
  "status": "ok"
}

Key Features

Purpose-built for secure document delivery in government services

Secure Downloads

Encrypted document delivery with key-based authentication and expiry controls

Email Verification

Optional email confirmation to ensure documents reach the intended recipient

GOV.UK Design System

Built with GOV.UK Frontend components for consistency and accessibility

Content Security Policy

Comprehensive CSP headers, HSTS, and security best practices built-in

Docker Ready

Multi-stage Dockerfile optimized for production deployments

Health Monitoring

Built-in health check endpoints for monitoring and orchestration

Ready to deploy?

Learn how to deploy Document Download Frontend to production with Docker, environment configuration, and security best practices.

Deployment Guide

Build docs developers (and LLMs) love