Context
Eco Afrique is an HR consultancy based in Dakar. Its deliverables are the traditional artefacts of the trade: job descriptions, competency evaluations, leadership assessments, and job weighting — the exercise that determines the relative value of every role in an organisation, and therefore its pay structure.
Every one of these was produced by hand. Per client, per candidate, per role. The consultant’s expertise was real and scarce. The production of the document around it was neither.
The problem
Three concrete, unglamorous failures.
- 01
CV processing did not survive volume
A recruitment campaign arrives as a folder of PDFs. Every one had to be opened, read, and transcribed into a comparable structure before any shortlisting could begin. The work scaled linearly with the number of applicants — which is the wrong shape of curve.
- 02
Evaluations were not consistent between consultants
The same candidate, assessed by two consultants against the same competency framework, produced two different documents in two different formats. Defensible individually. Indefensible as a firm-wide product.
- 03
Job weighting arrived as a mess of files
The exercise requires, for every role in a client organisation, a job description and a structured scoring. In practice it arrived as a payroll file plus an archive of documents named by whoever created them: mismatched titles, duplicates, missing roles — and no way to know whether the dossier was complete until someone had opened all of it.
What made it hard
- Client organisations on variable connectivity. Recipients complete forms from wherever they are, on whatever they have.
- In-app browsers. A meaningful share of recipients open the invitation link from inside Gmail, WhatsApp, or Outlook — environments where localStorage and sessionStorage can be blocked outright. A standard auth client simply fails there, and the user sees a blank screen with no explanation.
- A payroll file full of names. Job weighting starts from the client’s payroll file. It contains salaries and named individuals, and it belongs to the client. Ingesting it was the easy path and the wrong one.
- Two audiences, two applications, one budget. Internal consultants and external candidates need different products. They did not need — and could not fund — two independent systems.
- Three languages. Candidates are not all francophone.
Three layers, one system
The system was built in layers, each serving a distinct audience, all sitting on the same foundation.
The internal platform
June 2025 →
The consultants’ workspace. CV extraction and filtering, candidate evaluation, job descriptions, 360° evaluation, exports, statistics, organisation and user administration.
- 25 screens
- 10 edge functions
- 53 migrations
The external platform
November 2025 →
Everything that touches someone outside the firm. The candidate journey from token-based invitation through identification, competency and leadership steps; the admin console; and the job-weighting module — organisation onboarding, document reconciliation, campaign management, scoring and synthesis.
- 32 screens
- 13 edge functions
- 71 migrations
- 3 languages
The automation layer
self-hosted n8n
Where the AI work runs. CV extraction with OCR, candidate evaluation, competency-domain evaluation, leadership evaluation, job-description generation — plus the part nobody demos: two dedicated error workflows and a scheduled backup.
- 9 workflows
- 85 nodes
- 2 error workflows
Three layers, one backend. Both applications share the same Supabase project — 34 tables, over 200 row-level security policies, a single 7-role permission model.
Five decisions, five tradeoffs
An architecture decision without a stated cost is not a decision, it is a feature list. Here are the five that shaped the system, and what each one cost.
One Supabase project for two applications
- The choice
- Both frontends target a single Supabase project. One schema, one auth surface, one role model.
- What it costs
- The applications are coupled. Password-change codes live in a table both use. When debugging a storage RLS denial in one app, the logs contain the other app’s traffic. There is no blast-radius wall between them.
- Why
- Two projects would have meant duplicating the role model, the user table and the organisation structure — then keeping those duplicates in sync forever. For a client whose consultants and candidates are two views of the same recruitment process, splitting the data would have produced an architecture serving the deployment diagram rather than the business.
This is a decision that would be wrong at a different scale. It is right at this one.
SECURITY DEFINER functions instead of RLS subqueries
- The choice
- Every authorization check moved into a SECURITY DEFINER function — can_manage_pesee_organisation, can_access_pesee_onboarding_run, is_pesee_org_admin_member, and a dozen more. The policy becomes a single readable call.
- What it costs
- SECURITY DEFINER bypasses RLS by design. Each function is a small piece of privileged code that must be audited on its own terms: the safety lives in the function body, not in the policy layer.
- Why
- The first implementation expressed access as a policy containing a cross-table EXISTS subquery: can this user see this campaign? check the campaign-admin table. But that table is itself protected by RLS, and evaluating its policy requires reading the campaign table. Postgres detects the cycle and the query fails. The permission model broke on its own recursion.
Built, broken, diagnosed, restructured, shipped — across three migrations, all readable in the history. Studios that show only finished work are showing the part that proves the least.
The weighting module knows no names
- The choice
- The payroll workbook is parsed in the browser. It is never uploaded, it never reaches a server. Only the job-title column is read. What is persisted is a count: this organisation has n occurrences of this title. The client-facing view returns title, expected, received, remaining, status and history — never a name.
- What it costs
- Real, and worth stating. Individual tracking is impossible by construction. A consultant cannot ask "has Fatou submitted hers?", only "how many of the twelve Chef d’Escale documents have arrived?". Several natural features are permanently out of reach.
- Why
- The payroll file is the client’s most sensitive document. A system holding a copy is a system that can leak one. Choosing not to hold it removes an entire category of risk rather than mitigating it — and it means the answer to "where is our salary data stored in your system?" is: nowhere. No privacy policy can match that answer.
A data model built, shipped, then reversed — without loss
- The choice
- The reconciliation model first rested on holders: each document belonged to a named individual occupying a role. A migration replaced it with a count-based model, rewriting document→holder links as document→job links.
- What it costs
- A full data-model migration on a live system. The frontend and the migration had to ship together: applying one without the other breaks the deployed application.
- Why
- The holder model was wrong. It reintroduced personal identity into a system whose entire premise (decision 03) is that identity stays out, and it made the client's real question — is this dossier complete? — harder to answer, not easier. All uploaded documents were preserved, and the migration was validated against the live dossier before it ran: 105 documents and 21 job associations at that point.
Every client’s real fear is that a decision made in week two becomes permanent by week twenty. This is direct evidence that a live system can change shape without losing data.
The human decides, the machine proposes
- The choice
- A fuzzy match above 0.80 produces a suggestion. A consultant confirms or corrects it. Ambiguous documents stay unassigned rather than guessed into place. Surplus blocks publication. Shortfall requires a written justification, timestamped and attributed.
- What it costs
- The consultant does more work than a fully automatic system would require. Every dossier passes through human hands.
- Why
- The output determines a pay structure. Nobody will accept "the algorithm matched it" as an explanation to an employee about their grade. For an HR consultancy, defensibility is the product.
It is also the answer to the objection that comes up in every conversation about automation in this sector: "the AI will decide for us".
The product
Screenshots pending client sign-off. The weighting screens are publishable as-is — the model holds no personal data. The others require scrubbing or a seeded demo record.
/admin/pesee/:orgId/onboarding/:runId Publishable as-is /admin/pesee/:orgId Publishable as-is /candidate/form Scrub required /admin/leadership Scrub required /extractions Scrub required Exported artefact Fictional subject required Results
What was built
- Applications in production
- 2
- Database tables
- 34
- Security policies
- ~204
- Edge functions
- 23
- Screens
- 57
- Migrations
- 124
- Lines of migration SQL
- ~10,897
- Code deliveries
- 1,397
- Automations
- 9 / 85 nodes
- Languages
- 3 — FR / EN / PT
What it changes, in service
Measured 27 July 2026. What matters here is not volume, it is recency: the most recent weighting documents landed the day before measurement. This system was not delivered and forgotten — it is in use this week.
- Candidates processed
- 102
- Documents reconciled
- 117
- Leadership assessments generated
- 44
- Candidate submissions
- 79
- Weighting campaigns
- 8
- Organisations on the weighting module
- 4
Timeline
- June 2025 Internal platform begins
- November 2025 Candidate platform launches
- February 2026 Job-weighting module
- Today Still in production, still in development
This is not a project that ended. It is a partnership that continues — and that is the part that matters most if your fear is paying, waiting, then being left alone with a system nobody maintains.
And when it breaks?
Every item here exists in the delivered system. These are not commitments, they are components.
Two dedicated error workflows
They alert automatically the moment an automation fails.
A scheduled backup
It runs on its own, with no intervention.
Client-side error capture
When the interface crashes for a user, the crash is recorded with its context, and the user gets a reference code they can quote. Support starts from a trace, not from "it didn’t work".
Deploy detection
The application knows when a new version has shipped and offers to reload, rather than silently serving stale code.