Certified Open Mercato Agency · AI-native enterprise systems for manufacturers · Book a founder call
Work/thegoodcode
Software Services · Internal system

A back office that traces project margin back to approved hours

Hours, rates, approvals, project margin and the monthly close in one system, built for a software services business and running in ours

Client
thegoodcode
Industry
Software Services · Internal system
Period
2026 — Present
Services
Open MercatoCustom SoftwareInternal systemOngoing
thegoodcode — Project Margin · where the cost comes from and where the revenue comes from, on the same approved hours
Executive summary

The use case is project profitability in a company that sells the same delivery under different contracts. A project runs on Time and Material, on a Monthly Fixed Budget or on a Fixed Total Budget. Cost comes from the hours. Revenue follows the contract. This back office carries both sides, from a logged hour to a closed month. It holds the hours, the rates that price them, the approval that fixes a cost, the margin that comes out of the two, and the close that freezes the result. It is written on an Open Mercato foundation. The company it was built for is ours.

Before it existed, one answer lived between four tools. Hours sat in a time tracker, rates in a wiki page, the monthly profit and loss in a cashflow spreadsheet, and approvals in email. Each of them was fine on its own, so nobody replaced them. Answering "which projects made money last month" still meant one person reconciling all four by hand, days after the decisions that shaped the answer.

What we wrote is the economics of a services business: the rate cascade, the approval and costing rules, the detection of figures that move after sign-off, and the month-close logic. That is 23 entities in one module. Everything around them came with the platform: the forms, data tables and dashboards, the role-based permissions, the Timesheet with its grid, calendar and timer, and the field-level encryption on the money columns.

The system is in production on our own infrastructure and we run our own work through it. The company, the people, the projects and every figure in the screens and in the walkthrough are invented demo data. Nothing on this page shows a real client, a real rate or a real margin.

The challenge

Business challenge

The same week of delivery can be billed by the hour, against a monthly budget, or as part of a fixed total. Cost always comes from the same place, hours at the rate that applied when they were worked. That is arithmetic until you do it monthly, across a team on several projects, where rates change mid-engagement and some hours are billable and some are not.

In practice the month-end close turns into a sequence of people asking each other for numbers. Finance asks who changed rate and who joined. Someone exports the hours into a spreadsheet, and every mismatch sends the question back around. Invoices wait on a confirmation that lives in an inbox.

The days it takes are the smaller cost. The bigger one is confidence. A figure assembled by hand from four sources is a figure nobody fully trusts, and pricing, staffing and which work to take more of are decided against it anyway.

What we built

Solution overview

One system carries the whole path. A person logs hours against a project from their own Timesheet. Finance has priced that person in advance, with an internal cost rate and an external billed rate, per person per project, each carrying the date it starts applying. The project manager approves the hours, which fixes the cost at that moment and stamps it with a name and a date. The margin follows from the same approved hours, with a breakdown of where the cost and the revenue each come from.

October in the walkthrough shows what the close is waiting for: 7 blockers across 6 projects. That is 40 hours still to approve and 3 figures that moved after someone had signed them off. The month itself is 176 h across 22 working days. The Close month button opens when the list is empty.

Project Margin opens to its own derivation on one screen. One table says where the cost comes from, person by person, with hours, the rate that applied, hours times rate and any direct costs. A second says where the revenue comes from, the same hours at the billed rate. Under both sits the list of rate versions the calculation used. The project manager who approved the hours is named on the entry that fixed the cost, so a number leads back to a decision without asking anyone.

How it works

Key elements of the solution

People, rates and projects

  • →Providers: contract type, agreed daily hours, cost rate, engagement date. The agreed hours set a monthly target rather than a limit, so a long day reaches the project manager as a flag and the entry still stands
  • →Internal rate and external rate, set per person per project. Until someone sets them, that person costs nothing anywhere. A missing rate shows up as a flag in the list before it shows up as a project that looks unusually cheap
  • →Every rate and every assignment carries its own valid-from date, so a change in March never rewrites February
  • →Three revenue models: on Time and Material the revenue comes from approved hours at the billed rate. On a Monthly Fixed Budget or a Fixed Total Budget it comes from a versioned budget, spread across the months it covers

From hours to a fixed cost

  • →Time entries move through three states, Draft, Approved and Locked, and the Timesheet accepts a duration, a start and an end, or any two of the three
  • →Approval is scoped per person, per project, per month, so a project manager works through the projects they run and nothing else
  • →Approving an hour freezes its cost. The stamp carries a name and a date
  • →Drift Inbox: a figure that moves after sign-off is flagged and kept visible next to the approved original, so a number already used in a decision holds still behind the decision

Margin and the monthly close

  • →Project Margin shows its full derivation. Approved hours at the internal rate on one side, the same hours at the external rate on the other
  • →A live month is marked Open and carries live figures. Closing it flips the mark to Closed and holds those figures in place
  • →Month Overview lists what the close is waiting on, blocker by blocker, against the project each one sits on
  • →A closed month is signed with who closed it and when, and exports as CSV
thegoodcode — Month Overview · what stands between October and a signature, project by project
Operational improvements

Operational improvements

What we get out of it is time and fewer mistakes. The close used to be a reconciliation across four tools. It is now a list of blockers, each pointing at a project and at the person who can clear it. Nobody re-keys hours into a spreadsheet, so the errors that came with copying between tools are gone as well.

  • →The close waits on a list of named items, 7 of them in the October of the walkthrough
  • →Margin is visible while the month is open, so the figure arrives in time to change a decision
  • →A rate change applies from its own date, which leaves nobody reasoning about which months it touches
  • →Approvals leave a record of who approved what and when, which removes an entire class of email archaeology
  • →A figure that moves after sign-off surfaces by itself, in the inbox built for it
Strategic impact

Strategic impact

A margin figure is worth what its reproducibility is worth, and reproducibility is decided in the data model, before any report is written. Dated rates, a cost frozen at approval and an explicit drift flag are three decisions in that model. Together they are what makes a closed month mean something.

The proportion is the part worth taking away. Open Mercato core carries 230 entity definitions. The module we wrote for this build adds 23. A company that wants software shaped like its own process is paying for the rules that make it theirs, with the application underneath already written.

Companies deciding where this layer should live reach the decision from two directions. A packaged professional services platform brings a proven path, a product roadmap and a vendor behind it. Custom software on a platform foundation brings a fit to the process a company already runs and a codebase it owns. Both routes are legitimate, and this case study documents the second one.

The whole path, from a logged hour to a closed month, is recorded as a five-minute walkthrough: Back Office for a Software Services Company. Open Mercato published its own account of the same build: How thegoodcode tracks margin on every project.

If you are weighing this against a packaged platform, bring the process you already run to a founder call and we will mark the parts that would be yours to write.

thegoodcode — Project Approval · one person, one project, one month, approved in a batch that freezes the cost

work.with.us;

Bring one real problem; leave with a clear answer.