Munchable is one of five apps from the same publisher, and each lives in its own repository with its own domain. They share no code package. What they share is a single file, copied into all five, that says who publishes what.

You can see its output on the about page, under the heading "Also from the same maker". That section, the company line beneath it and the structured data in the page source all come from that one file.

Why a copied file and not a package

Five repositories, five deploys, and one small file. A shared package would mean publishing, versioning and updating it in five places for the sake of about a hundred lines that change a few times a year. So the header comment says the quiet part out loud: the data is identical in every repository except one constant, and "diff this file against the other repositories before changing it, and change all five in the same sitting."

That is a legitimate trade. It only works because the agreement is the point. Every site emits the same company identifier and the same list of apps, and that consistency is what tells a crawler the domains share a publisher rather than being five unrelated sites that happen to link to each other.

as const satisfies, not an annotation

The list of apps is declared like this:

export const APPS = [ { key: 'cogniprep', name: 'CogniPrep', url: 'https://cogniprep.app', /* ... */ }, { key: 'munchable', name: 'Munchable', url: 'https://munchable.app', /* ... */ }, /* three more */ ] as const satisfies readonly FamilyApp[]; 

The obvious alternative is export const APPS: readonly FamilyApp[] = [...]. The annotation checks the shape, but it also widens every key from a literal like 'munchable' to plain string. as const satisfies checks the shape and keeps the literals. That one difference pays for the next part.

The one line that differs

type AppKey = (typeof APPS)[number]['key']; export const SELF: AppKey = 'munchable'; export const SELF_APP: FamilyApp = APPS.find((app) => app.key === SELF)!; export const SIBLING_APPS = APPS.filter((app) => app.key !== SELF); 

SELF is the only line that differs between the five copies, and it is typed against the keys that actually exist. When the file is pasted into another repository and someone edits SELF, a misspelling is a compile error. With the widened annotation it would compile cleanly, find would return undefined, and the site would list itself as its own sibling or crash on the non-null assertion. The type turns the likeliest copy and paste mistake into something the editor underlines.

Derive what can be derived

Each app has a url, and the structured data needs an identifier for it. The identifier is not written out:

export function organizationIdFor(app: { url: string }): string { return `${app.url}/#organization`; } 

The comment on the id fields makes the reason explicit: identifiers, not links, so nothing needs to be kept in step with a page. A second copy of a url is a second place to be wrong. Derived values cannot disagree with their source.

The same idea turns the count into a word. The intro on the about page says "Five apps come from the same maker", and the five comes from APPS.length through a small lookup, so adding a sixth app changes the sentence without anyone remembering to edit it. A numeral that small reads as a typo in prose, so it is spelled out. The company line underneath lowercases it for the middle of a sentence.

The structured data is only safe because the sentence is true

The file also builds the machine readable half:

export function appRelationsLd() { return { parentOrganization: { '@type': 'Organization', '@id': PUBLISHER.id, name: PUBLISHER.name, }, }; } 

It uses parentOrganization rather than sameAs. sameAs would claim the apps are the same entity. They are separate products of one company. The visible note on the page says the same thing to a person, and the comment on that constant states the rule: the structured data is only safe to emit because the sentence a human reads says the same thing. Markup that contradicts the page is the kind of thing that earns a manual action.

The intro copy is honest in a way worth copying. It says the apps look unrelated "because they are", that a pub quiz and a food scanner share no audience, and that what they have in common is how they are built. A family page that pretended otherwise would be selling.

What to take from it

  • If you must copy a file between repositories, shrink the differences to one line and type that line.
  • Prefer as const satisfies to an annotation when you want both the check and the literals.
  • Derive identifiers, counts and labels from the data you already have.
  • Write the reason for the duplication at the top of the file, so a future you does not "fix" it into a package.