An Arabic-first admin console for selling exam-prep courses through a network of bookshops across Iraq.
Sole frontend developer
Scroll to step inside
Blurred on purpose: client work under NDA
Ranked by how much of their limit they have used
Turns red past 74% of the limit
Debt usage
Approval status
The coupon’s course and exam discounts
Each resource with the actions granted on it
1440 px
3909601440
Blurred on purpose: client work under NDA
Ranked by how much of their limit they have used
01 / 07
Case study
The problem
A tutoring business sells exam-prep courses through bookshops and registration offices across Iraq. Each of those agents sells on credit up to a limit, and every sale, deposit and refund moves money between them and the business. The staff needed one place to price the courses, watch every agent’s debt, approve every money movement and decide who may do what.
What I worked within
Arabic first: right to left by default, with English as the second language
Every page had to work on a desk, a tablet and a phone
Money on almost every screen, so every action is allowed per user, from the page down to the button
One front-end developer, on a backend service I didn’t write
Turns red past 74% of the limit
02 / 07
What it does
Agents and their credit
The POS agent registry on a wide screen: balances, sales totals, debt limits, and a debt bar that turns red past 74% of the limit.
How I built it
TanStack Vue Query over ofetch, with a single-flight JWT refresh and URL-synced filters
Debt usage
03 / 07
What it does
One agent, on one page
One agent’s profile: the near-limit warning, balance and debt usage, allowed course types, the courses they may sell, and their accounting PIN.
How I built it
An installable PWA with an update prompt, a Mapbox location picker, and phone OTP login
Approval status
04 / 07
What it does
Every money movement, approved
All transactions: sales, deposits and refunds with their approval status, platform code, agent, governorate and exam type.
The coupon’s course and exam discounts
05 / 07
What it does
Receipts that match the printed ones
A sale and its receipt: the buyer, the course and platform code, then the price breakdown with the coupon’s course and exam discounts and the agent’s profit.
How I built it
Receipts, bank statements and vouchers generated in the browser (jsPDF, html2canvas-pro, JsBarcode, qrcode)
Each resource with the actions granted on it
06 / 07
What it does
Who may do what
A permission group: each resource with the actions granted on it. The interface checks the same rules on every page and button.
How I built it
Role-based access with CASL: routes, menu, cards and buttons all check the same rules
1440 px
3909601440
07 / 07
What it does
Every page works on a phone
On a phone the same registry becomes cards: every list and detail page has its own mobile layout.
How I built it
A Desktop and a Mobile variant for every list and detail page, lazy-loaded and switched at 960px
Drag the edge of the screen and see it switch.
Decisions I made
01
One set of permission rules, checked everywhere
The API sends each user’s permissions, from their groups and from direct grants. I turned them into CASL rules that the router, the menu, every dashboard card and every button check, so a page a user can’t open never loads and a button they can’t use isn’t there.
01
The trade-off
Every new page and action has to say which rule it answers to. It’s a step each feature pays for, in return for one place where access is decided.
02
Two layouts per page, not one squeezed one
A data table built for a wide screen doesn’t shrink well onto a phone. Each list and detail page is a container that loads a Desktop or a Mobile view at 960px, so a phone never downloads the table and gets cards, bottom sheets and 44px touch targets instead.
02
The trade-off
Two views per page to keep in step. The page’s logic lives once, in a shared composable, and I checked the whole pass at 390, 768, 1024 and 1440px in both languages, with the desktop kept identical to a baseline commit.
03
One token refresh for every waiting request
When a session’s token expires, many requests fail with a 401 at the same moment. The client refreshes the token once for all of them and then retries each, instead of firing a refresh per request.
03
The trade-off
If that one refresh fails, every waiting request fails with it. So the app doesn’t half-work: it tells the user in Arabic and signs them out cleanly.
By the numbers
of the front end’s commits are mine: 450 of 454
99%99%
Source: git history
modules, every one built by me
1717
Source: the repository
lines in the checklist I wrote for the phone and tablet pass
1,0991,099
Source: MIGRATION_CHECKLIST.md
months of work, October 2025 to September 2026
1212
Source: git history
How it fits together
Staff
On a desk, a tablet or a phone, in Arabic or English
Sign-in and the router guard
Phone OTP, then the page’s CASL rule decides whether it opens
The page
A container loads the Desktop or the Mobile view at 960px; receipts and statements are made as PDFs in the browser
The data layer
TanStack Query over ofetch, filters kept in the URL, one token refresh for every waiting request