The source of the website of ELIXIR On-Cloud: standards-based products and architecture patterns for federated analytics in biomedical research, healthcare and beyond. ELIXIR On-Cloud is a Driver Project of the Global Alliance for Genomics and Health (GA4GH), governed by the ELIXIR Compute Platform; the website presents its products, services, nodes, projects, contributors and funders.
The website is built with Next.js and React. Every page is rendered statically at build time; there is no backend and no build-time secret.
Content lives in JSON files under src/data/:
| File | Page |
|---|---|
product.json |
Products |
services.json |
Demo: live services |
nodes.json |
Demo: Nodes (flags in public/flags/, logos in public/nodes/) |
project.json |
Projects (parked: online, not in the menu or the sitemap) |
contributor.json |
Contributors |
funding.json |
Funding |
To change content, edit the relevant file and open a pull request.
The listings (Products, Funding, Contributors) share one filter behaviour
(src/lib/filters.ts): several filters can be selected,
and an item is listed if it matches any of them. The selection is kept in the
URL, so a link can open a listing with filters set, e.g.
/products?filter=ga4gh-tes,ga4gh-wes. A filter's id is its label in lower
case, with dashes for spaces and other characters.
Every page sets its own title and description for search engines and link
previews: in the metadata export of its page.tsx, or of the route's
layout.tsx for pages that are client components ('use client'). Titles
appear as <title> | ELIXIR On-Cloud (the template in
src/seo/base-seo.ts), except on the home page,
which sets its full title. src/app/metadata.test.ts checks that every
route has a title and description of its own; add new routes to its list.
With Node.js 22 and npm installed, install the dependencies and start the development server:
npm install
cp .env.example .env.local # optional; all values have defaults
npm run devUseful commands:
npm run build: production build (also generates the sitemap)npx tsc --noEmit: type-checknpm run lint: lint the JavaScript and TypeScript sources with ESLint (Next.js's recommended config with typescript-eslint, seeeslint.config.js); fails on warnings too.npm run lint-fixfixes what can be fixed automatically. Images useImagefromnext/image, which sizes and optimizes them; the lint rejects plain<img>tags. Images from other hosts need an entry inimages.remotePatternsinnext.config.jsnpm test: run the tests (Vitest with Testing Library);npm run test:watchreruns them on changesnpm run test:coverage: run the tests and write coverage tocoverage/lcov.info(for Codecov)npm run check-links: check the outbound links insrc/(test files,*.test.json/*.spec.jsonfixtures andsrc/test/excluded; sites that block automated requests, such as LinkedIn, are listed as "skip" for a manual check). A link is dead on 404/410, a TLS error, a DNS error that persists after one retry, a malformed URL, or an address outside the public internet (loopback, private, link-local, cloud metadata, IPv6 translation and 6to4, and other reserved ranges). The check follows redirects itself and checks every target the same way before requesting it. This is a pre-check: the request resolves the name again, so a host whose DNS answer changes in between isn't caught. Results need public DNS: resolvers that answer with private or synthetic addresses (some proxies, split-horizon DNS) make links look dead. Server errors (5xx) and other network errors are retried once after a short delay and, if they persist, reported as unverified, like other 4xx responses, redirects to other schemes and chains of more than 10 redirects. The command exits with 2 on dead links, with 0 otherwise. The Link check workflow runs it every Monday (one run at a time), shows the summary (with unverified links) in the run's job summary, or a failure note if the check broke, and opens or updates an issue for dead links.
Tests live next to the code they test (*.test.ts(x)). The data tests in
src/data/data.test.ts check the JSON files: unique ids, references between
services, products and Nodes, and that every referenced image exists.
CI runs these jobs on every pull request and push:
PR title: the title follows Conventional Commits and has at most 50 characters (see Contributing).Lint: lints all JavaScript and TypeScript sources with ESLint (npm run lint); errors and warnings fail it.Test: runs the tests with coverage and reports it to Codecov.codecov.ymlstates the target of this repo (70%, working up from about 38%); the status only reports for now, it doesn't fail. The upload uses the organization's secretCODECOV_TOKEN. Its errors fail the job only on pushes to this repository, as forks and Dependabot get no access to the token.Build: checks the formatting and types ofsrc/, then builds the site.Audit: fails on high and critical advisories in the production dependencies. To run it locally:npm audit --omit=dev --audit-level=high. Development tools are not audited, as they don't reach the site; this includes tools that only run during the build, such asnext-sitemap, so they belong indevDependencies(a test checks this). The job checks npm's advisory database as it is when the job runs, so a newly published advisory fails every new run, without a change to the code, and also holds back deployments of commits without a green run. Fix it by updating the package (npm update <package>within its version range, otherwisenpm install <package>@<fixed version>, or the dependency that pulls it in). There is no list of accepted advisories: if no fix exists yet, a maintainer decides, in a pull request, whether to change the job for the time being.Build image: builds the production image from theDockerfile.Scan build: scans that image with Trivy, uploads the findings that have a fix to code scanning, and fails on critical and high ones that have a fix. Accepted findings go into.trivyignore.yaml, with a reason and an expiry date.CI passed: the only check that the rules fordevrequire. It passes if all other jobs passed; onlyPR titlemay be skipped.
Pull requests go to dev, the default branch. main only moves forward to
versions that should go live: maintainers fast-forward it to a commit of dev
that passed CI, which deploys that commit:
git fetch origin
git push origin <commit of dev that passed CI>:mainOnce CI has passed for a push to main, the Deploy
workflow publishes the image to the GitHub
Container Registry (ghcr.io, tagged latest and with the commit SHA). A
commit whose CI failed is not deployed.
- Skipped commits: if a newer commit of
mainexists when CI for an older one completes, the older one is skipped, so thatlatestnever moves back; the newer one is deployed once its CI passed. If that CI fails, fix forward, or deploy the older commit by hand (below). - Manual deploys (Actions, "Deploy", "Run workflow", on
main): leaveshaempty to deploy the latest commit ofmain, or give the full SHA of a commit ofmain, e.g., to roll back. They too require a successful CI run for a push of that commit tomainand otherwise fail, saying so (re-run the workflow once CI has passed).
On the host,
docker-compose.yaml runs the site together with
Watchtower, which pulls new images every
5 minutes and restarts the site:
git clone https://github.com/elixir-cloud-aai/landing-page.git
cd landing-page
docker compose up -dThe site listens on port 80 (change it in docker-compose.yaml). TLS is
expected to be terminated by a reverse proxy in front of it.
Vercel builds preview deployments for pull requests and dev, which has a
stable preview URL: vercel.json turns off deployments of main, as the
production site is served from the host above.
The site used to be a PWA. public/sw.js is written by hand and only removes
the old service worker from the browsers of past visitors. Keep it until at
least November 2027.
To roll back, pin the site image to a previous sha-<commit> tag and run
docker compose up -d. To build locally instead of pulling, run
docker compose up -d --build.
The site sets its own Cache-Control headers, in the headers of
next.config.js, so they are the same in the Docker image
and on Vercel:
| Paths | Cache-Control |
|---|---|
/_next/static/ (JavaScript, CSS, fonts; hashed names) |
public, max-age=31536000, immutable (set by Next.js) |
/_next/image (optimized images) |
source's max-age, at least 4 hours (Next.js default) |
| Pages | public, max-age=0, must-revalidate |
Other files of public/ (images, logos, flags, favicon) |
public, max-age=86400, stale-while-revalidate=604800 |
robots.txt, sitemap.xml, sitemap-<n>.xml |
public, max-age=3600 |
sw.js (removes the old PWA's worker, see above) |
no-cache, no-store, must-revalidate |
Caches revalidate pages on every request (a cheap 304 Not Modified if a
page hasn't changed), so a deploy shows at once, and no cache serves a page
that points at /_next/static/ files of an older image. Files of public/
have no hash in their names, so a changed image can take up to a day to
show, and a cache may serve the old one once more on a visit within the
following week (stale-while-revalidate); to replace one at once, give it a
new file name. 404s for unknown paths are not cached. A reverse proxy in front of the site should pass these
headers on and needs no cache rules of its own.
src/test/cache-policy.test.ts checks
which rule applies to which path, and that every file in public/ gets the
policy meant for it.
Contributions are welcome! Report problems with the website or suggest
changes in the issue tracker, or open a pull request against
dev. For anything else, write to
cloud-service@elixir-europe.org.
Pull request titles become the commit messages on dev: they follow
Conventional Commits and have at most
50 characters (see the contributing guide of ELIXIR On-Cloud).
CI checks the title (job PR title) and rechecks it when you edit it.