Skip to content

// Laravel

Order Monitor

A zero-touch fraud monitor for a Magento store that reads invoice emails through Microsoft Graph and raises alerts for suspicious order bursts, built with Laravel and Vue.

Type
Fraud & anomaly alerting
Built with
Laravel & Vue
Client
Keys.Express
Order Monitor sign-in page: "Live order activity and fraud alerts for Keys.Express" beside a staff sign-in form
Order Monitor // Laravel

01 06

Overview

Order Monitor is an internal web app that watches a Magento store’s order flow in near real time and raises fraud alerts without touching the shop at all. It reads invoice emails from a Microsoft 365 mailbox, turns them into structured orders, runs alert rules over sliding time windows, and shows everything on a live dashboard.

02 06

Challenge

The store sells digital product keys, which makes it an attractive target for fraud: a stolen account or a bot can place many orders in minutes, and “Pay by Invoice” orders deliver the product before any money arrives. The Magento shop could not be touched — no extensions, database access, API calls or cron jobs on the shop server — customer data had to stay protected with least privilege everywhere, and the whole thing had to run on ordinary shared hosting.

03 06

Solution

The shop already sent a copy of every invoice email to a shared Microsoft 365 mailbox, so that became the event stream. The app authenticates to Microsoft Graph with a certificate and is limited by Exchange Online RBAC for Applications to that one mailbox, using only read requests. A crash-safe delta sync saves its cursor only after messages are committed, a label-driven parser handles invoices in five languages and three currencies, and an email only counts as an order when it comes from a known sender and passes DMARC. Alert rules run over sliding windows, and overlapping windows merge into a single incident instead of a flood of duplicates.

04 06

Results

The monitor sees every order without any connection to Magento, runs on standard shared hosting with a single cron entry, and is covered by a Pest test suite spanning sync, parsing, alert windows, DMARC verification and access rules.

Feature tests with Pest
87
Invoice languages parsed
5
Changes to the Magento shop
0

05 06

Key features

  • Live dashboard with orders today, sales per currency, activity chart and sync health badge
  • Order burst alerts over sliding windows (default 10 orders in 10 minutes)
  • Pay by Invoice value alerts tracked per currency, with no guessed exchange rates
  • Alert workflow to acknowledge, investigate, resolve and reopen, with an audit log
  • Orders page with search, date, currency and payment-method filters
  • Admin settings for rule thresholds, mailbox status and certificate expiry
  • Invite-only accounts with required two-factor authentication
  • No customer names, addresses or emails sent to the browser

06 06

Development process

  1. Step 1: Sync

    Every minute, a Microsoft Graph delta query fetches only new messages from the shared mailbox, recovering from expired tokens and following Retry-After on throttling.

  2. Step 2: Parse

    Invoice emails in German, English, French, Italian and Spanish become orders in EUR, CHF or USD, stored as integer minor units; reminders and other mail are set aside.

  3. Step 3: Evaluate

    Each new order is checked against the window before it, so an alert fires as soon as a threshold is crossed, and overlapping windows extend one incident.

Stack

  • Laravel
  • PHP
  • Vue
  • Inertia.js
  • TypeScript
  • Tailwind CSS
  • ApexCharts
  • Microsoft Graph API
  • SQLite
  • MySQL
  • Pest

// Keep exploring

01 // Laravel

TalentKonekt home page: "Hire verified Filipino talent" hero with a choice between hiring and looking for work

TalentKonekt

A Laravel hiring platform that connects employers with verified Filipino talent, with AI-assisted matching, job posting, and talent search.

  • PHP
  • Laravel
  • JavaScript
  • MySQL
  • +1

02 // Magento

PureGear home page: iPhone 18 case hero banner with a Shop Now button below the Shop by Device and Shop by Category menu, above a Shop by Model carousel

PureGear

Ongoing work on PureGear’s Magento store for phone cases, screen protection and power accessories: a Klaviyo integration, fixes to the main menu and category filters, and new store pages.

  • Magento
  • PHP
  • JavaScript
  • Klaviyo

03 // WordPress

Carwraps home page: "Custom Car Wraps and Vehicle Graphics" headline and Get a Quote button beside a fully wrapped SUV, above a row of client logos

Carwraps

A WordPress and Divi website for a Los Angeles car wrap and vehicle graphics company, built from the ground up and maintained since, with a before-and-after wrap slider, project galleries and a quote form.

  • WordPress
  • Divi
  • PHP
  • JavaScript

// Your project next

Need something like this?

Tell me about your goals and constraints — I’ll reply within one business day.