feat: add full Zonemaster stack with Docker and Spanish UI

- Clone all 5 Zonemaster component repos (LDNS, Engine, CLI, Backend, GUI)
- Dockerfile.backend: 8-stage multi-stage build LDNS→Engine→CLI→Backend
- Dockerfile.gui: Astro static build served via nginx
- docker-compose.yml: backend (internal) + frontend (port 5353)
- nginx.conf: root redirects to /es/, /api/ proxied to backend
- zonemaster-gui/config.ts: defaultLanguage set to 'es' (Spanish)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 08:19:24 +02:00
commit 8d4eaa1489
1567 changed files with 204155 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
Zonemaster-GUI documents
* An overview of the Zonemaster GUI is found in [Zonemaster UI]
* Information related to code testing is found in [Unit testing Zonemaster-GUI]
* [Installation instructions]
* [Configuration instructions]
* [Translation instructions]
[Configuration instructions]: https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/gui/README.md
[Installation instructions]: https://doc.zonemaster.net/latest/installation/zonemaster-gui.html
[Unit testing Zonemaster-GUI]: Testing.md
[Translation instructions]: https://github.com/zonemaster/zonemaster/blob/master/docs/public/translation/Translating-GUI.md
[Zonemaster UI]: UI.md

View File

@@ -0,0 +1,46 @@
# Unit testing of Zonemaster-GUI
## Setup
This part assumed that you have a working NodeJS environment on Ubuntu. See
the [build environment] document for further instructions.
The tests for Zonemaster GUI are implemented using [playwright], to install the
tests dependencies run the following.
```sh
npm run e2e:install-deps
npm run e2e:install
```
This will install system dependencies as well as the browsers used to tests the
GUI.
## Running the tests
To run the tests run the following command.
```sh
npm run e2e
```
If the appearance of the GUI changes some tests might fail as the baseline for
visual comparison is no longer up to date. In this case it is required to update
the snapshots. The following commands updates the snapshots while ensuring a
similar environment than the one the CI runs in is used (Ubuntu 22.04 and UTC
time).
```sh
docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.57.0-jammy /bin/bash
npm run e2e:install
npm run e2e:update
exit
```
Note that this method may not always work: it could happen that the generated
snapshots are incorrect and have slight differences (e.g. appears zoomed in/out,
etc). In that case, repeat the above steps but outside of the Docker environment,
and preferably on a machine that uses a similar OS/environment as the CI.
[build environment]: https://github.com/zonemaster/zonemaster/blob/master/docs/internal/distrib-testing/Ubuntu-Node.js-build-environment.md
[playwright]: https://playwright.dev/docs/intro

View File

@@ -0,0 +1 @@
Moved to [translation documents](https://github.com/zonemaster/zonemaster/blob/develop/docs/public/translation/README.md).

54
zonemaster-gui/docs/UI.md Normal file
View File

@@ -0,0 +1,54 @@
# Zonemaster UI
Zonemaster UI (Zonemaster-GUI) is a static website built with [Astro], using
[Svelte] for interactive components and [Vite] for internationalization/translation
(i18n).
## Standalone Components
Zonemaster UI also provides a set of standalone web components that can be
reused in other projects. Currently, there are two available:
- `<zm-domain-test>` for initiating domain tests
- `<zm-program-versions>` displays the current versions of Zonemaster
components
These components are framework-agnostic and can be embedded in other websites or
apps as needed.
```html
<zm-domain-test></zm-domain-test>
<zm-program-versions></zm-program-versions>
<script type="module">
import '@zonemaster/ui';
</script>
```
## Headless Mode
Zonemaster UI can also be used in **headless mode**, where it acts as a
JavaScript API layer between the Zonemaster backend and your own frontend.
This is useful if you want to:
- Build your own custom UI
- Integrate Zonemaster functionality into another application or CLI tool
In headless mode, the UI logic is decoupled from the visual components, allowing
you to access core functionality programmatically through JavaScript.
```ts
import { TestAgent } from '@zonemaster/ui';
TestAgent.subscribe((state, context) => {
console.log(state, context);
});
TestAgent.transition('START', { domain: 'example.com' });
```
[Astro]: https://astro.build/
[Svelte]: https://svelte.dev/
[Vite]: https://vite.dev/