Factorizer/Cluster ERP WikiCluster ERP Türkçe
Home / Contributing

Reference

Developer tools and scripts

The helper scripts of Cluster ERP in tools/, scripts/, and web-client/ that are not tests: visual checks, probes, performance tools, and one-time scripts.

Besides the pytest suite and the e2e battery, the repository holds helper scripts for developers. They live in tools/, scripts/, and web-client/. This page lists each script with its purpose as its own header comment states it. The backup scripts in scripts/backup/ are operations tooling and are described on backups and restore.

Scope and source

  • Defined in: tools/*.py, scripts/*.py, and the non-suite scripts in web-client/ whose names start with _desktop_, _probe_, _shot_, or name a single tool.
  • Count: 3 files in tools/, 2 Python files in scripts/ outside scripts/backup/, 4 _desktop_*.py, 3 _probe_*.mjs, and 27 _shot_*.mjs scripts, counted with ls.
  • None of these scripts is collected by pytest (pyproject.toml:153) or by the battery runner (web-client/_run_battery.mjs:42-46).

Tools folder

Script Purpose Source
tools/gen_chat_bg.py Generates sketch-style background images for the chat panel tools/gen_chat_bg.py:1
tools/make_license.py Vendor-side licence tool that never ships to customers: it creates a signing key pair and signs licence files tools/make_license.py:1-14
tools/nesting_integration_probe.py Integration probe that exports a nesting job through the REST API, packs it with an external bin-packing library, and imports the result tools/nesting_integration_probe.py:1-14

The nesting probe imports rectpack (tools/nesting_integration_probe.py:18), which is not a declared dependency in pyproject.toml. The licence mechanism is described on app store, licensing, and entitlements.

Scripts folder

Script Purpose Source
scripts/add_procurement_i18n.py Adds procurement keys to en.json and tr.json scripts/add_procurement_i18n.py:1
scripts/fill_empty_tables.py A one-time seeding script from the project's early days, not a test; it needs a running server and fixed record ids scripts/fill_empty_tables.py:1-8

scripts/ is in the scope of the Ruff ratchet (tests/test_static_quality.py:29).

Desktop visual checks

These scripts drive the PySide6 client on the offscreen Qt platform against the test instance and save screenshots.

Script Purpose Source
web-client/_desktop_visual.py Screenshots of the screens a desktop change touched, with real widgets, metadata, and data web-client/_desktop_visual.py:1-10
web-client/_desktop_survey.py Crops of list headers and first rows to inspect header and cell alignment web-client/_desktop_survey.py:1-2
web-client/_desktop_tenant_fields.py Checks tenant-defined fields on the desktop client web-client/_desktop_tenant_fields.py:1-12
web-client/_desktop_intranet_check.py Checks the intranet entity lists, an event card, and a post card on the desktop client web-client/_desktop_intranet_check.py:1-5

Browser probes and screenshots

Script Purpose Source
web-client/_probe_bom_wc.mjs Reproduces whether a work centre can be assigned while building a BOM; cancels every dialog web-client/_probe_bom_wc.mjs:1-4
web-client/_probe_fknew_name.mjs Inspects the field value after creating a category from a form's add button web-client/_probe_fknew_name.mjs:1-2
web-client/_probe_tests_human.mjs Drives every analytics test through clicks only, against the development instance, and asserts what a person can see web-client/_probe_tests_human.mjs:1-5
web-client/_shot_*.mjs (27 files) Capture screenshots of one area for visual review, for example _shot_reference.mjs for the interaction standards and _shot_demo.mjs for a demo node web-client/_shot_reference.mjs:1-4, web-client/_shot_demo.mjs:1-3

Performance and scale tools

Script Purpose Source
web-client/_perf_waterfall.mjs Records, per screen, wall time, every request, the longest serial chain, and long tasks, as JSON for before and after comparison web-client/_perf_waterfall.mjs:1-14
web-client/_load_profile.mjs Lets many virtual users call a mix of screen requests for a fixed time and reports latency percentiles, throughput, and errors web-client/_load_profile.mjs:1-9
web-client/_scale_test_30x250.mjs Runs many companies and users on one self-hosted multi-tenant server and scans every company's database for another company's marker; it touches only scale-test databases web-client/_scale_test_30x250.mjs:1-16
web-client/_route_inventory.py Boots the application in-process and prints every API operation with the permission codes it enforces, for the separation suites web-client/_route_inventory.py:1-15

Build and presentation helpers

Script Purpose Source
web-client/_gen_modulepreload.mjs Writes the module preload list of webapp/index.html from the static import graph; --check fails when the list is stale web-client/_gen_modulepreload.mjs:1-14
web-client/_render_pdf.mjs Renders a local HTML file to PDF with Chromium web-client/_render_pdf.mjs:1-4
web-client/_open_fullscreen.mjs Opens the web app in a full-screen browser window for a presentation web-client/_open_fullscreen.mjs:1-11
web-client/_restart8012.ps1 Restarts only the local test server as a single process and leaves the development server alone web-client/_restart8012.ps1:1-2

tests/test_webapp_asset_links.py runs the same import walk as _gen_modulepreload.mjs in CI (web-client/_gen_modulepreload.mjs:12-14).

Run artefacts

web-client/ also holds generated files: screenshots (*.png), numbered per-run PowerShell scripts that the battery runner replaced (web-client/_run_battery.mjs:5-6), and battery logs. The ignore file excludes the per-run scripts and the battery logs from version control (.gitignore:55-57). These files are outputs, not tools, and are not described one by one.

Legacy web project

The folder web-client/ also contains a Vite and React project (web-client/src/, web-client/e2e/*.spec.ts, web-client/vite.config.ts, web-client/package.json). The server serves the web app from the repository folder webapp/ (src/cluster_erp/server/app.py:1634), not from this project. Its role is not determined from code.


Verified against commit 92f8051 on 2026-11-13.

Verified against commit 92f8051 · 2026-11-13