On this page9
  1. At a glance
  2. The decision
  3. The rule
  4. One fact, one column
  5. The code measures itself
  6. Menus, pages and articles
  7. What it took to keep this honest
  8. Why this matters to a business
  9. Need an engineer who designs for change?

Part of the TFI PHP App. By Mohammad Javad Dastouri, full-stack and AI engineer.

One codebase serves more than 22 websites, and none of them needs its own version of the code. That works because the code holds no words, links, menus or colours of its own.

At a glance

Interface texts in the database
10,366
Database tables
279
Icons in the site's own set
113
JSON or blob columns
None, measured on the database
Hard-coded addresses
None, by rule
Interface texts in the database
10,366
Database tables
279
Icons in the site's own set
113
JSON or blob columns
None, measured on the database
Hard-coded addresses
None, by rule

The decision

Context
One codebase has to serve many companies, each with its own words, menus and colours.
Decision
Every fact lives in a typed database column.
Not chosen
JSON columns and settings blobs. They are faster to add, and hard to check, search or translate field by field.
Cost
279 tables, and every new fact needs a database change before any code can read it.
Result
One codebase serves more than 22 websites, and 10,366 interface texts can be changed on screen.
Context
One codebase has to serve many companies, each with its own words, menus and colours.
Decision
Every fact lives in a typed database column.
Not chosen
JSON columns and settings blobs. They are faster to add, and hard to check, search or translate field by field.
Cost
279 tables, and every new fact needs a database change before any code can read it.
Result
One codebase serves more than 22 websites, and 10,366 interface texts can be changed on screen.

The rule

Every word, link, menu, colour, setting and fact comes from the database. A site owner changes them on screen. Code changes only when the product itself changes.

Even the words on an admin button are rows. A site can reword its own interface in Admin, and an update will never overwrite that, because updates only add the words that are missing.

One fact, one column

The database uses typed columns only. There is no JSON and no blob. A price, a date and a phone number each have their own place, so they can be checked, searched and translated.

This costs more work at the start and pays back on every report and every search result. Structured data for Google is built from these same rows, so what search engines read matches what visitors see.

The code measures itself

The app does not assume where it lives. It measures its folder, its PHP version and its address at run time. Links in the database are stored relative to the site, so moving a site to a new address is one command.

Menus, pages and articles

  • Menus

    Phone, desktop and footer menus are separate lists, with limits so a menu stays usable: 5 items on a phone, 7 on a desktop.

  • Home page

    Sections are rows. Each can show on phone, on desktop, or on both.

  • Articles

    Blocks are the source of truth. Each is cleaned when saved and cleaned again when shown.

  • Menus

    Phone, desktop and footer menus are separate lists, with limits so a menu stays usable: 5 items on a phone, 7 on a desktop.

  • Home page

    Sections are rows. Each can show on phone, on desktop, or on both.

  • Articles

    Blocks are the source of truth. Each is cleaned when saved and cleaned again when shown.

What it took to keep this honest

A rule like this decays the moment someone is in a hurry. So it is enforced by machine: automatic checks refuse hard-coded addresses and refuse CSS outside the design system.

A new column must exist before any code reads it. That rule came from a real failure, described on the releases page.

Why this matters to a business

A marketing person can change a headline, add a language or rebuild a menu without a developer and without a deployment. The change stays in place through every update.

Need an engineer who designs for change?

Tell me about the role, or see how the same system is secured.

Section
Web platforms and migration
Updated
November 9, 2026
Reading time
3 min read

Hiring for this kind of work?

Tell me about the role and I will reply by email.

Discuss a role with me