Skip to content

0039: Company-owned configuration ​

Note 2026-11-06: the git host and CI moved to GitHub (FEAW-Serv/getmy-books), ADR 0046. References below to the previous host are history; ADR 0046 says what replaces them.

Context ​

Get My Books Ltd is to own GetMy Books and sell it as a software licence. The code and the running service still named the people and the first two companies they were built for:

  • src/deadlines/company-profiles.ts held FEAW's and WealthTechPros' company numbers, VAT quarters and payroll, so no other company could use the deadline radar, the confirmation statement check or the VAT steps.
  • Tool and prompt examples said "FEAW" and "WealthTechPros"; one reply said recodings were "for the owner (and Rob)".
  • Production required OWNER_EMAIL, a person's email, though the web app acts only as the person Cloudflare Access signed in.
  • The operator scripts acted for OWNER_EMAIL from Doppler.
  • The docs site linked into the code at one fixed address, set in the build script.

A buyer's due diligence asks what is configuration and what depends on a person, and how each is handed over.

Decision ​

  1. Each company's profile is data (SPEC-015). entity_profile (migration 0015, row-level security like every company table) holds the company number, VAT quarter months, payroll and year end. The owner sets it with company_profile_set. The migration gives FEAW and WealthTechPros their profiles once, by name; it never overwrites one and skips a name two companies share.
  2. Examples are generic: "Acme Ltd" in tool and prompt descriptions; no person is named in what the tools say.
  3. Production names no person. OWNER_EMAIL is removed from infra/nas/docker-compose.yml and from the deploy's env allowlist (scripts/deploy-nas.sh, tests/infra/deploy-nas-env.test.ts). Who may sign in is the Cloudflare Access allowlist, and what they may see is their entity_access grants. Until the root-owned copy at /usr/local/etc/getmy-books/docker-compose.yml is reinstalled from the repo (ADR 0023), it still requires OWNER_EMAIL, so the deploy sends it as an optional name while Doppler prd holds it; it leaves the list once the installed copy matches. (Done 2026-10-09: the installed copy was reinstalled from the repo and the deploy no longer sends OWNER_EMAIL.)
  4. Operator scripts name who they act for when they are run: OPERATOR_EMAIL (scripts/lib/operator-email.ts), refused with a clear message when unset. They no longer read OWNER_EMAIL.
  5. The repository address is configuration: REPO_URL for the docs build, defaulting to https://github.com/FEAW-Serv/getmy-books. Links use GitHub's /blob/main/ and /raw/main/ paths.

What stays tied to people or to FEAW ​

AssetHeld by todayTransfer step
Xero app (client id and secret)Rob's Xero developer loginRegister the app under a Get My Books Ltd developer login (or transfer it, if Xero allows), put the new client id and secret in Doppler prd, and reconnect each company's Xero
Cloudflare (team feaw: Access, tunnel, Pages, getmy.group DNS)The feaw teamMove the zone and Access application to a Get My Books Ltd account, or make that company the team's owner; new CF_ACCESS_TEAM_DOMAIN, CF_ACCESS_AUD and tunnel token in Doppler
Entra ID tenant getmy.group (Access sign-in, MFA)As configuredConfirm the tenant's owner is Get My Books Ltd; nothing in the code changes
GitHub (FEAW-Serv/getmy-books)Held by the FEAW organisationTransfer or mirror the repository; set REPO_URL for the docs build and the repository address in the pipeline
NAS (production host, deploy user, backups)Personally held hardwareMove the deploy (ADR 0019, 0023) to a host the company owns; restore from backup there
Doppler (project getmy-books)Personally held workspaceMove the project to a company workspace, or recreate it and copy each secret
Local MCP server (src/mcp/stdio.ts)Reads OWNER_EMAIL from Doppler dev: the person running it on their own machineNothing: each developer sets their own
Migration 0005Names fraser.duncan@feaw.co.uk and rob.duncan@feaw.co.uk, granted FEAWMigrations are append-only and re-applied (ADR 0014, 0029), so it stays. A later migration may remove those grants if the buyer asks; the Access allowlist decides who can sign in at all
Migration 0015Seeds FEAW's and WealthTechPros' profiles by nameHarmless elsewhere: it only acts on entities with those names, once each, and never overwrites a profile
Companies House API key, ntfy alert topicRegistered by a personRegister new ones for the company and update Doppler

Consequences ​

  • A new company works end to end once its owner has a sign-in, an entity_access grant and a profile: no code change.
  • Running an operator script now needs OPERATOR_EMAIL=… on the command line; Doppler dev no longer needs OWNER_EMAIL for the scripts (the local MCP server still reads it).
  • Prose docs that still mention OWNER_EMAIL for the scripts, or FEAW as configuration, are updated on their next edit; this ADR is the record.