Haitham AssoliRead this page in Arabicاقرأ هذه الصفحة بالإنجليزية

Web2024

Hafiz Platform

An escrow-style platform that protects both sides of a sale.

  • Live
Hafiz Platform — cover screenshot

Project factsبيانات المشروع

In short

A platform where a seller registers, is connected to a customer, and the rights of both parties are preserved through the transaction rather than depending on trust between strangers.

The compartments

Role
Solo
Year
2024
Status
Live

Built with

  • Next.js
  • TypeScript
  • Server Components
  • Server Actions
  • Zod
  • Tailwind CSS
  • SEO
  • Caching

What it isما هو

Online selling between individuals fails at the same point every time: one side has to go first. The seller ships before being paid, or the buyer pays before receiving, and whoever moves first carries all the risk.

Hafiz sits between them so neither has to. The platform holds the transaction and releases it when both obligations are met, which turns a trust problem into a process.

يفشل البيع بين الأفراد عبر الإنترنت عند النقطة نفسها دائمًا: على أحد الطرفين أن يبدأ. فيشحن البائع قبل أن يُدفع له، أو يدفع المشتري قبل أن يستلم، ومن يتحرك أولًا يحمل المخاطرة كلها.

تقف «حافظ» بينهما فلا يضطر أيٌّ منهما. تُمسك المنصة بالصفقة وتُفرج عنها عند استيفاء الالتزامين، فتتحول مشكلة ثقة إلى إجراء.

Results

  • Server-validated transaction states protecting both parties.
  • حالات صفقة مُتحقَّق منها على الخادم تحمي الطرفين.

Challenges

Each one opens twice: what went wrong on the left, what I did on the right.

01

The state machine is the safety mechanism

Problem

A transaction that can be advanced out of order, released before delivery or cancelled after payment, loses someone real money. The failure is financial, not cosmetic.

What I did

Every transition runs through server actions with the allowed transitions validated on the server and the payload checked with Zod, so an out-of-order request is rejected rather than reaching the state machine.

Keep goingتابع

Shelf

All projectsAll 40, in six compartments.