Matyan web UI server — serves the React app and static assets
Project description
Matyan UI
React single-page application for browsing runs, metrics, params, and artifacts. Part of the Matyan experiment-tracking stack (fork of Aim). The UI talks only to the matyan-backend REST API (never to the frontier).
Layout
web/— React app (TypeScript, React 17, react-scripts 4, Material-UI, Highcharts, etc.). All frontend source andpackage.jsonlive here.src/matyan_ui/— Python package that serves the built static files and injects config at runtime via a Jinja-renderedindex-template.html.- Build output:
npm run buildinweb/writes assets intosrc/matyan_ui/static/(and producesindex-template.htmlwith placeholders for base path and API host).
Prerequisites
- Build: Node.js and npm (e.g. Node 20; see MAINTENANCE.md for known workarounds on Node 17+).
- Run: Python 3.12+. The package uses
uvin the repo;uv run matyan-uior install thenmatyan-uiCLI.
Development
- Option A — React dev server: From
web/, runnpm install --legacy-peer-deps(ornpm ci) thennpm start. Configure the app to use the backend (e.g. proxy orAPI_HOST_BASE); the app readswindow.API_HOST_BASE/window.API_BASE_PATH_SUFFIXfrom the served HTML (in production these come from the Python server's Jinja template). - Option B — Production-like: Build once (
npm run buildfromweb/), then run the Python server so it serves fromsrc/matyan_ui/static/with the same env vars you would use in deployment.
The backend must be running (e.g. on http://localhost:53800) for the UI to load runs and metrics.
Build (production)
From repo root (or from extra/matyan-ui):
cd extra/matyan-ui/web && npm ci --legacy-peer-deps && npm run build
On Node 17+, if the build fails with OpenSSL errors, set NODE_OPTIONS=--openssl-legacy-provider (see MAINTENANCE.md).
Result: src/matyan_ui/static/ is populated (and committed or not per .gitignore; Docker builds do this in the image).
Run (production-like)
From the matyan-ui package directory: uv run matyan-ui (or matyan-ui if the package is installed).
Options: --host, --port (defaults from env: MATYAN_UI_HOST, MATYAN_UI_PORT). Default port: 8000. The app is served under MATYAN_UI_BASE_PATH (default empty = root).
Configuration (environment variables)
| Variable | Default | Purpose |
|---|---|---|
MATYAN_UI_BASE_PATH |
"" |
URL path prefix where the UI is served (e.g. /matyan). |
MATYAN_UI_API_BASE_PATH |
/api/v1 |
Path suffix for backend API (used with MATYAN_UI_API_HOST_BASE). |
MATYAN_UI_API_HOST_BASE |
http://localhost:53800 |
Backend base URL; UI sends REST requests here. |
MATYAN_UI_API_AUTH_TOKEN |
"" |
Optional bearer token for UI → backend requests. |
MATYAN_UI_HOST |
0.0.0.0 |
Bind address for the server. |
MATYAN_UI_PORT |
8000 |
Bind port. |
These are injected into the HTML so the React app can call the correct backend; for subpath or multi-domain setups, set MATYAN_UI_BASE_PATH and/or MATYAN_UI_API_HOST_BASE accordingly.
Deployment
- Docker: Use Dockerfile.dev or Dockerfile.prod (context from repo root; build copies
web/and produces an image with Python + pre-built static). - Kubernetes/Helm: The main chart in
deploy/helm/matyandeploys the UI as a separate deployment; configureui.hostBase,ui.apiHostBase, and optionallyui.basePathand auth. See the chart README for values.
The UI is deployed independently from the backend; CORS and ui.hostBase are configured so the backend allows requests from the UI origin.
Maintenance and workarounds
See MAINTENANCE.md for: security audit, outdated deps, build verification, and current workarounds (--legacy-peer-deps, NODE_OPTIONS=--openssl-legacy-provider, GENERATE_SOURCEMAP=false).
Related
- Backend: matyan-backend serves the REST API; the UI is API-compatible with the Aim UI contract.
- Monorepo: This package lives under
extra/matyan-uiin the matyan-core repo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file matyan_ui-0.2.0.tar.gz.
File metadata
- Download URL: matyan_ui-0.2.0.tar.gz
- Upload date:
- Size: 16.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd1803f65ec851a8a17c93942d37bb4fe1a402564e53bed99393ebc8a03ccd8d
|
|
| MD5 |
26590aaf70abc0ee95c34fff0f837498
|
|
| BLAKE2b-256 |
f4e51c950ecb2cd876b3571c2d94e354853424209f988368876e6264ca0e26c2
|
File details
Details for the file matyan_ui-0.2.0-py3-none-any.whl.
File metadata
- Download URL: matyan_ui-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfbd8ef358a202af259aa1c6a4b994c1447826ae1d654c2cc11ee7cdd93aca3c
|
|
| MD5 |
476ec35c1166cffc2dae9cefd1c7bd48
|
|
| BLAKE2b-256 |
52dd02320d1da0fbd71c906126a0d76b8a34a0e2a25293552820bd8f78662f1e
|