The Digital Marketplace has 4 frontend apps. These apps mostly use shared templates, JavaScript, Sass and image assets,
but occasionally have custom assets specific to that app.
The Digital Marketplace frontend was originally built using the following (now deprecated) libraries:
We now use the following libraries:
GOV.UK Frontend (managed by the Design System team)
Digital Marketplace GOV.UK Frontend
GOV.UK Frontend Jinja (managed by the HM Land Registry team)
Digitl Marketplace Frontend Jinja
The Digital Marketplace GOV.UK Frontend is very similar to GOV.UK Frontend in that it contains CSS, JavaScript and Nunjucks templates that can be shared between the apps.
However, Digital Marketplace is a flask app using the Jinja templating engine, the Digitl Marketplace Frontend Jinja project exists to contain Jinja templates that match thios defined in Digital Marketplace GOV.UK Frontend.
For more information on how and when to use the new frontend components, see the
Digital Marketplace GOV.UK Frontend repo README and the Digital Marketplace Frontend Jinja repo README.
Each frontend app has:
a gulpfile.js
with steps to copy and compile assets
a .nvmrc
file denoting the version of Node to use (currently v20.x)
package.json
and package-lock.json
files to manage dependencies
Each app copies its assets to the /static
folder, and serves that folder from the app’s base url. For example, the
User FE assets are served from /user/static
.
CSS, JS and favicons are also gzipped. This is set in the nginx config of the app’s Docker base image.
Note that large files such as PDFs and CSVs should not be served from this folder. Use an S3 bucket instead!