انتقل إلى المحتوى

Selected Backend and Applied AI Work

AI agent shopping with customer controls

A Saudi e-commerce platform needed to expose shopping operations to external AI clients. I built the integration through ten phases, from foundation review to acceptance and hardening. The integration is now in production and undergoing further improvement.

My contribution

I delivered agent authentication, catalog and cart contracts, checkout preflight, wallet orders, order history and returns. I also worked on webhook security, legacy-runtime removal, schema cleanup, OpenAPI/MCP documentation, and a request/response playbook. I tested the integration against external LLM clients and addressed review findings.

Architecture and controls

The delivered interface contains 26 REST operations and 21 MCP tools. Authentication supports OAuth 2.1 and integration keys. Agent payments are wallet-only. Customer trust and spending settings constrain operations; the default per-order budget is SAR 100 and can be changed by the customer.

REST and MCP share a rate-limit policy. Integration keys remain scoped so one noisy integration does not consume another key's allowance. Canonical logs include request correlation. These controls sit behind the conversational interface and apply regardless of how a tool request is phrased.

Result and limits

The integration is live in production. The operation and tool counts describe delivered scope, not usage or revenue. Successful agent orders, active integrations, and operational failure rates have not yet been collected for this case study.

Further work was scoped around external-agent OAuth, anomaly checks, additional webhooks, audit, and analytics. Scoped follow-up work must not be represented as already shipped merely because the core integration is live.

Wallet correctness across callbacks and concurrent requests

A card-funded wallet top-up redirected the customer to a page that did not exist. I traced the 404 to the backend redirect and fixed it. Before handing the change to QA, I checked the payment paths around the visible defect.

My contribution

I verified that a successful payment credited the correct wallet, repeated callbacks did not double-credit it, and forged or foreign payment identifiers credited nothing. I checked owner and amount mismatches, payment reuse, redirect abuse, and provider failures. Critical updates use SELECT FOR UPDATE row locking.

Result

My pre-handoff checks covered 205 assertions. In one capped concurrency scenario, six requests accepted exactly two operations. Those results describe the tested scenarios, not a guarantee against every payment failure.

At the recorded handoff, this fix was on staging while production still ran an older release. The release owner controls production rollout, so staging verification and production availability are separate facts.

Related production delivery

For a separate Saudi grocery store, I brought an alternative payment gateway online after the primary gateway stopped working. I selectively backported the newer integration while leaving the original gateway code unchanged. The fix reached production.

Backend ownership for an endowment platform

An Omani endowment platform needed backend workflows connecting properties, leases, finance, beneficiaries, and donations. I owned the backend, broke the domain into tasks, and built and verified the resulting functionality.

Delivery scope

The backend covered endowments and multiple administrators, properties and leases, lease dues, beneficiaries, donations, volunteering, finance ledger operations, payments, notifications, reports, and exports.

I also checked operational setup: a database built from its baseline and a non-production backup-to-restore rehearsal with table-count reconciliation. Table-count agreement is useful verification; it is not a claim that every restored value was compared.

Verification evidence

The acceptance run passed 464 tests and 2,732 assertions in each of two debug modes, with zero failures. A later security-hardening run passed 630 tests and 4,018 assertions. These are two snapshots, not numbers to add together. They are platform verification results from the backend delivery I owned; they do not claim individual authorship of every test.

Deployment defect

I found that a deployment command using rsync --delete was removing uploads and private attachments. I corrected the deployment behavior. That incident reinforced the need to verify persistent data paths as part of release review.

Result and limits

The evidence demonstrates backend scope, acceptance checks, security-hardening checks, and a non-production restore rehearsal. It does not establish an uptime SLA, production recovery objective, or long-term defect rate. Production release authority remained with the release owner.