This is the HM Land Registry PPD Explorer, a web application that allows users to search and explore Price Paid linked-data for England and Wales.
Please see the other repositories in the HM Land Registry Open Data project for more details.
For more information about this project visit the wiki.
- Tech stack
- Developer setup
- Data API
- Running locally
- Testing
- E2E testing
- Linting
- Building and publishing
- Releases
- Dependency maintenance
| Layer | Technology |
|---|---|
| Backend | Ruby on Rails 8.1, served via Puma |
| Assets | Sprockets asset pipeline + Dart Sass |
| Templates | HAML |
| Data | SPARQL endpoint queried via the data_services_api gem |
| Error tracking | Sentry |
| Metrics | Prometheus (prometheus-client, puma-metrics) |
| E2E testing | Node 24 + Yarn 4 + Playwright (Chromium) |
This is a server-rendered Rails application with no Node.js build tooling — there is no Vite and no Webpack. Node is present only to run Playwright E2E automations; it plays no part in the application build or asset pipeline.
Use rbenv or asdf to install
the version pinned in .ruby-version (currently 3.4.9).
With rbenv:
rbenv install # reads .ruby-version automatically
gem install bundlerThe data_services_api, json_rails_logger, and lr_common_styles gems are hosted
on the Epimorphics GitHub Package Registry. You need a GitHub Personal Access Token
with the read:packages scope.
Configure Bundler with your token:
./bin/bundle config set --local rubygems.pkg.github.com epimorphics:<your-token>./bin/bundle installNo Node or Yarn installation is required to run or build the application. Node is only needed if you intend to run Playwright E2E tests — see E2E testing.
.env.development contains sensible defaults for local development and is checked
in — no copying required. The app will start without any further configuration.
To override a value, create .env.local and set it there — Rails loads .env.local
first and falls back to .env.development. .env.local is gitignored.
| Variable | Default | Purpose |
|---|---|---|
API_SERVICE_URL |
http://localhost:8888 |
Backing SPARQL/data API |
PORT |
3001 |
Rails server port |
METRICS_PORT |
9394 |
Prometheus metrics port |
SENTRY_ENABLED |
false |
Enable Sentry error tracking |
SENTRY_AUTH_TOKEN |
— | Required only for production builds (source map upload) |
SENTRY_API_KEY |
— | Required only if SENTRY_ENABLED=true |
The app queries a backing data API at API_SERVICE_URL (default
http://localhost:8888). To run it locally, install Maven and follow the
instructions in the
lr-data-api repository, ensuring
it listens on port 8888.
./bin/rails server -p 3001The app is served on port 3001 by default and expects a data API at API_SERVICE_URL
(see .env.development).
./bin/rails testTests use VCR cassettes under test/vcr_cassettes/. To discard cassettes and force
live HTTP calls on the next run:
rm test/vcr_cassettes/*View the coverage report after a test run:
open coverage/index.htmlPlaywright is used for end-to-end browser automation. Node is required only for this — it is not used in the application build.
Prerequisites: Node 24 via nvm:
nvm install # reads .nvmrc automatically
nvm useInstall dependencies (yarn resolves from .yarn/releases/yarn-4.14.1.cjs via
yarnPath in .yarnrc.yml — no separate corepack step needed):
yarn installRun against the local server (starts Rails automatically on port 3001):
yarn test:e2eRun against a remote environment:
E2E_BASE_URL=https://staging.example.com yarn test:e2eOptional HTTP basic auth for protected environments:
E2E_BASE_URL=https://staging.example.com \
E2E_USERNAME=user \
E2E_PASSWORD=secret \
yarn test:e2eInteractive UI mode:
yarn test:e2e:uiOpen the last HTML report:
yarn test:e2e:reportThe CI workflow (.github/workflows/e2e.yml) is workflow_dispatch only — it does
not run automatically on push. Trigger it manually from the Actions tab, supplying the
target URL.
./bin/bundle exec rubocop -a # Ruby — auto-corrects safe offencesJavaScript (Playwright tests):
yarn lint # ESLint — check Playwright config and test files
yarn lint:fix # ESLint — auto-fix safe offencesThere is no HAML linting.
The Makefile is scoped to the Docker image build and publish pipeline.
make image # Build the Docker image (requires GitHub token configured)
make publish # Push to AWS ECR
make vars # Print all build variables
make tag # Print the computed image tag
make version # Print the application versionVariables can be overridden on the command line, e.g.:
STAGE=preprod make publishBranch-to-environment mapping is defined in deployment.yaml. CI runs publish and
deploy automatically on push via .github/workflows/publish-deploy.yml.
Releases follow the Frontend Release Process.
| Branch | Environment | URL |
|---|---|---|
dev |
Dev | https://hmlr-dev-pres.epimorphics.net/app/ppd/ |
preprod |
Pre-production | https://hmlr-preprod-pres.epimorphics.net/app/ppd/ |
prod |
Production | https://landregistry.data.gov.uk/app/ppd/ |
The canonical version file is app/lib/version.rb. The changelog is maintained in CHANGELOG.md.
Environment branches are kept as strict fast-forward pointers to tagged commits on dev. Branch-to-environment mapping is also declared in deployment.yaml.
./bin/bundle update --patch # Update all gems to latest patch version
./bin/bundle outdated --only-explicit # Check for outdated gems