Selected work

Three systems, in detail

Operational software rather than showpieces. Each of these has real users, real edge cases and a README you could run it from. What follows is what they do and the decisions that made them hold.

Al-Aziz Workforce OS

Workforce system2026

Attendance hardware, payroll rules and human exceptions — reconciled into one number a manager can sign off.

Workforce management for a charcoal-grill restaurant in Gulberg, Lahore, built for a single manager account with complete access. Face-recognition terminals feed an attendance rules engine; its verdicts flow into a payroll run that reconciles to the payslip.

The hard part was never the CRUD. It was the exceptions — an overnight shift that crosses midnight, a missed punch, approved overtime, Ramadan hours, a loan instalment due this month. The rules engine is configurable and explains how it reached each outcome, so a disputed day can be answered rather than argued.

  • An attendance rules engine covering overnight and split shifts, grace periods, early leave, overtime with approval, breaks, missing punches, half-days, holidays and Ramadan hours
  • Payroll staged draft → review → approved → paid, with advances and loans on instalment plans recovered automatically, so the ledger and the payslip always agree
  • Ships empty by default — the seed creates one manager account and system settings, and nothing else. No fabricated staff, no demo numbers on a live deploy
  • Deterministic fixtures seeded by a PRNG rather than Math.random or Date.now, so server and client renders always agree and there are no hydration mismatches
RoleDesign and build
Stack
  • Next.js 15
  • React 19
  • TypeScript
  • Tailwind v4
  • NestJS
  • Prisma
  • PostgreSQL
The Al-Aziz Workforce OS dashboard: headcount, attendance and payroll totals across the top, a live check-in feed from the attendance terminals below, and pending advances, loans and the upcoming salary run down the right.
Manager dashboard. Running the seeded demo dataset — a real deploy starts with no staff and no numbers at all.Thirty-one data models. Front end and API both building.

People

  • Employee directory with a permanent business-facing ID, salary bands and reporting lines
  • Profiles carrying salary history, shift assignment, documents and CNIC scans
  • Leave requests, approval queue, entitlement balances and a month calendar

Attendance

  • Live check-in feed from face-recognition terminals, with a device fleet panel
  • Configurable rules engine: overnight and split shifts, grace, overtime approval, breaks, missing punches, holidays, Ramadan hours
  • Correction queue for disputed days, with every manual fix logged

Payroll

  • Runs staged draft → review → approved → paid, with holds and manual adjustments
  • Advances and loans on instalment plans, recovered automatically against salary
  • Printable payslips and a bank-file export that reconciles to the ledger

Operations

  • Seven standard reports with filters, charts, CSV/JSON export and print
  • Offline-first sync dashboard with pending, failed and conflict counts
  • Command palette for navigation and people search across the whole app

Air Foundation School System

School management system2026

Multi-tenant from the first migration, so a second campus is a row of data rather than a rewrite.

Role-based portals for students, parents, teachers and administrators behind a single sign-in gateway, on a NestJS API. Every domain row carries a school ID; the super administrator is the only account without one, and services verify ownership server-side rather than trusting an ID sent by the client.

The marketing site was deliberately removed and replaced by that gateway. A school portal that opens on a brochure is a school portal nobody can find the login for — and an administrator can now build the entire school from the browser: sessions, classes, sections, subjects, teachers, students, guardians and assignments.

  • Authorisation is permission-based, not role-name-based: roles hold dot-notation permissions with per-user overrides, and a permission string absent from the catalogue can never pass
  • Routes fail closed — a global guard protects everything unless a handler explicitly opts out, so forgetting to guard a new controller denies access rather than granting it
  • Refresh tokens are stored only as SHA-256 hashes and rotated on every use; presenting a rotated token revokes the whole token family, treating replay as compromise rather than as a retry
  • Unknown accounts are compared against a dummy hash so sign-in takes the same time either way and the endpoint cannot be used to enumerate who has one
  • Thirty-nine data models, with an audit interceptor and boot-time environment validation
RoleDesign and build
Stack
  • Next.js
  • TypeScript
  • NestJS 11
  • Prisma 6
  • PostgreSQL
  • Neon
  • Vercel
The Air Foundation School System entry screen, offering four routes into the portal — student, parent, teacher and administrator — each with a one-line description of what that role can do.
The sign-in gateway that replaced the marketing site. Every deeper route redirects here until it can prove a permission.Core flow verified end to end against PostgreSQL. Deploys with the API running as a serverless function, and with migrations and seeding performed inside the deployment rather than from a laptop.

Access

  • One sign-in gateway routing students, parents, teachers, administrators and a super administrator
  • Permission-based authorisation with per-user grants and revocations on top of roles
  • Routes deny by default; a permission string absent from the catalogue can never pass

Sessions

  • Access tokens held in memory only, never in localStorage
  • Refresh tokens stored as SHA-256 hashes in httpOnly cookies and rotated on every use
  • Replaying a rotated token revokes the whole family; changing a password revokes every session
  • Unknown accounts compared against a dummy hash, so timing cannot be used to enumerate users

School administration

  • Build the school from the browser: sessions, classes, sections and subjects
  • Teachers, students, guardians and assignments, each scoped to their school
  • Ownership verified server-side — a client-supplied ID is never trusted

Foundations

  • Thirty-nine data models, every domain row carrying a school ID
  • Audit interceptor and boot-time environment validation
  • Deploys with the API as a serverless function; migrations and seeding run inside the deployment

Inkwrench

Content platform2026

Build the platform before the catalogue — taxonomy, editorial engine and SEO layer first, tools second.

The foundation for a catalogue of free online tools and calculators. Version one deliberately ships no tools at all; it ships the thing they hang off — the design system, the category taxonomy, the MDX editorial engine and the SEO layer.

That ordering is the point. A hundred tools on a weak platform is a hundred pages that cannot be found, cannot be retired cleanly and cannot be moved. The platform makes each of those a configuration concern.

  • Every absolute URL — canonicals, Open Graph, sitemap, RSS and JSON-LD identifiers — derives from a single environment variable
  • Middleware normalises casing with 308 redirects and serves 410 Gone for retired URLs, so link equity is never quietly lost
  • robots.txt serves a blanket Disallow until a real site URL is set, which is what keeps preview deployments out of the index
  • MDX editorial pipeline with syntax highlighting, frontmatter and GitHub-flavoured markdown
RoleDesign and build
Stack
  • Next.js
  • TypeScript
  • MDX
  • Tailwind
  • Shiki
The Inkwrench home page: a banner announcing that version one is live and that tools ship category by category, over a large statement headline and the opening of the category catalogue.
Version one. The banner says plainly that the catalogue is still filling — the platform is what shipped.Version one complete — platform shipped, catalogue in progress.

Platform

  • Design system and component library built before any feature consumed it
  • Category taxonomy the catalogue hangs off, so a new tool is a data entry
  • MDX editorial engine with frontmatter, GitHub-flavoured markdown and syntax highlighting

Findability

  • Canonicals, Open Graph, sitemap, RSS and JSON-LD identifiers all derived from one variable
  • Middleware normalising casing with 308s and serving 410 Gone for retired URLs
  • robots.txt serving a blanket Disallow until a real site URL is set, keeping previews out of the index