Skip to content
ME
All work
Business system2025

AkhshabZ

Arabic RTL invoicing and accounts system for a wood retailer

Role: Full-stack: schema, migration, RPCs and UI

AkhshabZ dashboard: Arabic right-to-left sales figures and monthly chart
invoices migrated
8,533
line items reconciled
21,448
customer accounts
1,061
reconciled match
100%

Overview

A right-to-left Arabic invoicing and accounts system running in a real wood retailer. Timber is not sold by the unit but by volume, so pricing is computed from dimensions into cubic metres, alongside per-piece board sales, and both have to land in the same invoice and the same ledger.

The system carries running customer balances, supplier ledgers, live stock with low-stock alerts, and profit reporting the owner actually uses to price the next order.

The hardest part was not the app. It was moving a decade of trading history out of spreadsheets without losing a piastre: 8,533 invoices, 21,448 line items and 1,061 customer accounts migrated into Postgres with a fully reconciled match against the originals.

The screens

15Creating an invoice, with cubic-metre pricing computed from board dimensions

Captured from the running system. Records shown are demonstration data.

The interesting part

Invoices are soft-deleted, always.

An accounting record you can delete is not an accounting record. Invoices are never removed, only soft-deleted, so the trail survives a mistake and the balances stay auditable. Invoice writes go through atomic Postgres RPCs rather than a sequence of client-side calls, so a half-written invoice is not a state the database can be left in. Reporting reads from views, and owner and staff roles are separated by RLS, with account provisioning handled by an Edge Function.

What it does

  • Full Arabic RTL interface, built RTL-first rather than mirrored afterwards
  • Cubic-metre pricing computed from board dimensions
  • Per-piece board sales alongside volume sales on the same invoice
  • Running customer balances and supplier ledgers
  • Live stock tracking with low-stock alerts
  • Profit reporting across periods, customers and products
  • 8,533 invoices migrated from legacy Excel with a reconciled match
  • Soft-deleted invoices to preserve the accounting record
  • Atomic invoice RPCs: no partially written invoices
  • Owner and staff RLS roles, with provisioning via an Edge Function

Built with

Framework
  • Next.js
  • React
  • App Router
Language
  • TypeScript
Data
  • Supabase
  • PostgreSQL
  • Postgres RPC
  • Reporting views
Backend
  • Row Level Security
  • Edge Functions
Practices
  • Arabic RTL
  • Data migration
  • Soft deletes

Next project

Alkamnja

Bilingual Arabic/English online violin school