Skip to content
Back to projects

NowPay

Every morning, NowPay tells the manager of a Togolese SME who to follow up with, what to write and through which channel to recover unpaid invoices, without damaging the customer relationship.

Context
Lomé Summer School in AI 2026
Role
Alone on the web, then alone on the production rebuild
Period
Since September 17, 2026
Status
In production, v1.4.0 of November 14, 2026
NowPay Today screen on desktop, inviting the user to add a first receivable
NowPay Today screen on a phone, inviting the user to add a first receivable

The problem

The manager knows who has not paid. What is missing is what to say, in which tone and through which channel, without losing the customer.

Existing tools (Clearnox, Payt, Defacto) are European, expensive and designed for the office. Not for a manager in Lomé, on a phone, on a network that drops.

The answer

Every morning, a "follow up today" queue, ranked by urgency. For each customer, a message drafted by AI on behalf of the business, in the chosen tone. The manager reads it and sends it from WhatsApp, email or SMS, with their TMoney and Flooz numbers to get paid.

One principle holds the whole product: NowPay never contacts the customer and never collects money. The manager stays in control of every message.

What shipped

  • Daily queue ranked by risk score, with an adapted cadence
  • Follow-up messages written by Gemini in four defined tones: courteous, factual, firm, urgent
  • Invoice and receipt scanner: a photo or PDF read by AI, currency converted to CFA francs
  • Grouped follow-up: one customer, several invoices, a single message with the total
  • Payment promises, one-tap postponement, broken promises flagged
  • Offline mode: the queue, receivables and customers open without a network
  • Push notifications and an email summary at the chosen time
  • Installable app (PWA), sign-in with a code or with Google

The decisions that matter

  1. A log nobody can tamper with. Every action is written by Postgres triggers and chained with SHA-256 hashes. Customer names stay out of the hash: when an account is deleted, they are erased and the log remains verifiable.
  2. Business logic computed, never stored. Score, risk level, follow-up date and status are recomputed on read in a pure domain layer, without Supabase or React. One source of truth, shared by the server and by the offline phone.
  3. Security in the database. Row Level Security on every table, the business identifier always derived from the session, Zod validation on every input.
  4. An AI that can get the tone wrong. Per-account quota, maximum delay, schema-validated output. A deterministic check rejects a message that threatens or pressures a "courteous" customer. A fallback template takes over, and it is never presented as written by AI.
  5. Sending at the chosen time without paying. Vercel's free plan runs a single job per day, at a random minute. pg_cron in Supabase calls the route every hour, with a secret kept in the vault.
  6. Usable offline, without data leaks. Network first, the phone's copy if nothing answers within 6 seconds. The copy is erased on sign-out and as soon as the session ends. An end-to-end test really cuts the network.

Fast on an average phone

Measure before optimizing: Chrome throttled four times, a 150 ms network. The session is verified through the ES256 token signature, without a network call, and lists load in chunks.

server calls on open, before
18
server calls on open, after
7
Receivables screen, before
1.9 s
Receivables screen, after
1.0 s

Quality, measured

automated tests (Vitest)
814
branch coverage of the domain layer
94 %
pull requests merged under CI
32
application pages
26

Figures taken from the repository on November 15, 2026.

End-to-end journeys, from sign-up to grouped follow-up, run on Chrome Android and Safari iPhone with Playwright. Every pull request passes type checks, lint, tests, database tests and deployment before merging.

My role

During the Lomé Summer School, we were five, with no formal split of roles. I took the web, and I was the only one coding it; the other members worked on other parts or suggested improvements.

When the program ended, the team scattered. I took the project over on my own, rebuilt it completely and carried it to the version in production: scoping, code, database, deployment, domain name, release notes.

I work with coding agents (Claude Code, Codex) under written architecture and writing rules, and every pull request goes through review and automated checks before merging.

The stack

Next.js 16, React 19, strict TypeScript, Tailwind CSS v4. Supabase: Postgres, Auth, Row Level Security, Vault, pg_cron and pg_net. Gemini through the Vercel AI SDK and Zod. Resend, Web Push. Vitest, pgTAP, Playwright, GitHub Actions, Vercel.

The repository is private. The product is live: www.nowpay.website.