From Record-Keeper to Decision Hub: Rebuilding PMC Decision-Making with Tauri + Rust + Layered AI
Over the past year we rebuilt PMClite from "an Excel-replacement scheduling tool" into an "event-driven PMC decision hub." This article is the full technical retrospective — why we changed direction, how we did it, and what we learned along the way.
It is not a feature list and not an ad. It tries to answer one question: when an on-premise scheduling system needs to become a decision desk that "thinks," what actually has to change?
1. The starting point: why SMB PMC still runs on "human judgment"
After working with dozens of 10–200 employee manufacturers, one pattern shows up again and again: ERP keeps the books, but the scheduling decision layer is still broken.
A PMC planner's day looks like this: open three or four Excel files, export data from ERP, manually VLOOKUP materials, and fill dates cell by cell based on experience. Once product variety passes 50, a full schedule revision routinely takes over two hours — and a single change often cascades.
The real pain is not "no data." It is:
· Anomalies surface too late — shortages are discovered on the line
· Impact can't be predicted — who gets displaced by a rush order? Will the delivery slip? Nobody knows
· Coordination runs on shouting — chasing purchasing, asking the floor, scattered across WeChat and hallway conversations
PMClite started as a response to exactly this group: factories that don't want to move to the cloud and can't afford a heavyweight APS. We set out to build something that helps them decide, not just record.
2. Tech stack: why Tauri + Rust + SQLCipher?
"Many factory PCs are five-year-old machines. Not hogging resources and starting fast matters more than anything." That was our earliest trade-off.
| Dimension | Tauri (our choice) | Electron |
|---|---|---|
| Installer size | ~30 MB | ~150 MB |
| Resident memory | ~60 MB | ~200 MB |
| Cold start | < 1 s | 2–4 s |
For the database we chose SQLCipher, the encryption fork of SQLite. The reason is simple: users explicitly require that "data must not leave the machine." For sensitive data like cost prices and customer lists, local encrypted storage is a baseline, not an option.
The Rust side carries all deterministic computation: recursive BOM expansion, kit checks, capacity load, scheduling. This is also what makes the "layered AI" later possible — because the algorithmic layer is reproducible and auditable, AI has something legitimate to explain.
3. The core upgrade: from "viewing data" to "making decisions"
This is the heart of the article. We didn't stop at building a fully featured spreadsheet replacement — we rebuilt the skeleton of the system around PMC's decision lifecycle.
3.1 Event-driven engine: let the system push work to you
We introduced an event-driven core. The system scans data continuously and derives shortages, delivery risks, and capacity overloads into a list of "pending decisions" that land on the decision desk.
// Event derivation sketch (Rust side)
// Periodically scan active work orders and emit shortage events
fn derive_shortage_events(conn: &Connection) -> Vec<Event> {
// 1. Query all active work orders
// 2. Run kit check (check_kit_status) on each
// 3. If a shortage exists, emit a fingerprinted event to dedupe
// 4. Compute severity (red / amber) from delivery urgency
// ...
}
The effect is visible immediately: the first thing a PMC sees on opening the app is no longer a wall of tables, but "the things that must be handled today." Resolved events move into history; the decision desk only ever shows "what needs attention now."
Internally, we describe this as "the system pushes work to you, not the other way around."
3.2 Layered AI: algorithms compute, AI explains
We are deliberately restrained with AI. Manufacturing scheduling is deterministic computation; there is no room for LLM hallucinations.
- Algorithm layer (deterministic): BOM expansion, kit calculations, capacity load, and scheduling are all done by deterministic Rust code, guaranteeing reproducibility and auditability.
- AI layer (explanatory): the LLM is strictly scoped to "explain" and "summarize." When you click the "🤖 AI explain" button on an event, the system first queries structured data via tools (shortage detail, in-transit POs, historical reports) and only then asks the LLM to generate a plain-language explanation grounded in that real data.
Every number must be traceable and checkable. This "human-in-the-loop" mode is far easier for seasoned PMC staff to accept than fully automated AI scheduling — the system is a co-pilot, not an autopilot.
3.3 Sandbox simulation: show the impact before you commit
This is the killer feature for PMC. Traditional schedulers apply changes immediately — and PMC's biggest fear is the chain reaction.
Our sandbox simulation lets a user move a work order to a new line or date without writing to the database. Using the same core algorithms (calcResourceHours and friends), the system computes in real time:
- The target work order's new completion date;
- How many days displaced work orders get pushed;
- Whether any linked sales order will slip.
Only after the user confirms "impact is acceptable" does the change commit. The black-box "system suggestion" becomes a transparent decision sandbox the PMC can actually reason about.
3.4 Mobile closed loop: let data flow back from the floor
Using Tauri's cross-platform capabilities, we embed a lightweight H5 reporting service on the host machine (port 8766). Workers scan a QR code (or type the URL in a browser) and file their output reports from a phone.
- Dynamic push: on startup, the host automatically posts the access link to DingTalk / WeCom groups — no IP to remember.
- Event linkage: anomalous reports (e.g. output off plan by >10%) automatically generate a "report confirmation" event on the desktop decision desk for the PMC to review. Normal reports simply update work order progress without interrupting the PMC.
This closes the plan → execute → feed back loop, and gives PMC decisions a real-time basis from the shop floor.
4. Data governance: taming "event explosion"
The side effect of event-driven design is fast-growing data volume. We addressed it with three layers:
- The decision desk only loads active events — historical volume never affects daily use.
- History has its own entry point — paginated and filterable, meant for retrospective review.
- Automatic archival — events resolved for more than 90 days are aggregated into monthly statistics (preserving trend value), and raw detail is deleted after backup. Database size stays under control long-term.
This way, "event-driven" stops being a burden and becomes a long-term advantage.
5. What's next: toward a PMC agent
Our next step is to evolve the system from a "decision-assist tool" into a "PMC agent."
- From "explain" to "recommend": let the AI use historical decision data (what kind of problem was usually handled how) to suggest concrete actions.
- Bounded autonomous execution: within explicitly authorized boundaries (e.g. "minor weekly-plan adjustments for standard products"), the agent can execute and log — PMC only audits afterward.
- Data as an asset: the scheduling rules and exception-handling experience accumulated over months of use become a factory-specific, reusable knowledge base. Data finally becomes an asset.
No matter how far we go, the "algorithms compute, AI explains" principle stays. The first thing any manufacturing AI rollout must preserve is determinism.
6. Closing thoughts
The real point of this upgrade is not the AI features. It is using engineering discipline to make PMC's decision process structured, computable, and collaborative. Algorithms hold the deterministic baseline; AI lifts the information-processing efficiency; "human-in-the-loop" keeps the system controllable and trustworthy.
Our take on SMB digitalization: "light" is not about a thin feature set — it is about solving the core problem precisely without adding new burdens.
We're still on this path — feedback and discussion are welcome.
Want PMC to move from firefighting to driving?
On-premise · One-time purchase · Live in 1–3 days · 30-day full-feature trial
Explore PMClite →Algorithms and architecture details referenced in this article reflect our public demo builds; the shipped product takes precedence. PMClite is an independent product and has no commercial relationship with any third-party vendor mentioned in this article.