All posts
2026-01-034 min read

How Pyllerd's cost trends & budget-vs-actual overlay works

A deep dive into how Pyllerd rolls up expenses, labour wages, and subcontractor payments into a single month-over-month view — and how the budget overlay flags projects heading over-budget before they blow up.

The single most-requested feature in Pyllerd's first year was “show me if I'm over budget on Site X before I write the next cheque.” That's a harder problem than it looks. A real project's cost lives in three separate places:

  • Material and petty expenses (your receipts).
  • Labour wages & bonuses (your worker ledger).
  • Subcontractor payments and extras (your sub ledger).

Most tools ask you to keep those three separate and reconcile them in Excel at month-end. Pyllerd rolls them up in real time and shows you the picture on a single chart — updated the moment a receipt is forwarded via Telegram or a wage entry is posted.

The three streams, unified

Under the hood, the GET /api/cost-trends endpoint pulls three collections — expenses, worker transactions (wage + bonus), sub-transactions (payments + advances + extra work) — filters by owner, optionally by project, and buckets them by week, month, quarter, or year. The frontend renders it as a stacked bar chart (Expenses in orange, Labour in black, Subs in amber) with a dashed green reference line for the budget threshold when a single project is picked.

Budget vs actual — the signal, not the noise

Every project gets a budget field. The Cost Intelligence panel classifies each project into ok (<80% used), warn (80–100%), over (>100%), or no_budget. The colours match: green, amber, red, gray. A horizontal bar chart shows all projects at once so you can spot the two that need immediate attention.

A separate call-out row appears if any expenses aren't attached to a project — the fastest way to keep budgets accurate is to attach every receipt as it comes in, which the Web upload flow now does automatically.

Time windows worth caring about

We ship four period toggles (Weekly, Monthly, Quarterly, Yearly) and four range toggles (All time, Last 3, Last 6, Last 12). Quarterly is the sweet spot for owners; monthly is for on-the-ground supervisors; weekly is for the tight-cash-flow moments. Yearly is for board decks.

Open the Cost Trends dashboard → (sign in first — the demo user starts at zero, forward a receipt or two to see the chart light up).