AI-Based Manpower Tracking System: Operations Dashboard & RFID Workforce ML Pipeline
This project is a comprehensive, end-to-end AI manpower tracking system designed for industrial or warehouse operations. It is composed of two highly coordinated parts: a modern Next.js operations dashboard and a robust, offline Python ML pipeline.
The dashboard provides authenticated administrators with a centralized view to monitor workers across defined zones (e.g., Assembly, Welding, Packing). Users can view real-time status (Active, Idle, Abnormal, Offline), review detailed tracking event timelines, and manage severity-based alerts. All domain data—including workers, zones, readers, and alerts—is managed via a typed tRPC API layer backed by SQLite and Prisma.
Visually, the system features a live floor map that polls worker positions every few seconds, rendering zone geometry and simulating movement within defined boundaries. Furthermore, we integrated a fixed staff chatbot utilizing OpenRouter, which answers natural language queries grounded in the live worker, zone, and alert context, with a deterministic database fallback for reliability.
Complementing the frontend is the core ML codebase. This pipeline ingests raw RFID-derived workforce CSV data, performs rigorous cleaning and normalization, engineers complex behavioral and temporal features, and trains a Random Forest classifier. The model achieved high accuracy (approx. 99.9% weighted accuracy) and outputs necessary artifacts for reporting. FastAPI is included to define the planned inference service contract, ensuring a clear path to integrate real-time predictions back into the dashboard's operational state.
Features
- Credential-based admin authentication with protected routes
- Live floor map visualization with zone geometry and worker polling
- ML-driven worker status classification pipeline
- LLM-powered staff assistant with database fallback
- Alert management system with severity levels
- Typed API layer (tRPC) for data consistency
- Comprehensive worker profile and status timeline view
Challenges
The primary challenges included cleaning and engineering usable features from raw RFID workforce data, managing the separation between the real-time dashboard UI and the batch-trained ML pipeline, ensuring the live map state remained consistent under polling and partial JSON failures, and grounding the chatbot to prevent hallucinations when answering operational queries.
Solutions
We developed a repeatable ML pipeline (clean → engineer → train → validate) with versioned artifacts. For the dashboard, we utilized Prisma and tRPC to enforce a single, typed server boundary. The live map was built with Zod validation and fault-tolerant fallbacks. The chatbot was grounded by injecting the latest database summaries into the LLM prompt, and a clear inference contract was documented to connect the trained Random Forest outputs to the dashboard's state management layer.