Proximo is a web application for exploring short-term business process simulations. Upload an event log of a running process, a BPMN model and its simulation parameters, and it simulates what happens next from the current state of the process. The result plays back as cases moving through the diagram, with waiting times, workload and per-activity statistics alongside.
Try it online at https://proximo.labx.ee.
The system has two parts:
| Part | Repository | Stack |
|---|---|---|
| Web app (this repository) | Proximo | Next.js, React, TypeORM |
| Simulation service | ongoing-bps-state, branch web-application-version |
FastAPI, Prosimos |
Both use the same MySQL database. The web app also needs Redis.
- Node.js 20 or newer
- Python 3.11
- MySQL 8
- Redis 7
- Docker, if you would rather not install MySQL and Redis yourself, or to run everything in containers
Clone both repositories side by side:
git clone https://github.com/AutomatedProcessImprovement/Proximo.git
git clone -b web-application-version https://github.com/AutomatedProcessImprovement/ongoing-bps-state.gitStart MySQL and Redis:
docker run -d --name prosim-mysql -p 127.0.0.1:3306:3306 \
-e MYSQL_ROOT_PASSWORD=change-me \
-e MYSQL_DATABASE=prosim \
-e MYSQL_USER=prosim \
-e MYSQL_PASSWORD=change-me \
mysql:8.0
docker run -d --name prosim-redis -p 127.0.0.1:6379:6379 redis:7-alpineStart the simulation service:
cd ongoing-bps-state
python3.11 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cat > .env <<EOF
DB_USER=prosim
DB_PASSWORD=change-me
DB_HOST=127.0.0.1
DB_PORT=3306
DB_NAME=prosim
EOF
alembic upgrade head
uvicorn main_web_app:app --reload --host 127.0.0.1 --port 8000In a second terminal, start the web app:
cd Proximo
cp .env.example .envSet MYSQL_HOST=127.0.0.1, MYSQL_USER=prosim, MYSQL_PASSWORD=change-me and MYSQL_DATABASE=prosim in .env, then:
npm install
npm run migrate:run
npm run devOpen http://localhost:3000. The start page offers four sample processes, so you can try it without your own files. The download button next to each one gives its log, BPMN model and parameters as a zip, to try the upload yourself. The BPIC 2017 and P2PFin samples are real logs with models discovered by Simod; their diagrams were laid out again for readability, without changing the process logic. P2PFin is anonymised in the source data, so its activities and resources carry numbered labels. /api/health reports whether the database, Redis and the simulation service are reachable.
The commands below build and start all four containers on one network. Run them from this repository, with the web-application-version branch of ongoing-bps-state cloned next to it, and use your own passwords.
docker network create prosim
docker run -d --name prosim-mysql --network prosim \
-v prosim-mysql:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=change-me \
-e MYSQL_DATABASE=prosim \
-e MYSQL_USER=prosim \
-e MYSQL_PASSWORD=change-me \
mysql:8.0
docker run -d --name prosim-redis --network prosim redis:7-alpine
docker build -t prosim-backend ../ongoing-bps-state
docker run -d --name prosim-backend --network prosim \
-v prosim-processes:/app/processes \
-e RUN_MIGRATIONS=1 \
-e DB_USER=prosim \
-e DB_PASSWORD=change-me \
-e DB_HOST=prosim-mysql \
-e DB_PORT=3306 \
-e DB_NAME=prosim \
prosim-backend
docker build -t proximo .
docker run -d --name proximo --network prosim \
-p 127.0.0.1:3000:3000 \
-v prosim-assets:/app/public/assets \
-e RUN_MIGRATIONS=1 \
-e NEXTJS_MYSQL_HOST=prosim-mysql \
-e MYSQL_HOST=prosim-mysql \
-e MYSQL_PORT=3306 \
-e MYSQL_USER=prosim \
-e MYSQL_PASSWORD=change-me \
-e MYSQL_DATABASE=prosim \
-e TYPEORM_SYNCHRONIZE=false \
-e TYPEORM_LOGGING=false \
-e REDIS_HOST=prosim-redis \
-e REDIS_PORT=6379 \
-e PYTHON_MICROSERVICE_BASE_URL=http://prosim-backend:8000 \
proximoWith RUN_MIGRATIONS=1, each app waits for MySQL and applies its migrations before it starts. The app is then at http://localhost:3000. The port is bound to 127.0.0.1, so put a reverse proxy in front of it to serve it publicly.
A log can stop at the present moment: an event with an empty end time is an activity still in progress. The starting point then defaults to the end of the log. Cases that wait between activities look the same as finished ones in such a log, so the simulation service keeps every case that the BPMN model does not allow to end where it stopped. The sample logs are recorded this way. A log that goes on past the chosen starting point is cut there instead, and a case is open when it has activity after that moment.
Every run saves its computed process state and random seed. What-if reruns from that same state with changed pool sizes, arrival volume or task durations, and opens a comparison of queues, waiting times and resource use. With no changes, a rerun reproduces the original log exactly.
A single run depends on chance, so each what-if also repeats both sides with up to 8 more seeds, and a change is marked better or worse only when all seeds moved the same way, similar otherwise. The repeats share a 60-second budget, set by SCENARIO_REPEAT_BUDGET_SECONDS on the simulation service. Simulations that take long get fewer repeats, and the comparison then says it has too few to judge.
Compare with an empty start, in the same panel, reruns the model with no case in progress to show what the current state changes.
Resources shows busy, idle and off-shift resources per pool, read from the simulated log and the resource calendars. Runs from before these features can show resources, but have to be run again for what-if.
This run lists the starting state, input files, starting point, horizon, time zone, seed and case counts of a run. Waiting and processing times count the time a case spent at a task before the starting point, so runs saved before the taskTimes frame column existed show less of it until they are run again.
The web app reads these variables from .env, or from the container environment:
| Variable | Purpose |
|---|---|
MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE |
Database connection |
TYPEORM_SYNCHRONIZE |
Keep at false; the schema is managed by migrations |
TYPEORM_LOGGING |
Logs SQL queries when true |
REDIS_HOST, REDIS_PORT, REDIS_PASSWORD |
Redis connection |
PYTHON_MICROSERVICE_BASE_URL |
Address of the simulation service |
CLEANUP_TOKEN |
Enables /api/internal/cleanup; see cron/README.md |
RETENTION_DAYS |
Days before an unopened simulation is deleted, 30 by default |
NEXTJS_MYSQL_HOST and NEXTJS_MYSQL_PORT are used only by the container start script, to wait for MySQL.
npm test # unit tests
npm run test:integration # API routes against real MySQL and Redis; needs Docker
npm run test:e2e # Playwright; starts the dev server on port 3000
npm run lintnpm run migration -- <Name> # generate a migration from entity changes
npm run migrate:run # apply pending migrationsThe simulation service keeps its own migrations, which run with alembic upgrade head.
Pushes to main run the tests in .github/workflows/deploy.yml. Old simulations are removed by a nightly cleanup, described in cron/README.md.