M-TRACK Manufacturing Control System - Complete Application Summary

Purpose

M-TRACK is an internal manufacturing control system for a shop floor environment. It manages jobs, components (parts), operations (work steps), inventory, and worker task assignments. The app is designed for two user types: Admins (managers who create jobs, assign work, and monitor production) and Workers (shop floor operators who execute tasks).

The system is self-hosted on a Windows machine and accessed remotely via web browser (including mobile devices on the shop floor).


Deployment


Authentication & Access Control

Two-Tier Login System

PIN Management

Sessions

Role-Based Access


Core Data Model

Jobs

A job represents a manufacturing order (e.g., building a specific machine for a customer).

Fields:

Components

A component is a part or subassembly within a job. Components form a tree hierarchy (parent-child relationships).

Fields:

Operations

An operation is a specific work step on a component (e.g., "Cut this part", "Weld this part").

Fields:

Operation Dependencies

Explicit cross-component blocking relationships.

Fields:

Inventory Items

Unified inventory system for all materials, manufactured parts, and consumables.

Fields:

Inventory Transactions

Audit trail for every stock change.

Fields:

Reorder Alerts

Tracks inventory replenishment requests.

Fields:

Time Study Events

Performance tracking log.

Fields:

Users

Fields:

Process Types

Configurable list of available manufacturing processes (admin-managed).

Fields:

Other Tables


Key Features

1. Job Management

Creating Jobs:

Job Templates:

Job Lifecycle:

Job Priority:

2. BOM Import

File Format:

Column Detection:

Inventor File Name Parsing:

Major Component Codes:

Two-Pass Component Creation:

  1. First pass: Creates subassemblies (items with whole-number IDs like "1", "2") as type "assembly"
  2. Second pass: Creates parts (items with decimal IDs like "1.1", "1.2") as type "material", assigned to their parent subassembly

Filtering Logic:

BOM Update:

Thumbnail Extraction:

3. Component Tree & Hierarchy

4. Operations & Dependencies

Operation Creation:

Bulk Operations:

Operation Reordering:

Dependency System (Three Layers):

  1. Sequential: Within a component, operations must complete in order index sequence
  2. Hierarchical: Assembly operations are blocked until all child components are completed
  3. Explicit: Cross-component dependencies defined in the operation_dependencies table

Blocking Logic:

Priority Calculation:

5. Batch Task Grouping (Cutting Operations Only)

What Gets Batched:

Grouping Criteria:

Why Batching Exists:

Batch Display:

6. Task Naming Format (Two-Line Display)

All work items (batches and individual operations) are displayed in a consistent two-line format:

Line 1 (Title): [Process] [Product] [Main Assembly] [Sub-Assembly]

Line 2 (Subtitle): [Thickness] [Material] - [Customer] - [Serial Number]

7. Worker Queue / "Next Work" View

Purpose:

Three Sections:

  1. In Progress: Tasks the worker has already started
  2. Stalled: Tasks that are paused with a reason
  3. Pending: Tasks available to start, ordered by priority

Mixed Content:

Priority Ordering:

  1. In-progress items appear at the top
  2. Higher job priority (lower number) comes first
  3. Earlier due dates come first (no due date goes to bottom)
  4. Blocked items are pushed to the bottom with a reason displayed

Worker Actions:

Admin View:

8. Shop Floor View

Two Modes:

Batch View (Task-Based):

Kanban Board (Component-Based):

9. Dashboard

Stat Cards (Clickable):

Charts:

Work Management:

Job Detail Dialog:

10. Inventory Management

Three Categories (Tabs):

  1. Materials: Raw materials (steel, aluminum, etc.)
  2. Manufactured Parts: Parts produced in-house (machined parts with stock tracking)
  3. Consumables: Shop supplies (welding wire, grinding discs, etc.)

Item Number Auto-Assignment:

CRUD Operations:

Low-Stock Alerting:

Reorder Alert Workflow:

QR Code / Kanban Cards:

Machining Integration:

11. Time Study / Performance Reports

Event Tracking:

Reports (Admin Only):

12. Tutorial / Onboarding System

Automatic Trigger:

8 Steps:

  1. Welcome to M-TRACK
  2. Dashboard overview
  3. Jobs Management
  4. Shop Floor
  5. Inventory
  6. Your Work Queue
  7. Settings
  8. Completion ("You're Ready!")

Controls:

Implementation:

13. Settings Page

For All Users:

For Admins:

14. Architecture Diagram


UI Navigation

Sidebar

Responsive Design


