Uzair Manan
Case Study
All projects

Optimus Operations

An operations platform for a construction firm: projects, billing cycles, contracts, vendors, payroll and tax liability, with five staff roles and an approval queue in front of every edit.

Role
Solo, fullstack
Timeline
Mar – Jul 2026
Stack
Next.js · Express · MongoDB · Cloud Storage
Status
Private client tool
The Brief

One set of books

The firm runs several construction projects at once. Each is billed in cycles against a purchase order, the client withholds part of the tax at source, vendors are paid against contracts, and materials are bought outside those contracts. The job was one place where all of that adds up to a profit figure per project that can be trusted.

Five roles use it: construction managers, quantity surveyors, accountants, procurement and project managers. Each sees a different slice.

  • Staff can create records directly, but editing or deleting anything needs the owner's approval.
  • Documents are attached to cycles, vendors, employees and transactions, and folders are shared per role or per person.
  • The tax arithmetic has to match what the accountant does by hand, to the rupee.
5
Staff
roles
22
Data
models
6
Transaction
types
The Build

What I built

  1. A generic approval queue

    An edit from a non-admin becomes an approval record holding only the changed fields and a snapshot of the original, so the owner reviews a diff. Approving it runs the real update. A partial unique index stops two pending requests for the same document.

  2. Billing cycles that carry the tax rules

    Each cycle stores its PO amount, income and services tax rates, and how much of each the client withholds. Company tax liability and the amount actually received are derived from those, and tax payments are capped at what a cycle owes.

  3. One transactions collection

    Revenue, vendor, material, tax, salary and other expenses share a collection through Mongoose discriminators, each with its own references, so the dashboard can aggregate across all of them in one pipeline.

  4. Private files

    Uploads go to Google Cloud Storage and are served through signed URLs, with folder access checked against the parent and grandparent folder's grant list.

Detail

One formula

A QA pass walked every admin screen against the demo seed and checked each number against values worked out by hand. Everything reconciled except one: estimated profit. The dashboard left out material spend and the project page didn't, so one project showed 2.71 crore in one place and 2.66 in the other, a gap exactly equal to its materials.

The fix was to delete the second copy of the formula. The summary now sums the per-project figures instead of deriving its own.

estimatedProfit = actualAmount
                - totalContractCost
                - companyTaxLiability
                - materialPaid
Outcome

Where it landed

Projects, clients, vendors, employees with payroll and absences, transactions, contracts, inventory across warehouses, documents and daily work status are all built, with a dashboard per role. The QA pass found no console errors on any page and one real inconsistency, which is fixed.

What I'd change: the role permissions live in a JSON file but are enforced controller by controller. A single middleware reading that file would make the next role a config change instead of a code change.