0%
Aymen
Back to Works
WebShipped2026

Rawy

Arabic digital reading platform — ebooks, audiobooks and podcasts with subscriptions, a publisher dashboard and per-content-type entitlements.

My Role
Full Stack Engineer
Timeline
Feb 2026 — Aug 2026
Status
Shipped
Rawy
Overview

Rawy is an Arabic digital publishing platform spanning four content types — ebooks, audiobooks, podcasts and courses. Access is sold through subscription plans scoped per content type, publishers configure their own free previews, and an automated earnings computation feeds publisher payout workflows, all operated through dedicated publisher and admin dashboards.

Media lives on Cloudflare R2 and is served over HTTP range requests, so the reader and audio player start from the requested byte range instead of downloading whole files. Uploaded images are processed into WebP derivatives with sharp, Arabic PDF contracts are produced by overlaying pdf-lib text in the Tajawal font on a raster background, and a React Native app carries the EPUB reader, a Quran reader and an audio player with media notifications to mobile, with FCM push on top.

The Challenge

The problem to solve

The hard problems were media delivery and mixed-media monetization. Whole-file downloads meant the reader and audio player stalled until an entire book or episode had arrived. Four content types could not share one access rule — a plan may include podcasts and exclude courses — and each medium needed its own preview mechanism. On top of that, publisher contracts had to ship as properly typeset Arabic PDFs, something off-the-shelf PDF generation handles badly.

Reading experience
Reading experience
The Solution

How it was built

Delivery was rebuilt around HTTP range streaming from Cloudflare R2: the reader and player fetch byte ranges on demand, which fixed load times without touching the storage layer. Entitlements live in a features jsonb on each subscription plan and are enforced per content type, so plans compose freely across books, audiobooks, podcasts and courses. Previews follow the same per-medium logic — a publisher-set percentage of a book, an ffmpeg-generated audio clip for a podcast.

On the publisher side, a 15-screen dashboard on a navy/gold design system is backed by automated earnings computation feeding payout workflows, with a separate admin dashboard for running the platform. Contracts are generated by overlaying pdf-lib text in Tajawal on a raster background — sidestepping broken Arabic shaping in PDF tooling — and the sharp pipeline emits WebP derivatives for every uploaded image.

Key Features

What it does

⚡

HTTP Range Streaming

Byte-range requests against Cloudflare R2 replaced whole-file downloads, fixing reader and player load times on large books and episodes.

🔐

Per-Content-Type Entitlements

Each subscription plan stores its entitlements in a features jsonb, enforced separately for books, audiobooks, podcasts and courses.

🎧

Publisher-Set Free Previews

Each medium gets its own mechanism: a publisher-chosen percentage of a book, an ffmpeg-generated audio clip for podcasts.

💰

Automated Earnings & Payouts

Earnings are computed automatically and feed publisher payout workflows, surfaced in a 15-screen navy/gold publisher dashboard alongside a separate admin dashboard.

📱

React Native Mobile App

EPUB reader with immersive mode, a Quran reader, and an audio player with media notifications, plus FCM push.

📄

Arabic PDF Contracts

Generated by overlaying pdf-lib text in the Tajawal font on a raster background, so Arabic script renders correctly.

Catalogue browsing
Catalogue browsing
Technologies Used

Built with

Frontend

Next.js

Server rendering carries the public catalog and both dashboards in one framework, so content pages arrive rendered instead of hydrating an empty shell.

TypeScript

One typed model of plans, entitlements and content flows across the API, web and mobile codebases — which matters when a features jsonb decides what a user may open.

Tailwind CSS

Utility classes kept the navy/gold design system consistent across the 15 publisher screens and the admin dashboard without a parallel stylesheet per surface.

Mobile

React Native

One codebase provides the EPUB reader, Quran reader and audio player, with media notifications and FCM push, on both mobile platforms.

Backend

Fastify

A low-overhead Node server suits an API whose hot path is serving byte-range media requests and small JSON responses.

Data

PostgreSQL

Subscriptions, earnings and payouts need relational integrity, while each plan's features map sits naturally in a jsonb column of the same database.