// blog

We Moved a 2006 Delphi Program to the Web, Rules and Data Included

We converted Virtual Salesman 3, a Delphi 7 program from 2006 for quotations, orders, invoices and inventory, into a web app on React, C# and PostgreSQL. We wrote its rules down in plain words, recovered its scrambled file format from the program itself, and re-created its arithmetic so the author’s sample documents match to the bit. On the way we found and fixed a bug that could overwrite a saved document. You can try the web version and read the full case study.

Last updated 2 min read

Plenty of businesses still run on a Windows program someone wrote fifteen or twenty years ago. It does the quotes, the invoices and the stock, and it works, until the PC it lives on dies or the person who wrote it has retired.

We wanted to show what moving one of those programs to the web really involves, on a real program rather than one we made up. Virtual Salesman 3 is a good example: a Delphi program for quotations, orders, invoices and inventory, written by Marc-André Lamothe between 1998 and 2006 and published as open source in 2016.

Try the web version → It opens on a fictional furniture dealer with a year of sales. Your copy is yours alone.

What we did

  1. Wrote the rules down in plain words. They weren’t in one place: the totals were in one unit, the deposit rules in a form’s button handlers, the stock check in a product picker. A document only moves forward, from quotation to order to invoice. A quotation takes no deposit. An order needs at least the company’s deposit percentage. Saving an invoice takes its products out of stock.
  2. Got the data out. The program keeps every company, inventory and document in a scrambled binary file, and the code that reads them isn’t in the published source. We recovered the format from the program itself. All 9 sample files decode with not one byte left over, and the web version imports them.
  3. Proved the math. The old program kept money as 32-bit floating point. We re-created its arithmetic and recomputed the author’s four sample documents: all four give exactly the bits the program saved.
  4. Decided what to fix. The program could give two documents the same number and silently replace the first. It kept whole card numbers in its files. Those are fixed. Two odd deposit rules and stock that can go below zero are kept as they were, and written down for an owner to decide.
  5. Built it on a standard stack: React and TypeScript screens, a C# API and PostgreSQL. The same five sections in the same order, the same shortcuts, plus a dashboard, an activity log and a print page.

The whole conversion took about an hour, start to finish, with an AI coding assistant doing the work and the decisions made by a person.

Read the details

The case study has every step: the list of rules, the code that reads the old files, the re-created arithmetic, the table of what was fixed and what was kept, the test run and the clock.

If your business runs on an old desktop program, see how we move one to the web or tell us about it. The first call is free.