Skip to main content
All work
Active

Albawaba

An Arabic-first hiring platform for Yemen and soon to the region: AI reads each CV and ranks applicants with a score that explains itself.

Albawaba

01

Idea

Hiring software is built for English first. Tools like Greenhouse, Lever and Ashby treat right-to-left layout and Arabic language processing as afterthoughts. The markets I build for also have problems those tools never meet:

  • In Yemen many CVs are scanned, or photographed on a phone.
  • Many job seekers have no email they read.
  • A 4G connection can drop in the middle of an upload.
  • No card payment provider serves the country at all.

Albawaba (البوابة, "the gate") is a hiring platform for companies and job seekers in Yemen first for now, then the wider region soon. It has three portals: one for a company's HR team, one for candidates, and one for the people who run the platform.

Hiring is also where AI can do real harm. The EU AI Act classes hiring AI as high-risk, and a number nobody can question invites both bias and blind trust. So the AI had to explain itself, and people had to stay in charge.

Goals

  • Arabic by default, and right-to-left on every screen.
  • Read any Arabic or English CV, scanned ones included, into structured data that is checked before it is stored.
  • Rank applicants with a score that shows its parts, and never reject anyone automatically.
  • Keep every company's data apart, enforced by the database itself and not only by the code.

Constraints

I built it on my own, on a small budget, for people on mobile connections. It also had to meet two data protection laws: PDPL and the EU's GDPR.

02

Code

Architecture

Albawaba is one NestJS application split into modules, plus one internal Python service for the AI, rather than microservices. The pieces around them:

  • Front ends: the three portals are React apps, and the marketing site is Next.js. An app-store shell made with Capacitor wraps the same web app for Android and iOS.
  • Data: PostgreSQL holds everything, including the vectors the AI searches (pgvector).
  • Slow work: reading a CV or ranking a job's applicants goes through queues on Redis (BullMQ). An outbox written in the same database transaction feeds them, so no job is lost if a server restarts.

Technologies and why

  • NestJS, Prisma and PostgreSQL: one typed application is simpler to run and to secure than many services. PostgreSQL's row-level security adds a second wall between companies.
  • pgvector instead of a separate vector database: at hiring scale, a few million vectors at most, one database to run and back up beats two.
  • Open models on Groq:
    • gpt-oss-120b reads CVs into a strict JSON schema, and gpt-oss-20b is its fallback;
    • a Qwen vision model reads scanned CVs;
    • they are fast, cheap and good at Arabic.
  • Cohere's multilingual embeddings: Arabic and English CVs and jobs land in one space, so an Arabic CV can match an English job.
  • Capacitor: the store apps load the live web app on its own domain, so sign-in and its security checks work unchanged.

Process

I started from an earlier prototype of mine: an Express server of about 600 lines and a small Python service. I secured it first, then rebuilt it in phases:

  1. the foundation and its security;
  2. companies, and the walls between them;
  3. reading CVs and ranking applicants;
  4. the candidate portal;
  5. billing, the operator portal and the trust tools.

Every working session started from a written plan, and every lasting decision got a decision record: 27 of them so far.

The ranking

score = 0.45 × semantic similarity
      + 0.30 × skills overlap      (must-have skills count twice)
      + 0.15 × experience fit
      + 0.10 × location, work mode and language

Each part is stored with the score, and the recruiter sees them under «لماذا؟» ("why?").

Albawaba Apps/ diagram
Architecture

Challenges

  1. Candidates who belong to no company

    Problem: Every query runs inside one company's walls. The code scopes it, and PostgreSQL's row-level security refuses anything outside it, failing closed. A candidate's "My applications" page and the public job board cross companies, so behind those walls they silently returned nothing.

    Solution: I added one narrow database function that returns only the ids of the companies holding a candidate's applications. Each company is then read through its normal walls. Public jobs come from a separate table of public fields only, kept in sync by database triggers. There is no general bypass, and a test fails the build if another function like it appears.

  2. A score a recruiter can question

    Problem: An AI score nobody can explain invites bias and blind trust, and the law treats hiring AI as high-risk. It also tempts a system to give a number to someone it knows nothing about.

    Solution: The score is the sum of four visible parts: similarity, skills, experience and constraints. It is stored with its breakdown and shown under «لماذا؟». A language model writes a short justification for the top 20 only, and never changes the number. An applicant with no evidence gets no score at all, not a guessed one, and nothing is ever rejected automatically.

  3. Changing the AI model without mixing its answers

    Problem: Each candidate had one embedding, written by whichever company read their CV last. That leaked a little signal between companies. It also meant that upgrading the embedding model would silently compare vectors from two different models.

    Solution: I moved embeddings onto each company's own copy of the CV, stamped each one with its model's version, and built one index per version. Vectors of different versions are never compared. Old ones are embedded again when they are read, and by a sweep in the background.

  4. Uploads on a 4G line that drops

    Problem: Every upload was one request with no retry. On a congested mobile line in Yemen, a connection that dropped at 90% lost the whole CV.

    Solution: Uploads are now resumable and sent in parts. After a drop, the server asks the storage which parts arrived, so the browser never has to track them. A page reload picks up where it stopped, and an oversized file is stopped before it is assembled.

03

Project

Results

Albawaba is at version 1.0:

  • it has run on a staging server since November 2026;
  • the Android app runs, and the iOS app builds;
  • it has not been opened to customers yet.

What it has so far:

  • Tests: 2,613 for the API and 1,650 for the web portals.
  • Isolation: 19 database tables under row-level security, each one tested to refuse what it cannot prove.
  • Speed on mobile: on a simulated 4G line, opening a job's board for ten users at once went from 633 ms to 228 ms at the 95th percentile, after I fixed the database connection pool.
  • Fairness: a name-swap test checks that the AI treats two candidates the same when only their names differ. It caught the model copying a candidate's name into its summary, which moved the CV's place in the search space; a prompt change fixed it.

Status

In progress: on staging, waiting for launch.

What I would do differently

  • Put it in front of real recruiters sooner. Until late October the only feedback was mine.
  • Not build sign-up around WhatsApp before securing a business number. I made the phone number the account key, then had to make email the key again when no WhatsApp business number was available.

Links

The repository is private.