03 / 05Operations and business intelligence for Gulf businesses2026
Opsight
Your orders, stock and expenses in one place, and their figures against the period before.
- Next.js 16
- React 19
- Tailwind 4
- TanStack Query
- Recharts
- Laravel 12
- PHP 8.2
- Sanctum
- MySQL
- Pest
- Vitest
- Playwright
- REST API
- Larastan

At a glance
01Who is it for?
- The owner: sees everything, and sets up the business and its users.
- The manager: runs orders, stock and expenses, and reads the analysis.
- The analyst: reads the figures, costs and margins and exports them, and changes nothing.
- Staff: record orders and customers and take payments, with no cost and no profit in sight.
Before the project
A small or mid-sized business does not lack data; it lacks one place for it. Orders live in one system, stock in a ledger and expenses in a spreadsheet, so "what did we make compared with last month, and why?" takes a day and ends in a figure no two people agree on.
- Scattered figuresEvery part of the business keeps its own record, and no single number comes out of them that anyone can rely on.
- A margin nobody knowsProduct costs change, so past profit gets computed at today’s prices.
- Misleading comparisonsA month not yet over is compared with a whole one, and this year’s Ramadan with last year’s non-Ramadan.
The product
The product, as its users use it
Scroll to walk with the user one step at a time, each step on the screen where it actually happens.
Try it as any role
The sign-in page has a button per role: owner, manager, analyst and staff, and the owner of a second business. The data is invented, and it is put back every night.
/login

The month on one screen
Revenue, orders, profit, margin and expenses, each beside the previous period and the change from it, and a period not yet over is marked incomplete.
/dashboard

Why the figure moved
Trends and breakdowns by category and product, compared with the previous period, last year, or the same Hijri dates, then insights from plain rules.
/analytics

One order, its whole history
The lines at the prices they sold for, the payments and refunds, and when it was placed, confirmed and fulfilled.
/orders

The same screen, for staff
Staff see orders and revenue, and no cost, profit or expenses, because the server never sends them.
/dashboard

A second business, same installation
A Kuwaiti business in Kuwaiti dinars and its own time zone, which sees nothing of the first, and the first nothing of it.
/orders

How it was solved
Built to hold
The decisions that make the promises above true, rather than a look on the screen.
Every metric defined exactly once
Revenue, cost, margin, cancellation rate, new and returning customers all live in one file, aggregated in SQL over DECIMAL columns. Cost comes from the snapshot kept with the order line when it was confirmed, not from the product’s price today.
Roles enforced on the server
Some fifty abilities spread over four roles, checked by policies before every action. Staff record orders, follow them and take payment, but never see a cost, a margin or an expense, because those fields never reach them.
The Gulf calendar is part of the arithmetic
The working week and its weekend come from the business’s settings, a period in progress is marked incomplete, and when a period falls in Ramadan or Eid the analysis offers to compare it with the same Hijri dates last year.
Insights by rule, not by guess
Ten rules read the figures: a falling margin or revenue, a spike in cancellations or expenses, dependence on one customer, a stockout coming, products with no cost, customers who have gone quiet. None fires on a period still in progress or on a handful of orders, and a rule that involves cost is not even computed for a role that may not see cost.
Worth explaining
The last unit is sold once
Confirming an order re-reads it under a lock inside the transaction, so of two orders reaching for the last unit one gets it and the other receives a 409, not a double deduction. A test with two real database connections proves it.
Exports that cannot be turned against you
CSV files are streamed in chunks rather than built in memory, and a cell that starts like a formula is neutralised before Excel can run it, while real negative numbers are left alone. Each export needs its own ability, ten an hour at most.
A demo you can try in one click
A button per role on the sign-in page; the demo accounts cannot have their password or role changed; and every night the data comes back from a saved snapshot, its dates moved so the history ends this week.
Arabic and English without a library
Two dictionaries of over 1,300 lines each; the server sets the direction and language on the first render, so the page never flashes left to right; digits are Latin or Arabic-Indic as the user chooses, and the choice is kept on their account.
The outcome
What was delivered
- 17
- screens in the product
- 46
- real screenshots
- 831
- automated tests
- 2
- full languages
- A live copy with demo accounts for four roles and a second business, put back every night.
- Arabic and English, in the currencies of nine countries with their VAT.
- 573 Pest tests, 188 Vitest tests and 70 Playwright browser tests, with PHPStan at level 6 on every push.
- Ten insight rules, and an activity log of who changed what.
- PASSStaff never receive a product’s cost, on the list or on its own pageopsight/tests/FieldRedactionTest.php
and 830 more in the repository
Every screen
Every screen, as it is
Real screenshots of the project running — not stock imagery.
Every page in the project
Real screenshots of the project running — not stock imagery. · 46 screens





