Back to Factorial

How Factorial works

Factorial runs the process-improve Python package inside your browser tab. The server sends the app's files and nothing more: your factors, results and analyses stay on your machine.

What runs where

factori.althe app's files and the process-improve wheel
jsDelivrPyodide, its Python packages, and Plotly.js
PyPIopenpyxl and plotly

Your browser tab

The pagethe form, the tables and the charts
A worker running PythonCPython in WebAssembly, with process-improve
This browser's storageyour studies and a draft of the one you are writing

What reaches a server

What this copy is built with

These are the versions this copy of Factorial loads, read from the files it loads them by: runtime.json and wheels/manifest.json.

process-improvethe wheel built with this copy
Python, in WebAssemblyPyodide
From the Pyodide releasenumpy, pandas, scipy, statsmodels and more
From PyPIopenpyxl and plotly
ChartsPlotly.js

Read the code

All of it is open source, under the MIT license, at github.com/kgdunn/process-improve. To check what it does with your data, these are the places to read:

Run it yourself

Factorial is a folder of plain files, so it runs on any web server. To build that folder from the code and serve it on your own machine (with uv installed):

git clone https://github.com/kgdunn/process-improve
cd process-improve
uv sync --all-extras
uv run python scripts/build_web_app.py --out site --serve

then open http://localhost:8000. The site folder can be copied to any web server: nginx, Apache, Caddy, an internal server or GitHub Pages. It has to be served over HTTP, as Python's files are fetched by the worker, so opening index.html from a disk does not work. deploy/factorial/ holds the setup that serves factori.al, with deploys and roll-backs, as a worked example.

On a network without access to the internet, the browser has to fetch Pyodide, the two PyPI packages and Plotly.js from inside it as well: copy them to a server there, and change their addresses in web/worker.js (Pyodide and the PyPI packages) and web/charts.js (Plotly.js).