The full record

The long version.

The front page is the short version. This is the rest of it: the roles, the systems, the numbers behind them, and how I build AI when it touches money. If you are deciding whether to hand me something expensive, read this page first.

Casablanca, Morocco · English, Arabic, French if needed · one build at a time, next start January

Career

Four roles, one through-line

Every job below ran on other people’s money. Payables across hundreds of legal entities, payroll inputs for hospital groups, my own products with live orders.

OysterHR

Product engineer · accounts payable & applied AI

Since 2026 · remote

Ruby on RailsGraphQLReactTypeScriptPostgreSQLSidekiqClaudeDatadog

OysterHR is a global employment platform, one of the EOR leaders. Companies hire in more than 180 countries through it, across hundreds of customer legal entities and multiple currencies. I own the accounts-payable automation: the pipeline that reads supplier invoices, the product accountants review in, and the money path behind both.

AI in the money path

  • Measured on the invoices processed so far, the run-rate saving is about $300K a year at a few thousand invoices a month. The process it replaced was two people reading PDFs.
  • Per-vendor prompts live in the database as data. Onboarding a vendor means adding a row, and the prompt version travels with every call so a review can reconstruct what ran.
  • JSON Schema structured outputs, then validation in code. A malformed extraction stops at the boundary; the accounting system never sees it.
  • A person approves before money moves. Every call that can touch a payment leaves an audit record: model, prompt version, tokens, latency, document hash.
  • Routing, prompt caching and context budgets keep the model bill below the process it replaced.

The money path

  • Invoice matching, accounting mappings and ERP writes are deterministic code. The model gets no vote there.
  • Payouts, payee and bank-account verification, provider webhooks, reconciliation across banking partners. Per-payout idempotency keys and a nightly reconciliation diff close the duplicate-webhook and payee-swap cases.
  • Two state changes that belong together commit in one transaction. A retried write reconciles to the same record instead of paying twice.

How the team ships

  • Spec-to-reviewed-PR automation on agents, with custom skills and MCP integrations. The review queue got shorter, not longer, which is the only result I cared about.
  • Support triage and flaky-test repair run on agents too, under the same cost budget as the product.

When it breaks

  • Escalated production incidents, inside SLA. Root causes traced through Datadog, Sentry and the data, closed with permanent fixes and runbook entries.

Mibtech

Engineer · HR, time & attendance, hospital operations

2023 to 2026 · Casablanca

Ruby on RailsHotwirePythonPostgreSQLRedisClickHousedbtAirbyteLangChainDocker

Mibtech sells HR and hospital software to private groups in Morocco. I owned the time-management product of its multi-tenant HR SaaS: badge terminals at the door, payroll inputs at the other end. Private hospital groups ran on it: 20+ databases, 80,000+ clock events a day. That count is a year old and I have not re-measured it.

The Akdital rollout

  • Akdital is the largest private hospital group in Morocco, now expanding into Saudi Arabia, the UAE and Africa. I built the hospital time-and-attendance rollout for them and load-tested it before anyone signed. The group never went ahead. It stopped in procurement, not in the code.
  • The load test is the part anyone can check. 200,000 clock events at the same moment on one small server: query load managed per tenant, shard keys chosen so a hospital’s own traffic stays together, raw terminal payloads kept in MongoDB, timing accurate enough that a night differential did not move. Nothing was lost.

Time and attendance

  • Punches resolved against shifts, night differentials, breaks and overtime, out to the payroll inputs they produce, correct per tenant.
  • The shift-change spike is the moment that decides whether payroll closes on Friday. The product held it.
  • Timesheets, leave workflows, live notifications, dashboards. Schema to interface, per tenant.

AI in production

  • An LLM support agent in front of live employees. Retrieval scoped per employee, tool calls gated server-side, answers only from documents the user could already open.
  • A wrong answer there becomes a compliance problem, so every reply carries its citation.

Data

  • 20+ siloed hospital databases merged into one ClickHouse warehouse on dbt-modelled ELT, fed by Airbyte.
  • Ingestion got 3× faster once the PostgreSQL and connection-pool bottlenecks were fixed at the source instead of worked around.

Performance

  • One surface had degraded until support tickets replaced demos. 70% faster page loads, critical endpoints around 50 ms, through Redis caching, job offloading and query redesign.
  • Tenant isolation stayed untouched. That constraint was the interesting part.

Devices

  • 50+ access-control terminals became a real-time system: an IoT gateway plus a desktop badge-reader app.
  • Ran in production under Prometheus, Grafana and Sentry. The alerts came to me, so the fixes did too.

WebCK / Topela

Software engineer, part-time · remote

2022 to 2023

React NativePythonFlask

Before the rest. Feature slices end to end across a cross-platform React Native app and its Flask API, in a distributed team.

Independent