Key Business Rules

  1. Cutting operations batch together by material + thickness + job. All other processes are individual operations.

  2. Operation blocking prevents workers from starting work out of sequence. Sequential order within a component, assembly hierarchy, and explicit cross-component dependencies all contribute to blocking.

  3. BOM updates preserve existing work. Re-importing a BOM updates metadata but does not delete operations that have already been started or completed.

  4. Machined parts can be fulfilled from inventory instead of re-machining, saving production time.

  5. Reorder alerts fire automatically when stock hits the reorder point, but can also be triggered manually via QR scan.

  6. Priority scoring is automatic based on due date and component weight, but jobs also have a manual priority override (1-5).

  7. Workers only see operations matching their assigned processes. A worker assigned to "cutting" and "bending" won't see welding tasks.

  8. Admins can override operation blocking with a reason and optional expiration time.

  9. Time study events are created automatically whenever a worker starts, stalls, or completes an operation.

  10. Process types are configurable - admins can add new process types without code changes.


API Overview

Authentication

Users

Jobs

Components

Operations

Batch Tasks & Worker Queue

Inventory

Machined Parts

Consumables (Legacy)

Alerts & Scanning

Reports & Config

Subtasks


Architecture Diagram (Text)

+------------------+     HTTP/REST     +------------------+     SQL      +------------------+
|                  | <===============> |                  | <==========> |                  |
|   React SPA      |                   |   Express.js     |              |   PostgreSQL     |
|   (Frontend)     |                   |   (Backend)      |              |   (Database)     |
|                  |                   |                  |              |                  |
|  - Dashboard     |                   |  - REST API      |              |  - Jobs          |
|  - Jobs          |                   |  - Session Auth  |              |  - Components    |
|  - Shop Floor    |                   |  - BOM Parser    |              |  - Operations    |
|  - Worker Queue  |                   |  - Batch Logic   |              |  - Dependencies  |
|  - Inventory     |                   |  - Priority Calc |              |  - Inventory     |
|  - Settings      |                   |  - File Upload   |              |  - Time Study    |
|  - Time Study    |                   |                  |              |  - Users         |
|  - Scan (QR)     |                   |                  |              |  - Sessions      |
|                  |                   |                  |              |                  |
+------------------+                   +------------------+              +------------------+
        |                                      |
        |  Single server process               |
        |  serves both frontend                |
        |  static files and API                |
        +--------------------------------------+

User Flow Diagram (Text)

                    +------------------+
                    |   Landing Page   |
                    |  (User Select)   |
                    +--------+---------+
                             |
                    +--------+---------+
                    |  Worker or Admin? |
                    +--------+---------+
                             |
              +--------------+--------------+
              |                             |
     +--------v---------+        +---------v--------+
     |  Worker Login     |        |  Admin PIN Entry |
     |  (No PIN needed)  |        |  (4-6 digits)    |
     +--------+----------+        +---------+--------+
              |                             |
              +-------------+---------------+
                            |
                   +--------v---------+
                   |    Dashboard      |
                   | (Role-specific)   |
                   +--------+---------+
                            |
        +-------------------+-------------------+
        |           |           |               |
   +----v----+ +---v----+ +----v-----+  +------v------+
   |  Jobs   | | Shop   | | Worker   |  | Inventory   |
   |         | | Floor  | | Queue    |  |             |
   +---------+ +--------+ +----+-----+  +------+------+
                                |               |
                         +------v------+  +-----v-------+
                         | Start/Stall |  | Reorder     |
                         | Done Actions|  | Alerts      |
                         +-------------+  +-------------+

Important Implementation Notes for Recreation

  1. The "isCuttingProcess" helper must use case-insensitive matching. Check if processType.toLowerCase() includes "cutting" or "cut", OR equals "material". This is critical for batch grouping to work with process types like "Sheetmetal cutting" or "Steel Tube cutting".

  2. BOM import uses two libraries: xlsx for reading spreadsheet data, and exceljs for extracting embedded images (thumbnails). They serve different purposes and both are needed.

  3. The worker queue mixes batched and individual items in a single prioritized list. Cutting operations are grouped into batches; everything else is individual. This is the "Next Work" endpoint.

  4. Operation status transitions: pending -> in_progress -> completed (or stalled from in_progress, then resumed back to in_progress). The "skipped" status exists for operations bypassed via inventory fulfillment.

  5. The task naming two-line format must use " (double quote character) instead of "in" for inches in thickness. The thickness value should be displayed as it comes from the BOM with this one normalization.

  6. Subtitle parts are joined with " - " (space dash space) as separators. Empty parts are omitted entirely.

  7. Assembly blocking: An operation on an "assembly" type component is blocked until ALL child components (and their children, recursively) have status "completed".

  8. Session-based auth means the server must support sessions. The worker login flow explicitly prevents admin role users from using it (they must use PIN).

  9. Inventory auto-numbering assigns the next available number in the category range when creating new items.

  10. Reorder alerts deduplicate - the system should check for existing pending alerts before creating duplicates.

  11. BOM update (re-import) preserves work - when updating a BOM, existing operations with status in_progress or completed must not be deleted. Only add new components, remove components that no longer exist in the BOM, and update metadata on existing ones.

  12. The priority recalculation processes all active (non-template, non-archived) jobs and updates every operation's priorityScore and priorityTier based on current date vs. due date.