← Builds

Internal system Engineering group

Beit Alkhibra operating system

One mobile system for a six-company group: tasks, approvals, contracts and reports.

40data tables
96security policies
11automations
One sign-in, eight departments
One sign-in, eight departments
02

A guide inside the system

An Arabic guide for staff is built into the app.

A guide inside the system
A guide inside the system
03

The system document, page 1

Structure, departments and rules in one place.

The system document, page 1
The system document, page 1
04

The system document, page 2

The numbers and the security model.

The system document, page 2
The system document, page 2

The system itself is sign-in only because it holds company data, so these are its public screens.

How data moves

Website formClient portalTeam phonesVoice tasksTasks and approvalsLive notificationsDaily reportsDaily backupOperating system40 tables · 96 security policies
InWebsite formClient portalTeam phonesVoice tasks
Operating system40 tables · 96 security policies
OutTasks and approvalsLive notificationsDaily reportsDaily backup

Under the hood

sw.js · public repository beit-alkhibra-osJavaScript
The notification that opens the right screen on tap
self.addEventListener("push", (e) => {
  let d = {};
  try { d = e.data ? e.data.json() : {}; } catch (_) { d = { title: "Beit Alkhibra", body: e.data && e.data.text() }; }
  const opts = {
    body: d.body || "",
    tag: d.tag || ("bk-" + (d.id || Date.now())),
    dir: "rtl", lang: "ar",
    data: { url: d.url || "/tools.html" },
  };
  e.waitUntil(self.registration.showNotification(d.title || "Beit Alkhibra", opts));
});

self.addEventListener("notificationclick", (e) => {
  e.notification.close();
  const url = (e.notification.data && e.notification.data.url) || "/tools.html";
  e.waitUntil((async () => {
    const all = await self.clients.matchAll({ type: "window", includeUncontrolled: true });
    for (const c of all) if (c.url.includes("/tools.html")) { await c.focus(); c.postMessage({ type: "open", url }); return; }
    await self.clients.openWindow(url);
  })());
});

A task assigned to someone reaches their phone, and tapping it opens the exact screen. Shortened from the public file.

The details
  • Financial approvals routed by signing limit: manager up to 5,000 EGP, finance up to 100,000 EGP, owner without a limit.
  • Every task has an owner and a deadline. Employees submit for review and the manager approves.
  • A locked contract cannot be edited or deleted: the database refuses the attempt.
  • Leave requests deduct from the annual balance automatically.
  • Financial data is visible only to the finance manager and the owner, and the server rejects any attempt to bypass the screens.
  • Every hour a guard chases late tasks and escalates; every night a full backup runs. After hardening, the security advisors returned zero critical issues.

Built with: JavaScript · Supabase / PostgreSQL with row-level security · GitHub Pages · installable web app

NextRetail system · Footwear brandAl Omraa store systemA cashier, stock, customer and shipping system that keeps working on bad internet.Continue Al Omraa store system← All builds