HAFIDZ
Back to selected work

CASE STUDY

IoT / Web Application 2026

IoT-Based First Aid Box Monitoring System

An IoT-based first aid box monitoring system connecting a door sensor and ESP32-CAM to a Laravel web application. The system handles box-opening detection, visual evidence capture, Telegram notifications, staff review, missing-item records, stock movements, monitoring dashboards, and reporting.

TECHNOLOGY

Laravel 12 / PHP 8.2+ / MySQL / Bootstrap 5 / Tabler / ESP32-CAM / Arduino / C++ / MC38 Magnetic Door Switch / Telegram Bot API / Laravel Queue / FFmpeg / Laravel Excel / DomPDF

Preview of IoT-Based First Aid Box Monitoring System

THE CHALLENGE

First aid box monitoring previously relied on periodic manual inspections, meaning missing items could only be identified when an inspection was performed. The process also lacked a structured usage history to help staff determine restocking needs and monitor first aid item usage.

WHAT I BUILT

  1. 01

    IoT pipeline from door sensor and ESP32-CAM to an authenticated Laravel API.

  2. 02

    Frame-based recording with photo fallback and asynchronous video processing.

  3. 03

    Queue-based Telegram notifications with direct links to event details.

  4. 04

    Review workflow integrated with missing-item records and stock movements.

  5. 05

    Monitoring dashboard and filtered reports with PDF and Excel exports.

APPROACH

The system integrates a magnetic door switch and ESP32-CAM with a device-authenticated Laravel API. When the box is opened, the device records a sequence of JPEG frames and uploads them to the server as an event. The backend privately stores the evidence, processes recordings through a queue, sends Telegram notifications, and provides a review interface for staff to record missing items. Review results are then connected to stock movements, monitoring dashboards, and reports.

Camera event review page with recording playback, event information, and a form for recording missing first aid items. Open screen 01 at full size
Screen 01 Staff review visual evidence from a box-opening event and record missing items before the review is reflected in inventory records.
ESP32-CAM device management page showing device codes, assigned first aid boxes, status, and last activity. Open screen 02 at full size
Screen 02 ESP32-CAM devices are managed and assigned to first aid boxes so their operational status can be monitored from the application.
First aid stock movement history showing incoming and outgoing transactions and their relationship to reviewed events. Open screen 03 at full size
Screen 03 The stock ledger records item changes from manual adjustments and event reviews, including references to events that triggered stock deductions.
First aid monitoring report page with period filters, item usage statistics, event history, stock conditions, and PDF and Excel exports. Open screen 04 at full size
Screen 04 Reports combine event statistics, frequently missing items, review history, and stock snapshots with PDF and Excel export support.
Exported PDF report for first aid box monitoring containing event statistics, missing-item data, and review history. Open screen 05 at full size
Screen 05 Monitoring reports can be exported to PDF, providing event and item usage summaries in a document format.

OUTCOME

The implementation delivers an end-to-end monitoring workflow from box-opening detection through review and reporting. The system can manage visual evidence, convert frame sequences into video when FFmpeg is available, retain frame-based playback as a fallback, record missing items, update stock movement history, present monitoring statistics, and generate PDF and Excel reports.

Working on a similar system?

Share the workflow or problem you want to solve. I can help clarify the technical requirements and a practical implementation approach.

Discuss a Project