Founder-engineer · products I own

Since 2022

RustNext.jsReactPythonPostgreSQLClickHouse

Most of the work over four years is under NDA. These four I can show. Building and operating my own products is how the production instincts stay honest.

Citadel

  • Agent operations platform in Rust (axum, sqlx): multi-agent orchestration, an MCP tool layer, scheduler, memory, and a React control surface.
  • I run my own operation on it every day. It is the reason one person can ship at team speed and still sleep.

Pochetta

  • Moroccan commerce storefront and order operations, live and taking orders.
  • Catalogue, cash-on-delivery checkout, order states, admin.

Li7abiti

  • Cash-on-delivery commerce platform: Next.js 16, a 146-table PostgreSQL schema, OTP authentication, Arabic-first RTL.

Semsar

  • Market-intelligence pipeline: scheduled collection, price normalisation across sources, reporting a person can act on.

Under the hood

Four systems, and what happens when they break

Scale is easy to claim and hard to check. Every number here is one a reference call can confirm: what each system carries, and what it does on a bad day.

Invoice extraction · OysterHR

What it carries

Thousands of documents a month across hundreds of legal entities. A per-vendor eval set runs before any prompt ships; each batch has a latency budget.

When it breaks

A bad extraction lands in the review queue. Dead letters, retries, and a reconciliation diff at close catch the rest.

Time & attendance · Mibtech

What it carries

80,000+ events a day, 50+ terminals, 20+ hospital databases, shift and overtime rules per tenant.

When it breaks

If the gateway goes down, terminals buffer and replay. Duplicate event ids are dropped before anything reaches payroll.

Hospital warehouse · Mibtech

What it carries

20+ source databases into one ClickHouse warehouse on dbt-modelled ELT, loaded nightly.

When it breaks

A failed model run trips the freshness check and stops the report. It cannot quietly feed a payroll input.

Agent platform · Citadel

What it carries

Rust (axum, sqlx), an MCP tool layer, scheduler, run log and memory. In daily use.

When it breaks

A hung tool call hits a retry budget and a dead letter. Steps replay idempotently from the run log.

Method

How I think about AI in production

These rules came out of production. Each one comes from watching an AI feature die in production, a few of them mine.

01

The model reads; the code decides.

Anything that commits money or state is deterministic code with an audit trail behind it. The model proposes. A person signs. The system records what happened, because six months later someone will ask.

02

Boring beats clever.

Structured outputs, schema validation, retries, idempotency, dead letters. Those have saved more projects than a better prompt ever will. The boring parts are the product.

03

Cost is a feature.

Routing, caching, context budgets, batching where it fits. If inference costs more than the process it replaced, what you have is a demo with a budget line.

04

Evaluate before you promise.

A fixed set of real documents with known answers, run on every prompt change. Without that suite, every improvement is a guess and every regression is a surprise you hear about from a customer.

05

Design the failure.

What does the user see when the model is wrong, slow or down? If the honest answer is “a stack trace”, nobody has designed the failure yet.

06

Keep the seam thin.

Models change every few months. The integration has to survive that without a rewrite: one interface, versioned prompts, evals that travel with the feature.

Agent roster: model, harness, permissions and delegates, set per project.
The cockpit I open every morning: projects, open work, server health, what is waiting on me.
A workflow: trigger, steps, conditions, every run logged. This is what I mean by a process I can point at.

Tools

What the work has needed

The systems are the argument. The tools were whatever the system needed that year.

Languages
Ruby, Python, TypeScript, SQL · Rust (axum, sqlx): Citadel is written in it and runs daily
Applied AI
Structured outputs (JSON Schema), tool calling, RAG, vector search, agents, evals, prompt versioning, model routing, prompt caching, cost and latency control, audit trails
Agentic engineering
Custom skills, MCP integrations, multi-agent code review, spec-to-PR automation, scheduled agent work
Backend & data
Rails, GraphQL, PostgreSQL, Redis, ClickHouse, Sidekiq, dbt, Airbyte, Docker, background jobs, query and pool tuning
Frontend
React, TypeScript, React Native, Hotwire, Arabic RTL interfaces
Operations
Datadog, Sentry, Prometheus, Grafana, SLAs, incident response, runbooks, multi-tenant isolation
Domains
Payments and payouts, payroll and HR, healthcare operations, e-commerce and cash on delivery

Education

ISGA Casablanca

State Engineering Degree (Ingénieur d’État) in Big Data and Machine Learning.

Where the statistics came from. Modelling, sampling, and the maths I still use to price capacity.

Résumés

Three angles, one person

Same record, three ways in. Take the one that matches the conversation you are having.

Contact

Still reading? Good.

Thirty minutes. Bring the worst document or the worst query and we look at it together. Bring the system that keeps you up at night; you leave with a plan you can run with or without me.