Skip to content
pearse.dev

02 MTS platformAug 2025 – Present

wetlabs.app

Surgical-training video platform — wetlab stations record surgeons, an AI model segments the footage into procedure phases, and every surgeon gets a personal video library.

Role
Lead and sole engineer
Period
Aug 2025 – Present
Code
Private repository
test files
~490
ADRs
22
  • Django 5.2
  • Celery + Redis
  • PostgreSQL
  • FFmpeg
  • nginx X-Accel-Redirect
  • PyTorch (ResNet50 + MS-TCN++)
  • Qwen3-VL via Ollama
  • MediaMTX (SRT / LL-HLS)
  • Web Push / PWA
  • OpenTelemetry
  • Playwright + axe

What it does

  • Station check-in via QR placards; recordings auto-attach to the right surgeon and session.
  • FFmpeg pipeline for transcoding, thumbnails and progressive playback; chunked uploads up to 10 GB.
  • A trained phase model segments each procedure into chapters; non-work time is skipped in the player rather than cut from the file.
  • Surgeons own their library; share-for-review links for mentors; faculty annotations on the timeline.
  • Live view of a capture station in the browser, from SRT ingest to LL-HLS.
  • Consent register, anonymous event surveys with receipts, tiered session lifetimes.
  • Installable PWA with push notifications; white-label theming per congress.
  • Automatic footage deletion six months after the event — the retention policy is encoded in the product.
How it fits together
Surgical-video platform architectureA capture station, checked in by QR placard, uploads recordings in chunks to a Django 5.2 application backed by PostgreSQL. Django queues work in Redis for Celery workers, which run FFmpeg for transcoding and thumbnails, the trained phase model (ResNet50 + MS-TCN++) that chapters each procedure, and, as an opt-in, Qwen3-VL via Ollama. Finished video reaches the surgeon's browser through nginx X-Accel-Redirect, and live view streams from the station over SRT into MediaMTX and out to the browser as LL-HLS.Capture stationQR check-inMediaMTXSRT in · LL-HLS outBrowsersurgeon librarylive view · PWADjango 5.2chunked uploadnginxX-Accel-RedirectRedistask queuePostgreSQLlibrary · chaptersCelery workersvideo pipelineFFmpegtranscode · thumbnailsPhase modelResNet50 + MS-TCN++chapters by phaseQwen3-VLvia Ollama · opt-inuploadvideoSRTLL-HLSCapture stationQR check-inMediaMTXSRT in · LL-HLS outDjango 5.2chunked uploadPostgreSQLRedistask queueCelery workersvideo pipelineFFmpegtranscodethumbnailsPhase modelResNet50 + MS-TCN++chapters by phaseQwen3-VLvia Ollama · opt-innginxX-Accel-RedirectBrowsersurgeon librarylive view · PWAuploadvideo

A wetlab is a room full of microscopes, practice eyes and surgeons learning a technique for the first time. wetlabs.app puts a camera on each station and turns the raw footage into something a surgeon can actually use afterwards: their own procedure, chaptered by phase, in a library they control.

It is the product I have lived with longest. It started in August 2025 as a video pipeline — FFmpeg, Celery, thumbnails — and grew into a platform with check-in, consent, live view, surveys and a trained phase model. It runs at live congresses, which means every release is tested against a hard deadline and a room that cannot wait.

The AI decision is the one I would defend first. A general vision-language model could describe a frame; it could not reliably tell me where phase three ended. A small supervised model, trained on our own footage and judged against a locked test set, could. The VLM is still there for the cases where it earns its place, but it is opt-in.

What it does in depth

Observability and incident response

Built in Aug – Sep 2026; it watches MTS Hub as well.

Two production Django apps, two self-hosted CI runners, a handful of VMs and one engineer. That is not enough people to watch dashboards, so the dashboards have to watch themselves. The stack is deliberately boring; the novel part is the responder. When an alert fires, an agent with read-only access to the signals writes a short diagnosis into the same Telegram thread, before I have unlocked my phone. It is wrong sometimes. It is fast every time, and it always shows its working.

  • Logs, metrics and traces in one place; distributed tracing instrumented in both production Django apps.
  • Self-hosted error tracking and synthetic uptime, login and TLS checks.
  • Alerts routed to Telegram; an AI agent reads the alert, pulls the relevant signals and posts a first diagnosis.
  • Encrypted nightly backups with a rehearsed restore; credential-rotation scripts.
  • A test asserts that every alert rule is capable of firing — an alert that can never trigger is worse than none.
  • Secrets never pass through argv, and the bot token is isolated in a local relay process. Entirely EU-hosted.
  • OpenObserve
  • Grafana Alloy
  • OpenTelemetry
  • GlitchTip
  • Traefik
  • systemd
  • Claude CLI
How it fits together Observability and incident response
Observability stack architectureBoth production Django apps send logs, metrics and traces through OpenTelemetry to Grafana Alloy, which collects them into OpenObserve; exceptions go to GlitchTip, and synthetic checks probe uptime, login and TLS. When an alert fires it reaches a Telegram thread through a local relay. A triage agent on the Claude CLI reads the signals in OpenObserve and GlitchTip with read-only access and posts its diagnosis into the same thread.HetznerDjango appsOpenTelemetryGrafana AlloycollectOpenObservelogs·metrics·tracesLocal relayTelegramalert threadSynthetic checksuptime·login·TLSGlitchTipexceptionsTriage agentClaude CLIread-onlyalertprobeerrorsreadsignalsdiagnosisHetznerSynthetic checksuptime·login·TLSDjango appsOpenTelemetryGlitchTipexceptionsGrafana AlloycollectTriage agentClaude CLIread-onlyOpenObservelogs, metricsand tracesLocal relayTelegramalert threaderrorsreadalertdiagnosis

Shipping a surgical video platform to a live congress

wetlabs.app: FFmpeg and Celery pipelines, a small local phase model chosen over a general VLM, GDPR-first EU hosting, and what a live congress teaches you.

4 min

Want to see the code?

The code is private. Happy to walk you through how it was built on a call.

Email me about wetlabs.app