Oussama Ansal
AI Engineer & Full-stack Developer · software that shows its work
oussama.ansal@proton.me WhatsApp +212 717 960 062 linkedin.com/in/oussamaansal oussama-protfolio.org Casablanca, Morocco · remote
I build AI features that show how they reached their answer, and the products around them. My master's thesis in Computer Engineering was on text summarization with transformers; the rule I took from it is that a model's output is a claim, and a claim needs its evidence next to it. So my AI features show their SQL, their sources and their reasons, and I test them against known answers.
I build and run my own products for Moroccan businesses (FacturaMaroc, FacturaPay), live AI tools (Grounded, Honestly, Folio), and high-end websites and web apps. I work in Arabic, French and English, at a fixed price agreed up front, and I do not call anything done until I have watched it work.
Thesis: text summarization with transformers, the model architecture behind today's large language models.
own products and live builds
Selected projects
Grounded live AI demo
grounded.oussama-protfolio.orgAsk a database a question in plain words and see every step: the model writes read-only SQL through tool-calling; the page shows the SQL, the tables and columns it touched on a live schema map, the raw rows, then the answer.
- Read-only guard in the Worker: one
SELECTper call; rejections go back to the model as visible tool errors. - Evaluation on 10 fixed questions: run 1 scored 8/10 by the grader and 9/10 numbers exact by hand, which exposed a bug in the grader; after the fix, run 2 scored 10/10.
- Per-visitor daily limit (30 questions) stored in D1 as a cost safety net.
Stack LLM tool-calling (NVIDIA NIM) · SQL · Cloudflare Workers · D1 · hand-written front end
FacturaMaroc own product · in production
facturamaroc.comInvoicing software for Moroccan auto-entrepreneurs and small businesses: quotes, invoices, credit notes and delivery notes, ICE check, gap-free numbering, WhatsApp sending, import of old Excel and PDF invoices, the quarter already calculated. French and Arabic.
- Business rules in PostgreSQL functions (totals, numbering, stock); a created invoice is never edited, corrections go through a credit note.
- Row Level Security on every table, with database tests proving one account cannot read another's rows; money in integer centimes, never floats.
- 40 migrations, 8 edge functions, Playwright end-to-end and QA suites run before every deploy.
Stack React 19 · TypeScript · Vite · Supabase (PostgreSQL, RLS, Edge Functions) · pdf-lib · Cloudflare Workers · Playwright · Vitest
FacturaPay own product · 40 downloads
pay.facturamaroc.comInvoices and payment requests for Moroccan tradespeople: the invoice goes out on WhatsApp, the client pays by bank transfer and taps « J'ai payé », and the receipt follows the issuer's confirmation. The money never passes through the app.
- QR stamp and 6-digit verification code on every invoice (rate-limited guesses, 30-day validity).
- Android app wrapping the web code with Capacitor; client payment page with no account, in French or Arabic.
Stack React · TypeScript · Supabase · Capacitor (Android) · Cloudflare Workers
Honestly live AI tool
honestly.oussama-protfolio.orgA second reader for messages written in a second language. Four named checks only (ambiguous ask, tone mismatch, missing information, reads as translated), shown as red-pen margin notes with one-click fixes. Nothing the user writes is stored.
- Two modes: bring-your-own-key (used once, discarded) or hosted with a per-IP daily limit in Cloudflare KV and a Stripe-verified paid unlock.
Stack Prompt design · Cloudflare Workers · KV · Stripe Checkout verification
Folio live · sold from 3 500 MAD
oussama-protfolio.org#askThe AI chat on my portfolio. It answers only from 45 written facts, cites the fact after each sentence, says when it does not know, and passes enquiries on by email or WhatsApp, in English, French or Arabic.
- Retrieval in the Worker with hidden French and Arabic search words per fact; streamed answers; per-visitor and site-wide daily limits.
Stack RAG / grounding · Cloudflare Workers · KV · streaming
Handoff live · personal project
handoff.oussama-protfolio.orgHow I run a small team of AI agents: a planner plans, Claude Code executes, and everything between them is a markdown file in a vault. Each task file carries written "Done means" criteria; the executor verifies against them, logs, and moves the file to done.
- MCP connectors: a filesystem connector scoped to named folders, browser automation to check live pages; model routing by task (small models check, top models design and review).
Stack Claude Code · MCP · multi-agent orchestration · markdown task queues
Portfolio live
oussama-protfolio.orgA portfolio that proves its claims: a physics dot-matrix headline with an X-ray lens over the page's real source, a status board that pings my live products from the visitor's browser, and a proposal builder that produces a signed, printable proposal. Hand-written HTML, CSS and JavaScript, no libraries.
Ten demo sites live · fixed-price packages
…/demos/<name>Working sites for ten kinds of business, each with its own type and colour system and one signature interaction designed for the subject: a restaurant table plan with a stamped ticket, a dental chart that pre-fills a booking, a sun model of a riad's floor plan, a hammam ritual drawn as a heat curve, a ledger-style invoicing app with a live invoice, an architect's plan that rises into an axonometric model. Packages from 2 500 to 25 000 MAD.
Stack Hand-written HTML / CSS / JS · canvas and SVG · fluid type 390 → 2560 px
Engineering practice builds source only, not deployed
- AI inference gateway: one endpoint routing chat requests to OpenAI, Anthropic or a local Ollama model, with a Redis cache, retries with provider fallback, token streaming over SSE, and every request logged to PostgreSQL (latency, tokens, estimated cost); React dashboard. FastAPI · SQLAlchemy (async) · Redis · PostgreSQL · Docker Compose.
- Auth service: registration and login with JWT access tokens and refresh tokens, a JWT filter, global exception handling. Java 17 · Spring Boot · Spring Security · JPA · PostgreSQL · Docker Compose.
- Accommodation system: users, apartments, rooms, tenants, leases and rent payments in 7 Flyway migrations, with validation and security. Java 17 · Spring Boot · JPA · Flyway · PostgreSQL · Docker Compose.
each skill links to the work that proves it
Skills, with evidence
| Skill | In practice | Proof |
|---|---|---|
| LLM tool-calling | Model calls a typed tool; inputs validated server-side, errors fed back visibly | Grounded |
| RAG and grounding | Answers only from a written knowledge base, with per-sentence citations | Folio |
| Evaluation | Known-answer test sets; checking the grader as well as the model | Grounded |
| Prompt design | Narrow, named checks and hard rules (no invented facts, reply in the user's language) | HonestlyFolio |
| Inference infrastructure | Multi-provider routing, caching, retries with fallback, SSE streaming, cost logging | GatewayFolio |
| Cost and abuse limits | Per-visitor and global daily limits in D1 / KV | GroundedHonestlyFolio |
| Transformers and text summarization | MSc thesis subject | Education |
| Skill | In practice | Proof |
|---|---|---|
| JavaScript on Cloudflare Workers | APIs, proxies, rate limits, streaming, static sites | GroundedHonestlyFolio |
| Cloudflare D1 and KV | SQL data and limits in D1; counters, leads and unlock tokens in KV | GroundedHonestlyFolio |
| PostgreSQL | Server-side functions, Row Level Security, migrations, isolation tests | FacturaMarocAccommodation |
| Supabase | Auth, RLS, Edge Functions, local stack for tests | FacturaMarocFacturaPay |
| Java 17 / Spring Boot | Spring Security with JWT and refresh tokens, JPA, Flyway, validation | Auth serviceAccommodation |
| Python / FastAPI | Async SQLAlchemy, Redis, retries (tenacity), SSE | Gateway |
| Payments integration | Stripe Checkout session verification; bank-transfer claim flow | HonestlyFacturaPay |
| Skill | In practice | Proof |
|---|---|---|
| Hand-written HTML, CSS, JavaScript | Full sites with no framework or library | PortfolioDemosHandoff |
| React, TypeScript, Vite | Production app and admin panel; dashboard | FacturaMarocGateway |
| Canvas physics and creative coding | Dot-matrix headline on physics, X-ray lens over live source | Portfolio |
| SVG and generative graphics | Sun model, measured plans, heat curves, schema maps | DemosGrounded |
| Fluid, responsive layout | clamp()-based type and spacing from 390 to 2560 px | DemosPortfolio |
| Arabic and bilingual interfaces | French / Arabic product UI, right-to-left text | FacturaMarocFacturaPay |
| Skill | In practice | Proof |
|---|---|---|
| Android app with Capacitor | APK wrapping the web app, distributed from the product site | FacturaPay |
| Product design for a local market | WhatsApp-first flows, ICE and legal mentions, free tier and yearly plans | FacturaMarocFacturaPay |
| Documents and PDF | Invoice PDFs generated in the browser; signed, printable proposals | FacturaMarocPortfolio |
| Skill | In practice | Proof |
|---|---|---|
| SQL | Joins and aggregates; model-written SQL checked against raw rows | GroundedFacturaMaroc |
| Schema design | Relational schemas with foreign keys; versioned migrations | GroundedAccommodationFacturaMaroc |
| Data ingestion | Import of old Excel and PDF invoices, clients and products | FacturaMaroc |
| Synthetic test data | A shop dataset with realistic skew for honest evaluation | Grounded |
| Money correctness | numeric(12,2) in the database, integer centimes in code | FacturaMaroc |
| Skill | In practice | Proof |
|---|---|---|
| Cloudflare and Wrangler | Workers, static assets, custom domains, secrets, D1/KV bindings | GroundedFacturaMarocPortfolio |
| Docker and Docker Compose | Multi-service stacks with PostgreSQL, Redis and health checks | GatewayAuth service |
| Automated testing | Playwright end-to-end, Vitest database tests, QA suite before deploys | FacturaMaroc |
| Browser verification | Scripted checks at 390 / 1440 / 1920 / 2560 px, overflow and console errors | DemosPortfolio |
| Secret hygiene | Server-only keys, git-ignored env files, secret scanning | FacturaMaroc |
| Skill | In practice | Proof |
|---|---|---|
| Claude Code | The executor in a planner / executor setup, working from task files | Handoff |
| MCP (Model Context Protocol) | Scoped filesystem access; browser automation to check live pages | Handoff |
| Multi-agent orchestration | Agents that never talk directly; a markdown vault as the protocol | Handoff |
| Task queues | pending → done, "Done means" criteria, execution log per task | Handoff |
| Model routing | Cheapest model that can do the job; top models for design and review | Handoff |
- Watch it work before calling it done. Reading the code is not a check.
- One open thread. Finish or park the current work in writing before starting new work.
- One known source. Check for stale copies before deploying.
- One claim per line. Verify each part of a fix separately.
- Someone owns it after launch. Launch is not the last check.
- Fixed price, 50/50, no interest. Agreed before work starts.