0%
Aymen
Back to Works
WebShipped2026

Thiqaty

Escrow and deposit platform: protected transactions between buyers and sellers, with configurable commissions and CIB / Edahabia card payments.

My Role
Full Stack Engineer
Timeline
Apr 2026 — Jun 2026
Status
Shipped
Thiqaty
Overview

Thiqaty is an escrow marketplace between buyers and sellers: instead of paying a seller directly, the buyer's money is held by the platform while the transaction runs, and the platform earns admin-configurable commissions — a distinct escrow commission and deposit commission. Payments go through Chargily, so buyers can pay by CIB or Edahabia card.

The backend is a Fastify + TypeScript service on PostgreSQL with Drizzle as the ORM; schema migrations apply themselves when the container boots, so deployed code and database schema never drift apart. Authentication is cookie-only in the Sanctum SPA shape — no tokens in client JavaScript — and a separate Vite-built admin dashboard mirrors the client's architecture, giving operators the same conventions on both surfaces.

The Challenge

The problem to solve

Online commerce between strangers runs on trust that is often missing: the buyer pays and hopes the goods arrive, the seller ships and hopes the money clears. The platform had to sit in the middle — hold the buyer's funds until the deal completes, charge for that guarantee through two distinct, admin-tunable commissions, and accept CIB and Edahabia card payments. It also had to pull the counterparty onto the platform with minimal friction, since a transaction only exists once both sides have accounts.

Pricing
Pricing
The Solution

How it was built

The escrow core holds funds and applies a dual commission model — an escrow commission and a deposit commission — both configurable by admins rather than hard-coded, so pricing changes without a deploy. Chargily integration runs on production keys and processes CIB and Edahabia payments. To bring the second party into a deal, email invitations carry an accept link that auto-links the invitee to the transaction the moment they sign up — no manual matching step.

The stack is Fastify + TypeScript over PostgreSQL with Drizzle; migrations auto-apply on container boot, which eliminates the "deployed code ahead of the schema" failure mode. Auth is cookie-only in the Sanctum SPA shape, keeping session credentials out of client-side JavaScript. Operations run in a separate Vite admin dashboard that mirrors the client's architecture.

Key Features

What it does

🔒

Escrow-held funds

The platform holds the buyer's money for the duration of the transaction, so neither party has to trust the other blindly.

⚖️

Dual configurable commissions

Two distinct fees — an escrow commission and a deposit commission — both adjustable by admins, with no code change required.

💳

CIB and Edahabia payments

Chargily integration on live production keys accepts CIB and Edahabia payments.

✉️

Invitation auto-linking

Email invitations carry an accept link; when the invitee signs up through it, they are linked to the transaction automatically.

🍪

Cookie-only SPA auth

Sanctum-shape session authentication carried entirely by cookies — no tokens stored in client JavaScript.

🖥️

Mirrored admin dashboard

A separate Vite app for operators that reuses the client's architecture and conventions.

Technologies Used

Built with

Frontend

TypeScript

Money flows and commission math leave no room for type ambiguity; TypeScript enforces contracts end to end, from Drizzle queries to route handlers.

React.js

Both the client and the Vite admin dashboard are React apps, so one set of component conventions serves both surfaces.

Next.js

The buyer- and seller-facing client runs on Next.js, whose routing and tooling fit the cookie-based, Sanctum-shape session model.

Backend

Fastify

Fastify gives the escrow API schema-driven routing and explicit request validation at low overhead — the right defaults for an API that moves money.

Data

PostgreSQL

Escrow balances and commissions demand relational, transactional integrity — PostgreSQL provides it, with Drizzle migrations applied automatically at container boot.

Infrastructure

Docker

Containerized deploys are what make boot-time migration auto-apply work: every container brings the schema up to date before serving a request.