All projects
In ProgressFull-Stack

3ala El Sare3

A peer-to-peer and agency car rental marketplace with bookings, KYC, payments and payouts, car handover and returns, and drivers, built on an enterprise-grade NestJS backend.

Role
Full-Stack Developer (solo)
Timeline
Apr 2026 – Present
Year
2026
3ala El Sare3
01

Overview

3ala El Sare3 is a car rental marketplace, similar to Turo or Getaround. Car owners and rental agencies list their cars, renters search by brand, model, category, dates and location, then book with a deposit, pick the car up and return it, optionally with a driver.

I'm building the whole platform myself: a PostgreSQL backend designed for money and concurrency, the customer website and the admin dashboard. A teammate is building the mobile apps on top of the same API.

The problem

Renting a car from individuals or small agencies usually happens over WhatsApp, with no identity checks, no protection against double bookings and no clear record of who paid what.

The solution

A marketplace where every user is verified (KYC), availability and bookings are enforced by the database, every payment, deposit, refund and payout is recorded in a ledger, and handover and returns are documented step by step.

02

Who It's For

R

Renters

Search cars, check availability and pricing, book, pay a deposit and review the trip.

C

Car owners & agencies

List their fleet, set daily, weekly and monthly prices, manage bookings and receive payouts.

D

Drivers

Take on trips when a renter books a car with a driver.

A

Admins

Review KYC, moderate listings, manage brands, models and categories, run payouts and reports.

03

Key Features

Booking State Machine

Every booking moves through an explicit table of allowed transitions, from request to approval, handover, return and completion, with automatic expiry.

Payments Ledger

Money stored as integer cents in an append-only ledger (authorize → capture → refund → deposit → payout), with every mutation idempotent.

KYC Verification

Identity and license verification for users, with an admin review queue before they can book or list.

Fleet & Pricing

Cars linked to a brand and model catalog, with availability calendars and optional weekly and monthly pricing tiers.

Handover & Returns

Pick-up and return inspections for each trip that record mileage, fuel level, notes and photos.

Real-time Notifications

Socket.IO for live booking status and Firebase Cloud Messaging for push notifications.

Admin Dashboard

Bookings, KYC, moderation, payouts, reports, users, roles (RBAC), banners and backups.

Arabic & English

A bilingual website with its own design system built for comparing cars and prices.

05

Architecture

01

Website & admin

Next.js apps that talk to the API through a backend-for-frontend layer

02

API

NestJS with Controller → Service → Repository → Prisma layers, DTO validation and RBAC guards

03

Worker

Same codebase on BullMQ: emails / OTP, payment settlement, payouts, notifications, auto-expiry

04

Data

PostgreSQL for relational and money data, Redis for queues, tokens, rate limits and Socket.IO

06

Challenges & Solutions

Making double bookings impossible

Challenge

Two renters can request the same car for overlapping dates at the same moment. Checking availability in code first and then inserting is a race condition that eventually double-books a car.

Solution

Availability is enforced by PostgreSQL itself. Each booking stores its period as a time range, and a GiST exclusion constraint rejects any overlapping booking for the same car. Together with an explicit booking state machine, the database guarantees correctness even under concurrent requests.

Handling money safely

Challenge

A rental involves authorizations, captures, deposits, refunds and owner payouts. Floating-point amounts or editable balances quickly lead to mismatched totals and duplicated charges on retries.

Solution

All amounts are stored as integer minor units with a currency. Every movement is an append-only ledger entry, so balances are always derived, never edited. Each operation is idempotent, so a retried request or job can never charge or pay twice.

Have a project like this in mind?

I'd love to help you build something great. Tell me what you're working on.

Let's talk