Skip to content

About

Preserved interactive archive of the legacy open.un.org website

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Archived UN Transparency Portal

A local preservation repository for the previous public website at https://open.un.org/, captured in November 2026. The deliverable is a WACZ web archive plus a self-hosted replay viewer. The viewer runs the captured website's JavaScript against captured HTTP responses, including the dashboard data and third-party chart dependencies. It does not require the original Drupal server.

This is a preservation copy, not the source repository for the original Drupal application. Original compiled JavaScript and HTTP content are retained in the archive; unpublished Drupal source, database credentials and administrative interfaces are outside the public-site capture.

Run the existing archive

Requirements: Python 3.11+ and a modern browser with JavaScript/service workers. No Python dependencies are needed merely to serve the completed viewer.

python3 scripts/serve.py

Open http://localhost:8777/ in your browser.

Do not open site/index.html using file://: replay needs an HTTP origin and a service worker. Use the viewer's navigation bar to visit captured pages. The archive download link provides the portable open-un-org.wacz file, which can also be opened in compatible Webrecorder replay applications.

Deploy

The public archive is published at https://united-nations.github.io/open-legacy-website/ from united-nations/open-legacy-website. The Deploy archived website GitHub Actions workflow publishes the contents of site/ after changes to the deployed files on main, or through a manual run. It verifies the WACZ checksum before deployment. Pages must use GitHub Actions as its publishing source. No rebuild or live-site recapture occurs during deployment.

Publish the contents of site/ to a static host, retaining its directory structure. Use an HTTPS address dedicated to the archive, ideally a separate archive subdomain. There is no Node server, Drupal service or database to deploy. No CDN dependency is needed: viewer JavaScript is pinned and vendored locally.

The host must serve .js files with a JavaScript MIME type and allow the service worker at /replay/sw.js. Allow HTTP byte ranges for .wacz files; the included server implements them. Serve missing paths as 404s rather than redirecting all paths to index.html, and do not install a different service worker over /replay/. Keep the WACZ and viewer on the same origin to avoid CORS setup. For public hosting use HTTPS; browsers permit plain HTTP on localhost for local use. A remote plain-HTTP IP address will not support the replay service worker.

A typical nginx static configuration is:

server {
    listen 443 ssl;
    server_name archive.example.org;
    # Configure your certificate/key here.
    root /srv/open-archive/site;
    include mime.types;
    location / { try_files $uri $uri/ =404; }
    location = /open-un-org.wacz {
        default_type application/zip;
        add_header Cache-Control "public, max-age=86400";
    }
}

nginx serves static-file byte ranges by default. For a custom hostname, provision DNS and TLS separately. The default GitHub Pages address requires no custom DNS configuration.

Capture again (before changing the original hosting)

Capture uses Playwright with its exact version pinned in package.json:

pnpm install --frozen-lockfile
pnpm exec playwright install --with-deps chromium
pnpm run capture
node scripts/capture-interactions.mjs
python3 scripts/merge-captures.py
python3 scripts/capture-repairs.py
python3 scripts/merge-captures.py
uv run python scripts/build-archive.py
uv run python scripts/verify-archive.py
python3 scripts/audit-capture.py

The first capture inventories and loads every discovered public page. The second exercises the dashboard controls so dependencies triggered by interactions are also recorded. The merge retains full response bodies and adds linked-document responses. It writes a compressed combined HAR for packaging. Check the scripts' reports before replacing a previous capture; an interrupted or empty capture is not a complete archive. Do not run these commands against the replacement teaser and assume that they preserve the previous site.

Rebuild the portable archive

Install uv and run:

uv sync --locked
uv run python scripts/build-archive.py
uv run python scripts/verify-archive.py
python3 scripts/audit-capture.py

This converts capture/combined.har.gz when present, otherwise capture/site.har.gz (gzip-compressed HAR, with full response bodies embedded; uncompressed capture/site.har is also supported) into capture/open-un-org.warc.gz, then site/open-un-org.wacz. It writes capture/build-manifest.json with artifact sizes and SHA-256 hashes. The converter versions are pinned in pyproject.toml and uv.lock. Never recapture from open.un.org after its hosting has switched unless you intend to archive the new site instead.

Validate replay

With the local server running, install the optional browser test dependency and run the checks:

pnpm install --frozen-lockfile
pnpm exec playwright install --with-deps chromium
pnpm test

The replay test blocks requests to every external HTTP origin, visits the eight canonical pages plus the old dashboard aliases, and checks the actual archived page frames. Dashboard checks wait for Google Charts SVG elements rather than counting icons in the archive viewer. Results and screenshots are saved under capture/. Tests can use another local URL with ARCHIVE_URL; the test dependency can be reused from an existing installation by setting PLAYWRIGHT_MODULE to its absolute playwright/index.mjs path.

The shipped archive passed 119 interaction checks and 10 page/alias checks in fresh browser contexts, with no external requests, uncaught JavaScript errors or unexpected resource failures. The three full-data CSV exports contain exactly 63,113 / 27,678 / 1,739 observations. The integrity check verifies all 97 distinct successful response bodies unchanged in the WACZ. See capture/offline-interactions.json, capture/replay-validation.json, and capture/integrity-validation.json; each records the archive SHA-256 it verified.

Repository contents

  • site/: deployable viewer, local runtime and complete WACZ.
  • capture/: compressed source network captures, inventory and verification evidence. The derived WARC is recreated by the build and is also inside the WACZ. Capture metadata records which pages and interactions were exercised.
  • scripts/: capture, packaging and local HTTP serving tools.
  • tests/: interaction/replay validation and capture-tool regression checks.

Preservation scope and verified interactions must be assessed from the capture inventory and validation reports, not merely from a successful WACZ build. A valid archive file alone does not prove that every interaction works. Outbound links to other organizations remain outbound links; this archive does not claim to preserve the entire external web. Do not replace an offline validation record with screenshots alone.

Known source limitations

The original mobile navigation opens, but a second press does not close it: the source handler uses a one-time Drupal once() binding around its class toggle. The archive preserves this observed source behavior; the interaction check records it rather than changing the original JavaScript.

At capture time the original site's live news RSS component already reported a network error. That source behavior is retained; news.un.org is an external service, not a copied news archive. Two linked external source documents returned HTTP 403 during capture. Their failure responses and URLs are recorded rather than replacing them with invented content; see the document capture ledger. Analytics and error-reporting calls are intentionally not run against their live services during replay. The archived financial charts do not depend on them.

This local Git repository has no remote and has not been published. A private Drupal restoration backup remains a separate preservation task requiring access to the original host; it is not required to run the captured public dashboards.

Upstream software and rights

The original website content retains its original United Nations/source rights. No new license is asserted over it. The vendored ReplayWeb.page runtime is 2.5.4, from the npm package replaywebpage; its AGPL-3.0 license and package metadata are included in site/vendor/replaywebpage/. Its source is available at https://github.com/webrecorder/replayweb.page/tree/v2.5.4 and the exact distributed package is identified with a SHA-256 digest in the vendor manifest. The viewer bundles are unmodified. Capture and replay are based on open Webrecorder archive formats: https://replayweb.page/docs/embedding/ and https://github.com/webrecorder/py-wacz.

Capture and browser verification require Node.js 22+ and pnpm 11.22.0. The shipped viewer itself needs neither Node nor pnpm at runtime.

About

Preserved interactive archive of the legacy open.un.org website

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages