MAT-Inspect

Role: Technical lead on a team of five. I wrote 26 of the project’s 29 ADRs.

Proof: GitHub repo. ADRs behind the Key Decisions below: 0018, 0028, 0017, 0002, 0012.

Digital pre-use inspections for cranes, trucks, and forklifts. Paper checklists out, tamper-evident records in.

← All work

Problem

A college lab had ten pieces of high-risk equipment: four overhead cranes, two trucks, an electric pallet jack, and three forklifts. Operators had to inspect each one before use, on paper. The sheets were inconsistent and often incomplete. Records went missing. A manager could not tell who had inspected what, and pulling records for an audit was slow.

Alberta safety rules, as the project reads them, require a competent person to complete the inspection and to be identified on the record. So the system had to do three things:

The sponsor also asked for an AI feature. That created the main design problem: use AI without letting it make a safety call.

Role

I was the technical lead for a team of five over a 13-week capstone. I ran the architecture and wrote most of the decision records. I used AI coding assistants (Claude) throughout. For design decisions, I reviewed AI-generated pros and cons and made the calls myself. I own those decisions.

Architecture

Operators use a phone PWA. Managers use a dashboard. Both sit behind one front door, which is Caddy in local and staging runs and Azure Front Door in the cloud demo. Users sign in with Microsoft Entra ID. Behind the front door there are three Fastify services (core API, media, audit) and one Python FastAPI service for AI. PostgreSQL holds two databases, core and audit. The audit writer role can only insert and read.

Operator PWA and manager dashboard reach core-api, media, and audit through one front door. core-api calls the AI service and the core database; audit writes events to an insert-only table in the audit database; media stores photos in blob storage; Entra ID issues the tokens the apps send, and each service checks them. Operator PWA Manager dashboard Front door: Caddy or Azure Front Door Entra IDissues tokens core-api media audit AI serviceWhisper + defect model core DB Blob storagephotos audit DBinsert-only events

Two choices shape the picture. The AI service has no public route and no auth of its own. The PWA reaches it only through core-api, so one auth path covers it (ADR 0019). And a failed blocking item flips equipment to out of service automatically. Return to service needs a supervisor or manager.

Key Decisions

1. The AI never passes or fails an inspection, and it is self-hosted

2. Suggest a defect category on fail notes, and the operator confirms it

3. Cap AI concurrency instead of autoscaling

4. Entra ID replaces Keycloak

5. Call the API with access tokens, not ID tokens

Results