Skip to content
FAHD MOHAMED
All work

Professional work · ERP · E-invoicing · Geofencing

ERP Business OS

A 17-module ERP for an Egyptian trading and contracting company, with e-invoicing, ledger-based stock and geofenced attendance.

modules
17
modules
source: README / src/app/*
permission keys
47
permission keys
source: seeded permissions table
Prisma models
32
Prisma models
source: prisma/schema.prisma
languages, RTL
2
languages, RTL
source: src/lib/i18n/
Dashboard with overdue alerts, net position, receivables and payables

The problem

The company ran finance, stock and field teams on spreadsheets. Totals disagreed, stock went negative, and field attendance was impossible to verify.

My role

  • Engineered the system: full-stack development, business logic and ERP implementation

Engineered during my role as AI & Software Engineer at Elenor Marketing Agency, Cairo (Jan 2026 – present). Screenshots come from sanitized demo environments: client and business data are replaced with demo data.

What it is

One system of record covering receivables and payables ageing, Egyptian Tax Authority-format bills with 14% VAT and withholding, clients and vendors, projects with geofenced sites, warehouses with ledger-based stock, attendance, leave, reports, roles and an audit log, in English and Arabic. The server computes every total, and stock movements are ledger entries that cannot drive a balance negative.

Key features

  • AR/AP ageing, cash position and overdue alerts
  • E-invoice bills with per-line 14% VAT and withholding tax; ETA API client (preprod and production)
  • Projects with geofenced sites on OpenStreetMap; attendance re-verified on the server
  • Ledger-based stock across warehouses that cannot go negative
  • 47-permission role matrix and a full audit log
  • English and Arabic with RTL, light and dark themes

Architecture

UI

  • 17 module pages
  • EN / AR · light / dark

Server

  • Server actions
  • Services (server-only)
  • Permission checks

Domain

  • Billing + VAT
  • Stock ledger
  • Geofence check
  • Audit trail

Data & external

  • PostgreSQL (32 models)
  • ETA e-invoicing API
  • OpenStreetMap

Stack

App

Next.js 15 server actionsReact 19TypeScriptTailwind

Data

Prisma 7PostgreSQL (Neon)zod 4

Security

argon2idRBAC (47 permissions)Audit log

Geo & tax

Leaflet / OSMETA e-invoicing client

Quality

vitestPlaywright

Engineering challenges

01

The server owns the numbers

The browser never sends a total. Bills are recomputed line by line on the server, and stock is a ledger, so the warehouse balance is derived rather than edited.

02

Attendance you can trust

A check-in carries the device location, but the server re-verifies it against the project site’s geofence before recording it.

Run from source against a local database using the project’s own seed and activity scripts. For local Postgres, the scratch copy used Prisma’s pg adapter instead of Neon’s WebSocket driver. Real company names in the seed data were replaced with fictional ones, and the client’s logo is hidden.

Arabic, right-to-left dashboard
Dark theme
Projects with geofenced sites and budgets
Bills
Role and permission matrix
Warehouses and stock
Reports
Responsive on a phone

Next project

Agency Website + AI CMS