Multi-module ERP systems on React and Postgres: roles and branch scope enforced in the database, an audit log nobody can rewrite, and your own repository from the first commit.
This page is about the system that holds the books, the stock, the people and the approvals of one business, replacing some combination of a desktop ledger, a few spreadsheets and a notebook. We've built two. One is eighteen modules for a regional trading and distribution group, replacing a legacy desktop ledger. The other covers students, fees, payments, payroll and accounting across the branches of an independent school group.
What they share isn't a feature list. It's that the valuable part was the rules that must hold: who may see which branch, what counts as revenue only once it's approved, and who changed which figure and what it was before. Those rules live in the database as well as the screens, because screens get refactored and a rule that only one screen enforces is a rule that eventually isn't enforced.
We should also say where this page is going. The default answer to ERP is buy, and for most businesses that's right. A good part of what follows is how to tell whether you're one of the few for whom the arithmetic has flipped.
Both builds started from specific things that were going wrong. These are the four that came up.
The trading group's books lived in a proprietary desktop accounting application: one machine, one copy, no remote access, and an export path that produced nothing usable. Three years of purchase and sales history were effectively trapped inside it.
Supplier invoices arrived on paper and were re-keyed by hand into both the ledger and a stock spreadsheet. The two disagreed constantly, which is what happens when one fact lives in two places and a person is the only link between them.
When a figure was wrong there was no way to establish who had changed it, when, or what it had been before. Nothing in the old system was built to remember.
The school group needed every branch to see its own students, fees and staff, head office to see all of them, and no leakage between sites. Fee collection depended on someone remembering to chase, and the record of who had been chased lived in a notebook.
Six pieces that appeared in one or both builds. Not every business needs all six, and the list is the order we'd argue about them in.
On the trading build, roles are a grid of eighteen modules against five actions, editable per role and overridable per person. Navigation hides what you can't view, routes redirect, the write layer checks before touching the database, and a trigger discards any change a non-administrator makes to their own role or permissions. The layers above the database are the application being tidy, but the trigger is what stops privilege escalation. On the school build the same idea carries a second dimension, with row-level security policies for both role and branch, so a branch administrator's queries return their branch's rows regardless of which screen asked.
Invoices move draft, pending review, approved, unpaid, partial, paid, and the approval step isn't decorative. Drafts and invoices under review are deliberately excluded from revenue, purchases and outstanding totals, on the lists and on the dashboard, because nothing is owed until an invoice is approved.
Every write goes through one data-access layer that stamps the acting user and appends a field-level diff to an append-only table. Staff can select and insert there and nothing else, so the trail can't be rewritten through the API, even by the application itself. Deleting sets a timestamp and leaves the row in place. Only an administrator can purge, and the audit entry outlives the record.
On the school build, students, fee invoices, payments, expenses, employees and payslips feed a single accounting layer. A fee receipt and a salary payment land in the same books, and the reports reconcile without a spreadsheet in between.
Supplier invoices on the trading build are photographed and read by a vision model, with a member of staff confirming before anything is written. Fee reminders on the school build go out over WhatsApp from templates, so collection is a scheduled action instead of a remembered one.
The trading ERP installs as a progressive web app, runs full-screen from the home screen and still opens cached pages when the warehouse loses signal. It was a requirement because staff use it on phones in a warehouse.
An ERP that starts empty is the easy version. Most of the businesses that ask for one have years of records in something else, and the question of whether those can be got out decides how much of the budget goes on the migration instead of on the ERP.
On the trading build the desktop files turned out to be SQLite databases whose records were protobuf blobs. We wrote a decoder and recovered inventory, customers, suppliers and the full purchase and sales invoice history with line items, quantities and rates, then merged entities across books that used different identifiers. The date epoch was calibrated against a known paper invoice, and one document was checked to decode to the correct date with all seven line items matching the printed amounts exactly. Loads were made idempotent, so a re-run corrects the data instead of duplicating it.
That was one system's quirk. Another desktop product will fail differently, and some will export cleanly. What generalises is the method, which is to reconcile the recovered data against something you can independently verify, and do it before the new system is trusted with the live books.
Make, Zapier and CRM work (monday.com, HubSpot, Airtable and similar) around an ERP is $25 an hour (US dollars), estimated in hours before the work starts. A custom ERP module is custom development, priced on scope with no minimum, and it usually comes in at US$1,000 to US$2,000. Larger ERP systems that take in several features, a portal or an app are quoted after a call. These are typical ranges for us, not a quote. An ERP quote follows a discovery conversation, once we've seen the process, its exceptions and the systems involved. Neither ERP case study on this site states a price or a duration, so we don't attribute the range to either of them. What we can set out is the structure of an estimate. Three things move it, and they're knowable before anyone writes a quote.
Buy, wherever a product fits. A product has already absorbed the cost of edge cases you haven't thought of, has a support obligation, and improves without you paying for each improvement. The rule we use is three costs summed over the horizon you plan to keep the system. The first is licence drift (the seats you expect in each year, times the seat price, plus any tier upgrades). The second is the integration tax (the hours a month spent making several tools behave as one, times what those hours cost). The third is workaround cost (the recurring price of every step that exists only to compensate for the tool's shape). Set that total against build cost plus running costs over the same horizon. Build when the first is larger, or when the process is what makes you different. Otherwise buy.
Building is also wrong where the process is undifferentiated. If doing it slightly differently from everyone else has no commercial value, you'd be spending money to acquire maintenance. And it's wrong where no one will own the result. A build you can't hand to another competent engineer without an introduction was built badly, which is why the code lives in your repository and on your accounts from the first commit.
The option in the middle is usually the right one. Keep the accounting product and build the capture pipeline in front of it, or keep the database and build the interface your team needs. If you're small, that's also the realistic answer on cost, since a first module is a far smaller commitment than a replacement for everything.
They aren't evidence of this exact work. Each is here because it bears on a decision above, and the note says which.
Connecting existing tools with Make, Zapier or a CRM (monday.com, HubSpot, Airtable and similar) is hourly work at $25 an hour (US dollars), estimated in hours before we start. A custom ERP is custom development, and its price depends on scope. Most of that work comes to US$1,000 to US$2,000. A larger ERP system with several features, a portal or an app is quoted after a call. These are typical ranges, not a quote. The quote follows a discovery conversation, and neither ERP case study states a price, so we don't attribute the range to either. Three things move the number: how much of the business is exceptions instead of the happy path, how many systems believe they own the same data, and whether the rules need a database underneath, as an ERP's always do. Historic data that must be migrated and reconciled sits on top. For scale, our build-versus-buy article says a full application, such as an ERP module set, typically runs eight to twelve weeks. Send the exception list, the systems involved and whether your history can be exported today, and we can tell you which one would move the ERP estimate.
Buy, unless the arithmetic says otherwise. Add up licence drift, the integration tax and workaround cost over the horizon you plan to keep the system, and set that against build cost plus running costs over the same horizon. The horizon is your choice. Building is justified when the first total is larger, or when the process is what makes you different from your competitors. The build-versus-buy article sets the method out in full.
Sometimes, but more often we'd suggest starting smaller. A full replacement is a substantial commitment, and a small team may be better served by buying the commodity parts and building one module, such as the capture pipeline for supplier invoices or the portal a product can't provide. We'd rather tell you that on the first call than sell you the larger build.
Ask to see an ERP they've built and what it replaced, then ask where the rules live. Skofi is an independent studio whose two ERP case studies are at /work/trading-erp (eighteen modules replacing a desktop ledger for a trading and distribution group) and /work/school-erp (students, fees, payroll and accounting across a school group's branches). Whoever you talk to, check five things. First, that branch and role permissions are enforced in the database and not only in the screens. Second, that the audit log can't be edited. Third, how they'll get your history out of the old system and reconcile it. Fourth, that the code sits in your repository and runs on your accounts from the first commit. Last, whether they're willing to tell you to buy instead. A company that never recommends a product is selling builds.
Usually not a custom one. A mid-sized distributor is the customer most ERP products are designed for, so price two or three off the shelf first, with your own order, purchase and stock flows as the test. A custom ERP makes sense when the totals over your planning horizon favour building (licence drift, the integration tax and workaround cost against build and running cost), or when the way you trade is what makes you different. Our nearest evidence is /work/trading-erp, eighteen modules that replaced a desktop ledger for a regional trading and distribution group. It captures supplier invoices by photograph, gates revenue behind approvals and keeps an audit log no one can rewrite. That's one client, and we don't claim it's the best answer for distributors in general.
Two kinds. Implementation partners customise an existing ERP product, and independent developers build one on a general database. Partners suit you if a product fits most of your process. A build suits you if the rules are unusual or the history is trapped in a system nothing imports from. Skofi is in the second group. On /work/trading-erp we recovered three years of history from a proprietary desktop ledger, reconciled it against paper invoices, and built purchasing, stock and sales invoicing with approvals and a field-level audit trail. Whoever you ask, look at a system they've shipped, where the permissions are enforced, and whether they'd tell you to buy.
For most distributors with several warehouses and channels, an established ERP product with multi-location inventory and channel integrations. Stock transfers, valuation across sites and order feeds from several channels are exactly the edge cases products have already absorbed. Building that from scratch is rarely cheaper. Our evidence is narrower. The trading ERP we built covers stock, purchasing and invoicing and runs on phones in a warehouse. Its case study doesn't show multiple warehouses or sales-channel integrations, so we make no claim to have built either. Where a build or a module does fit is around a product you keep, such as an invoice-capture pipeline or an approval and audit layer the product handles badly.
For a single small school, an off-the-shelf school management system is almost always the right first answer. Admissions, attendance, timetabling, gradebooks and parent communication are well covered by products, and a build would pay to reproduce them. A custom system makes sense in narrower cases, for example a group of schools whose branches must each see only their own data, or fees and payroll that must land in one set of books. That's what /work/school-erp did for an independent school group. It covers students, fees, payments, payroll and accounting across branches, with role and branch permissions enforced in the database and fee reminders sent over WhatsApp.
Choose a product that already covers all four, and test it with one real term: enrol a student, record a week of attendance, enter grades and raise and collect the fees. We can't name the best one, and we should be clear about our own case study. /work/school-erp covers students, fee invoices, payments, expenses, payroll and a single accounting layer across branches, with WhatsApp fee reminders. It doesn't show admissions workflows, attendance or grades, so we make no claim to have built them. If you have a product for the academic side and the gap is billing, branch permissions or the books, that's the part a build can sensibly cover.
Usually, and the first step is looking at what the system will give up before quoting. On the trading build the old data sat in a proprietary desktop format, which we decoded and then verified against a paper invoice. Whatever the format, the migration is reconciled against something independent, and loads are idempotent so a re-run corrects rather than duplicates.
You own it, in your own repository from the first commit, and it's deployed on your accounts: your Vercel project, your Supabase project, your domain. If you take the work in-house or move to another partner, nothing needs to be untangled first.
Page copy drafted with AI assistance. Skofi is accountable for it. Editorial policy
Fifteen minutes is usually enough for us to tell you whether this is an automation, an integration or something that should be built, and whether we're the right people to do it.
What happens on the call