Cairo, Egypt · open to remote and relocation

Mohamed Ghoniem

Mobile and AI engineer. 7+ years shipping Flutter and native Android, ten apps in the stores, 1.1M downloads between them. These days the work is LLM systems: retrieval that cites what it used and refuses when the documents don't cover the question, an agent that needs a human to approve before it acts, and a model that runs on the phone with the network off.

01 AI systems

Retrieval · citations · evaluation

Document chat that cites its sources and refuses to guess

A FastAPI service over Postgres and pgvector. It answers only from the passages it retrieved, names the file and the chunk, and says the documents don't cover the question instead of inventing an answer. A Flutter client streams the reply over SSE. Retrieval is scoped per owner, so one person's documents never turn up in another person's answer.

Hard partCompound questions. Two of the 53 failed, and the chunks they needed were already in what the model was given. The instruction said to refuse unless a single excerpt answered the question, and no single excerpt did. The fix was in the instruction, not the retrieval: facts may be combined across excerpts, each cited, and the refusal still applies unless the excerpts together cover every part. Three runs after the change scored 52, 53 and 53. A wider retrieval net was tried in the same run, made it worse, and was reverted.

Agents · approvals · audit

An agent that can propose but cannot act alone

It reads a request, drafts a GitHub issue, and stops. Nothing is written until someone taps approve. The proposal, the approval and the result are recorded in Postgres, so there is a row for every action taken. It runs on LangGraph with a local MCP server, and the executor re-checks each proposal against an allow-list before anything fires.

Hard partMaking the boundary real instead of promised. There is a prompt-injection suite aimed at the propose step: the model can be talked into drafting anything, and the write still doesn't happen. Running the same approval twice produces one issue, not two.

On-device inference · Flutter

Summarising on the phone, and saying when it can't

Paste a note, get a one-line summary and a category. The on-device path is built: ML Kit GenAI and Gemini Nano behind one Kotlin channel, with a cloud fallback that stays off until you flip it. The screen says which path ran, and the cloud object cannot even be built while the switch is off.

Hard partI could not prove the on-device path on real hardware. AICore only exists on recent Android phones and every emulator fails it, so what is verified is the cloud path: 15.5 seconds from tap to card on an emulator, with the switch on. The offline case is implemented and covered by tests that assert zero requests, not by a run on a phone.

02 Case study

Live app · shipped end to end

Ordering for a restaurant, end to end

Built for a restaurant. The menu lives in a Google Sheet the owner edits himself, the app builds the cart from that sheet, and the finished order goes to a Cloudflare Worker that stores it in D1 and pushes it to Telegram. Arabic first with an English toggle, built in Flutter and shipped as a web app. The first design sent the order as a WhatsApp message; the worker and the bot replaced it.

You can order by typing too. One message becomes two items:

عايز ساندوتش كبدة وساندوتش كفتة

Because كبدة is sold as two rows, the app asks which one instead of picking for you. Anything left over waits in a queue, and the app comes back with والـباقي؟ until the queue is empty, so a long order typed in one message never gets half dropped.

The caps are per visitor, per day and shop-wide, counted in D1 rather than in memory. Prices never come from the model: every line is rebuilt from the sheet, and anything the model invents is scrubbed before the reply leaves the worker. One step is still open, pointing the bot at the restaurant's own group instead of the owner's account.

  • 585Flutter tests
  • 80bilingual cases
  • 2.7saverage reply
  • Worker + D1Cloudflare

The demo runs a made-up sample menu on its own database, with payments and the shop's notifications switched off, so you can order without reaching anyone.

03 Mobile

7+ years, mostly Flutter, with native Android in Java and Kotlin where a plugin fell short. Senior mobile engineer on Al Rajhi Takaful's insurance app, which has passed 1M downloads on iOS and Android. Before that: Mozare3's farmer app, the Qoodz and MakanE apps, InGame for Openner, and a handful more across fintech, sport and e-commerce. Ten production apps, 1.1M downloads between them.

04 Elsewhere