Plastic Plus operations dashboard
An operations dashboard that reads the lab’s report files and shows where each figure came from and how old it is.
- Year
- 2026
- Stack
- React Router, SQLite, ECharts, a CSV file watcher. Diagnosis: Linux, cron, bash, MariaDB, Grafana.
Client: Plastic Plus

The problem
A Toronto optical lab's operations dashboard had stopped updating. Grafana was fine. The import from the lab's report files into MariaDB had stopped, so the board kept showing old numbers. The lab's managers watched the floor on it, and it showed only the latest export and kept no history, so last week couldn't be compared with this one.
Behind the board sat a pipeline nobody had written down: Windows shares, CIFS mounts, bash loaders that empty and reload MariaDB tables, Grafana and about 20 PHP email reports.
- 20PHP email reports in a pipeline nobody had written down
My part
Diagnosis first, then design and build, with the lab's VP shaping the product. I traced the stoppage to scheduled jobs on a host I had no login for, which the lab's previous developer restarted. I mapped the pipeline, wrote an architecture note and a report inventory for the VP, and found why the redo and rework panels could never work: three import scripts expected 18 to 23 columns from an 11-column breakage file. I built the new board on my own.
- 18 to 23columns the import scripts expected
- 11columns in the breakage file
Architecture
A React Router app on SQLite that runs on one machine on the lab network, with no cloud. Its only way in is the CSV reports the lab's two production systems already write to a shared folder, which it reads without writing back. A watcher polls the share, waits two seconds for a file to settle, fingerprints it and ingests it through one adapter per report: 13 configured sources and 9 adapters. A source is a row of configuration, not a module, so a renamed column or a new file name is an admin edit and not a deploy.
Every read leaves a row in a feed log, good or bad, and every figure on screen names the file it comes from and how long ago that file changed. Pages and a wall-screen view for the floor's TV update over server-sent events when a good read lands. There are seven pages, nine admin sections, per-page roles, saved views, CSV and Excel export and scheduled backups with a staged restore. Charts are drawn with ECharts.
- 13configured sources
- 9adapters, one per report
Hard parts
Files that arrive broken. On the lab's share, copies arrive half-written, a copy or restore re-dates a file, and one export never ends with a line break while the others always do. The watcher polls with a two second settle, and six checks run before a read is accepted, catching a cut-off copy, a missing column or rows falling by a third. A read that fails writes nothing, keeps the last good figures and says why in the admin screen. 74 test cases cover those guards.
Hourly output without an hourly report. The lab has no report of output per hour, but its work-in-progress file is rewritten every few minutes. Each copy is compared with the last known station of every tray, and every tray that changed station is recorded as a timestamped move. Those moves build the station-by-hour grid. The cost is that history starts on the day collection starts.
Dates that mean different things. Only a real month, day and year date parses, so a day-first export produces mostly rejected rows once the day passes 12 and the read is refused, instead of silently swapping months and days. Work in progress is aged to the file's day and not to today, so a quiet weekend doesn't make every job a day later.
- 74test cases cover the guards
Outcome
I handed the dashboard over to the lab. It keeps a history, shows the source and age of each figure, and marks stale source files in amber. The lab can change targets and file mappings from the admin screen. The lab kept using its existing board. The gallery uses made-up shops and clients.
Gallery
Hourly output by station, calculated from moves in the work-in-progress reports. Fixture data. The lab can adjust its targets from the admin screen. Fixture data.
