← Back to all posts

From hand-coded PHP to one conversation: a freight company's back office, rebuilt on Kreova

From hand-coded PHP to one conversation: a freight company's back office, rebuilt on Kreova

A few years ago I built a back-office system for a small freight forwarder and customs broker in Trinidad and Tobago. Plain PHP, MySQL, a PDF library, a mail library, and a lot of evenings. It tracked shipments from booking to delivery, produced quotations and invoices, recorded payments and emailed customers.

It worked, but every new idea was a quote the business couldn't afford. "Email the customer when an invoice goes overdue" stayed on the wish list for years.

So we gave Kreova the whole thing: one detailed description of what the system does, written in plain English. Here's what came back.

One brief, a complete business app

The description covered staff roles, customers, shipments, quotations, invoices, payments, vendor costs, reports, settings and an activity log. Kreova asked nothing it didn't need to and started building. About two and a half hours later the app was finished:

  • Customers: search, add and edit, deactivate without losing history, and import from a Zoho CSV export
  • Shipments: every field a bill of lading needs, a 17-step status list from Booked to Delivered, and a full history of who changed what
  • Documents: upload bills of lading, commercial invoices and delivery orders against each shipment
  • Quotations and invoices: numbered automatically, line items with ports of loading and discharge, tax, totals and balances, and one click to convert an accepted quotation into an invoice
  • Payments: partial or full, with the invoice status updating itself
  • Vendor costs: tied to shipments, with profit and margin per shipment
  • Reports: invoices, vendor costs and profitability, with CSV exports and printable monthly packs
  • Settings, staff management and an activity log that records every sign-in, status change, payment and email

About twenty-five pages, all in the company's own look.

Three roles, enforced by the database

The business has three kinds of staff. Admins do everything. Accountants see everything but change nothing. Shipment staff see only shipments, and can change only a shipment's status.

Kreova didn't just hide buttons. It wrote access rules into the database itself, then tested them, signing in as each kind of user and trying what they should and shouldn't be able to do. The final check covered 28 cases across an admin, an accountant, shipment staff and a stranger, including:

only admin can change someone else's role | admin: allow | accountant: deny | shipment_staff: deny | stranger: deny

Then it deleted its test accounts and test data on its own.

Documents that go out as documents

A freight forwarder lives on paperwork. Invoices, quotations, receipts and pre-alert notices go to customers every day, and the old system attached each one as a PDF.

On Kreova, each document gets its own printable page, laid out for A4. When the email goes out, Kreova prints that page at that moment and attaches it, named after the document (INV-000001.pdf, or Pre-Alert- plus the bill of lading number). The customer always gets the current figures, and the email itself stays short.

Copying the customs broker

Most customers work with a customs broker who needs the same paperwork. When staff tick "CC the broker" on a shipment update, an invoice, a quotation or a pre-alert, the broker gets a copy of the same email. If the customer has no broker on file, it simply goes to the customer.

Emails that go out once, at the moment something happens

An invoice email should arrive when the invoice is sent, not every time someone fixes a typo on it afterwards. Kreova's notifications fire on the change itself: the invoice email goes out when its status changes to Sent, and never again from later edits.

Receipts work the same way. Here's how Kreova explained the receipt emails it set up:

Recording a new payment -> inserts a row -> fires the receipt email. Pressing "Resend receipt" -> updates resend_requested_at -> fires the receipt email. Any other future edit to a payment row (correcting a reference number, fixing a note, etc.) -> updates the row but leaves resend_requested_at untouched -> no email goes out.

There's also a bulk "Resend all receipts" with a pass/fail report for every invoice.

Work that happens on its own

Every morning, a schedule marks unpaid invoices past their due date as Overdue, and quotations past their valid-until date as Expired. Nobody has to remember to check.

And now the wish list is one sentence away

That overdue email that sat on the wish list for years? I asked about it in the chat, and Kreova answered:

There's a schedule that runs daily and flips any unpaid invoice past its due date to "Overdue" status automatically [...] if you want a customer email to go out automatically the moment an invoice becomes overdue, that's a small addition: I'd have it fire only on that specific transition to "Overdue" so it sends once and won't repeat every day the invoice stays overdue.

It also offered a weekly digest: every Monday, the invoices due that week, with totals.

That's the real difference. The business no longer has to decide whether a feature is worth a developer's time. It asks for it.

What the old system took, and what this took

The PHP version took weeks of evenings, and every change after that was another quote. The Kreova version took one afternoon of conversation, a few rounds of "make this darker" and "move that", and it keeps growing whenever someone on the team has an idea.

If you're running a business on a system someone built for you years ago, describe what it does, and let Kreova build it back, with the features you never got around to.