← Platform Foundation

FEAT-DECLARATIVE-TENANT-CONFIGURATION

Declarative Customer Configuration

Customer organisations, practitioners, modules, and enrollment keys are defined in a git repository the platform reads from. Onboarding a new customer organisation is a reviewed, merged, auditable change — not a click-path through an admin UI nobody trusts. The git history is the configuration audit trail.

Why this matters

A SaaS vendor onboarding a hospital cannot answer "what exactly is configured for us, and how do we know?" with screenshots of an admin panel. Hospital compliance teams expect to review what the vendor is setting up before it goes live, and to see every change made afterwards — preferably in a form their own technical team can read directly.

Configuration through an admin UI alone has predictable failure modes: operators forget what they changed, manual setups drift between sites, and there is no peer review. In a regulated environment, "the configuration was right at some point" is not enough — the question is "who changed it, when, and why".

A git repository solves both at once: change goes through review like code, history is immutable, and the customer can audit their own configuration without depending on the vendor for a report. That same artefact is also what protects the customer if everything else is lost — a recovery anchor, not just a record.

What's in the box

  • Git as the source of truth. Customer configuration — modules, practitioners, enrollment keys, integration bindings — lives as text in a git repository. The platform reads from it on startup and reconciles on change. There is no separate internal configuration store.

  • Customer-owned repository. The repository typically lives on the customer's own GitHub (or equivalent) under their organisation. The platform connects with a read/write token the customer issues and can revoke at any time. Configuration sovereignty stays with the customer.

  • FHIR as the configuration format. Practitioners, organisations, locations, healthcare services, and schedules are stored as FHIR resources in the repo — the same shape they take in the runtime data store. The customer's setup work produces a standard FHIR description of their hospital, reusable beyond this platform.

  • Changes in a draft of one's own. A person changes the configuration on the platform's pages — its organisation, its people, its connections — into a draft of their own, reviews every record it changes and applies it whole. Nothing the customer organisation runs on changes before that, and a draft keeps up with what others applied meanwhile, showing where the two meet.

  • People and what their roles may do are configuration. Who works where, as what, and what each role permits are records in the repository like the rest, each person's files named by a neutral key rather than anything that identifies them. A person closed there can no longer sign in; a role nobody describes permits nothing.

  • Two pathways, one history. Routine changes go through the platform's pages and their drafts, which commit them to git. Larger or higher-risk changes are drafted as pull requests against a staging branch, validated against a staging deployment, then merged. Both end up in the same history; no path bypasses it.

  • Idempotent reconciliation. Re-running the platform against the repo converges to the repo's state. There is no separate "apply" step that could drift. The same property makes the repo a rebuild source: a freshly-deployed platform pointed at the repo restores the customer's operational configuration without any vendor-side state. For a jurisdiction's shared configuration — its vocabularies and profiles — applying is the store's own recorded act: the platform declares the set, and what was applied and what could not be is answered by the store, not by a log.

  • Branch-per-environment. Production, staging, and zone-specific deployments each follow their own branch. Promoting a change from staging to production is a merge — exactly the change the customer reviewed and tested is what reaches production.

  • Rollback by revert. A change that turned out wrong is rolled back like any code change: revert the merge, the platform reconciles. The rollback itself appears in the history as a commit anyone can read.

  • Secrets sealed in git. A secret the configuration needs — a connection's password, a person's sign-in — is kept in the repository sealed, openable only with the customer organisation's own key and its owner's, and never shown by the platform once taken. A leaked repo never leaks a live credential. A person's own password or PIN is committed apart from everybody's drafts, by the platform, saying only that personal data was updated.

  • Recovery anchor. If runtime state, backups, and cloud infrastructure were all lost, the git repo alone is enough to bring the platform back into a known operational shape. The repo is the last resort for the system, not for patient records.

Practices we follow

  • GitOps. Configuration as code, declarative reconciliation, pull-request review, audit through commit history. Standard cloud-native practice applied to customer organisation setup.
  • HL7 FHIR Conformance resources — Practitioner, Organization, Location, service entries, Schedule. The same resources used for clinical reference are used for platform configuration.
  • ISO/IEC 27001 change control. Reviewed change with full audit trail of who, what, when, why — git satisfies the standard's expectation directly.

What customers and operators experience

  • A hospital onboarding sees its customer organisation configuration assembled as a git change — reviewed by the vendor's operations team, shared with the customer's compliance officer for sign-off, then merged.
  • A compliance officer can clone the configuration repository and read, in plain text, exactly what is configured. No admin-UI access required for compliance questions.
  • A customer's IT team sees the history of every change — who made it, when, and the diff. Disputes resolve to a commit.
  • A vendor operator drafting a substantial change opens a pull request, gets review, merges. Routine changes go through the admin UI and still commit back to git.
  • A non-trivial change is drafted in staging, tested in a staging environment that mirrors production, then merged. Configuration mistakes are caught before reaching the running ward.
  • A change that turned out wrong is rolled back the same way any code change is — a git revert, a reconciliation, and the rollback itself a commit in the history.
  • A CIO planning for worst-case can answer "what if everything else is lost?" with: as long as the configuration repo survives, the operational shell of the hospital is rebuildable.
  • A regulator sees configuration as code with full version history — the same evidence model they already trust for software systems.

Limits and trade-offs

  • Git is the source of truth, full stop. No shadow store inside the platform; the canonical answer is always the repo. The admin UI is a way to write to git, not a way around it.
  • Customers without git skills need vendor support. A small hospital without a technical team will rely on the vendor to draft and review changes — the value is real but the access is not free.
  • Staging discipline is required. The promotion model only protects production if changes are actually tested in staging. Emergency hot-fixes are flagged in audit; routine reliance erodes the workflow.
  • Live operational state is not in the repo. Sessions, device liveness, queue depths belong in monitoring. The repo describes intent, not instantaneous state.
  • Repo continuity is a customer responsibility when they own the repo. Backups, access control, and recovery sit with whoever owns it.
  • Repo-based recovery is operational shell only. The shape of the system, not its clinical data. Clinical recovery still depends on data backups.
What it rests on
0 / 21 passing 19 without a result yet
  • cited, no result A change made on a configuration page goes into the person's own draft and changes nothing the tenant runs on until it is applied. REQ-CFG-CHANGES-IN-A-PERSONS-DRAFT
    Cited by: cloud.jengu.platform.configuration.APersonsDraftFollowsMainUntilItIsAppliedTest#aDraftIsMadeAtTheFirstSaveAndChangesNothingAnyoneElseSees, cloud.jengu.platform.configuration.APersonsDraftFollowsMainUntilItIsAppliedTest#aMergeIsNotLandedWhereMainMovedSince, cloud.jengu.platform.configuration.APersonsDraftFollowsMainUntilItIsAppliedTest#aPageWritesOnlyRecordsInTheOpen, cloud.jengu.platform.configuration.APersonsDraftFollowsMainUntilItIsAppliedTest#aRecordAPageWritesReadsAsAPersonWritesJson, cloud.jengu.platform.configuration.APersonsDraftFollowsMainUntilItIsAppliedTest#applyingMergesTheWholeDraftByItsPersonThenMainMovesAndTheDraftIsGone
  • cited, no result A person's draft shows the configuration as it now is with their changes over it: a change made since to the configuration in force is followed, and one touching what they changed is shown as a conflict for them to settle. REQ-CFG-DRAFT-FOLLOWS-MAIN
    Cited by: cloud.jengu.platform.configuration.APersonsDraftFollowsMainUntilItIsAppliedTest#aDraftThatComesBackToMainIsGone, cloud.jengu.platform.configuration.APersonsDraftFollowsMainUntilItIsAppliedTest#aRecordAddedTwiceUnderTwoFilesIsAConflictGitCannotSee, cloud.jengu.platform.configuration.APersonsDraftFollowsMainUntilItIsAppliedTest#aRowChangedOnBothSidesIsAConflictAndSavingWaitsForItToBeSettled, cloud.jengu.platform.configuration.APersonsDraftFollowsMainUntilItIsAppliedTest#savingAfterMainMovedReplaysTheDraftsSavesOntoIt, cloud.jengu.platform.configuration.APersonsDraftFollowsMainUntilItIsAppliedTest#takingMainsVersionLeavesTheDraftWithoutThatChange, cloud.jengu.platform.configuration.APersonsDraftFollowsMainUntilItIsAppliedTest#whatReachesMainShowsInTheDraftWithoutAnythingWritten
  • cited, no result A draft is applied whole, after a review listing every change it makes by its kind and name, in the reader's language, with whether it can be applied. REQ-CFG-DRAFT-REVIEWED-WHOLE
    Cited by: cloud.jengu.platform.configuration.ADraftIsReviewedWholeBeforeItIsAppliedTest#aConfigurationFormSavesToTheDraftOrSavesAndApplies, cloud.jengu.platform.configuration.ADraftIsReviewedWholeBeforeItIsAppliedTest#aKindByIdentifierOwnsItsRecordsAndNamesTheirFiles, cloud.jengu.platform.configuration.ADraftIsReviewedWholeBeforeItIsAppliedTest#theIndicatorSaysHowTheDraftStands, cloud.jengu.platform.configuration.ADraftIsReviewedWholeBeforeItIsAppliedTest#theWholeDraftIsShownRowByRowInEveryLanguage, cloud.jengu.platform.configuration.ARecordIsReadAsAPersonReadsItTest#aRecordIsNamedByTheMostSensibleThingItHas, cloud.jengu.platform.configuration.ARecordIsReadAsAPersonReadsItTest#aRecordIsShownAsYamlItsTypeFirstAndItsKeysSorted, cloud.jengu.platform.configuration.ARecordIsReadAsAPersonReadsItTest#twoVersionsAreComparedLineByLine
  • cited, no result A secret a configuration page takes is kept sealed, and every view of it, the review included, names it without its value. REQ-CFG-SECRETS-SEALED-NEVER-SHOWN
    Cited by: cloud.jengu.platform.configuration.ARecordIsReadAsAPersonReadsItTest#aSealedFileIsShownByItsNamesNeverItsValues
  • cited, no result A customer's configuration is kept with its own data: its people reach it with their own tools where its authority lets them, and what they change there is what its pages show and change next. REQ-CFG-THE-STORE-KEEPS-THE-REPOSITORY
    Cited by: cloud.jengu.platform.configuration.TheConfigurationPageShowsWhatIsAppliedTest#whereTheStoreServesTheRepositoryIsDrawnInEveryLanguageAndNothingOfARemote, cloud.jengu.platform.configuration.TheStoreKeepsTheConfigurationRepositoryTest#aCommitMadeOnAMainTheStoreHasMovedPastIsRefusedAndNothingMoves, cloud.jengu.platform.configuration.TheStoreKeepsTheConfigurationRepositoryTest#aFolderMeetingAnEmptyStorePushesItsMainIn, cloud.jengu.platform.configuration.TheStoreKeepsTheConfigurationRepositoryTest#whatSomebodyPushedWithTheirOwnGitIsWhatTheFolderHoldsNext
  • cited, no result A customer's configuration is laid out in the sections its kind of organisation declares, each counted; anything outside them is named as the customer's own, and applied all the same. REQ-CFG-SECTIONS-BY-KIND
    Cited by: cloud.jengu.platform.configuration.ATenantsConfigurationIsLaidOutByItsKindTest#aProvidersSectionsAreCountedAndWhatLiesElsewhereIsSaid, cloud.jengu.platform.configuration.ATenantsConfigurationIsLaidOutByItsKindTest#aZoneHasItsOwnSectionsAndAnUnknownKindNone, cloud.jengu.platform.configuration.ATenantsConfigurationIsLaidOutByItsKindTest#everyKindIsNamedInEveryLanguage
  • cited, no result A person, the practitioner they are and the roles they hold are configuration, filed under a neutral key, never under anything that identifies the person. REQ-CFG-PEOPLE-NAMED-BY-NEUTRAL-KEY
    Cited by: cloud.jengu.platform.people.APersonIsConfigurationInAPersonsDraftTest#aNewKeyIsNobodysAndAnEmailIsOnePersons, cloud.jengu.platform.people.APersonIsConfigurationInAPersonsDraftTest#aPersonIsJoinedToThePractitionerTheyAreByTheirKey, cloud.jengu.platform.people.APersonIsConfigurationInAPersonsDraftTest#thePeopleAreDrawnInEveryLanguage, cloud.jengu.platform.people.APersonIsConfigurationInAPersonsDraftTest#theirRecordsAreNamedByTheirKeyAndNothingElse
  • cited, no result A person is removed, closed or has a role taken with everything filed under them, but never the last person able to administer the tenant. REQ-CFG-A-TENANT-KEEPS-AN-ADMINISTRATOR
    Cited by: cloud.jengu.platform.people.ATenantIsNeverLeftWithoutAnAdministratorTest#aSecondAdministratorWhoSignsInLetsEitherGo, cloud.jengu.platform.people.ATenantIsNeverLeftWithoutAnAdministratorTest#theOnlyAdministratorIsTheLastOne
  • cited, no result What a role grants is the tenant's configuration: each configured role is granted as configured, a grant no role names any more is withdrawn, and a role nobody configures grants nothing. REQ-CFG-ROLES-GRANT-AS-CONFIGURED
    Cited by: cloud.jengu.platform.people.APersonIsConfigurationInAPersonsDraftTest#aRoleIsARecordOfItsOwnSayingWhatItGrants, cloud.jengu.platform.people.APersonIsConfigurationInAPersonsDraftTest#theAuthoritysGrantsAreMadeWhatTheConfigurationSays
  • cited, no result A person's own password or on-site PIN is kept sealed in the configuration, changed apart from anybody's draft and recorded only as a change of personal data, never by what it is; it is refused while the configuration holds changes not yet applied. REQ-CFG-PERSONAL-DATA-COMMITTED-APART
    Cited by: cloud.jengu.platform.configuration.APersonsDraftFollowsMainUntilItIsAppliedTest#aPersonsOwnSettingIsCommittedByThePlatformInOneGoAndNamesNobody
  • kept by its basis its basis has no result Applying a configuration brings the organisation into line with all of it at once; a part that cannot be applied is named with its reason, once, in front of a person, and the rest still applies. REQ-CFG-APPLIED-WHOLE-OR-SAYS-WHAT-WAS-NOT
    Based on 3 promises
    • not cited Configuration a declarer holds — value sets, profiles, search parameters, whatever a loader keeps — is handed over and applied to a tenant as one recorded pass rather than posted a resource at a time: read, applied, and a card per declaration nobody could apply, naming it as the declarer names it. The declarer's own name for the set is echoed and never parsed, and nothing reaches back afterwards — whoever declared it re-evaluates against what the pass says, so the two sides never have to be up together. REQ-DBO-TEN-A-DECLARED-SET-IS-APPLIED-AS-ONE-PASS
    • not cited Applying a declared set is a sweep: it closes when what is here agrees with what was declared, one declaration nobody can apply is a card naming it and the rest still apply, and the pass tallies what it read, applied and skipped. The store's own bring-up configuration goes through it too — a partial application whose only account is a log line is what presents to whoever declared it as 'my configuration had no effect'. REQ-DBO-PROC-CONFIG-APPLIES-AS-A-SWEEP
    • cited, no result A declaration this deployment refused is reported by name with its reason, and a deployment that is not serving something it was told to serve does not answer as though it were. The refusal was already a card in front of a person, which is where it belongs; what it was not is visible, because a spec that will not parse never reaches bring-up and none of the reporting there fires — six tenants of seven reads exactly like six. Said once per declaration and reason, since the pass runs on every beat and a refusal repeated every few seconds is how a log stops being read; said again when the reason changes, because somebody fixing a file works through its problems one at a time. REQ-DBO-TEN-A-REFUSED-DECLARATION-IS-SAID-ONCE
      Cited by: cloud.jengu.dbo.tenant.ARefusedDeclarationIsSaidOnceTest#aLogThatRepeatsItselfStopsBeingRead, cloud.jengu.dbo.tenant.ARefusedDeclarationIsSaidOnceTest#beingFixedIsNotBeingForgivenForever, cloud.jengu.dbo.tenant.ARefusedDeclarationIsSaidOnceTest#oneBrokenFileDoesNotSpeakForAnother, cloud.jengu.dbo.tenant.ARefusedDeclarationIsSaidOnceTest#somebodyFixingAFileWorksThroughItOneProblemAtATime
  • kept by its basis its basis has no result A configuration that cannot be read, or was read only in part, takes nothing away: only a complete reading withdraws what it no longer names, and an unchanged configuration is not applied again. REQ-CFG-AN-UNREADABLE-CONFIGURATION-TAKES-NOTHING-AWAY
    Based on 2 promises
    • not cited Configuration is read from a declared source — a repository, a mounted directory, a lane — and what a scope last agreed with is recorded on its own run, so an unchanged source is a read rather than a re-application, and a scope with a card open is re-applied until the card closes. A source that cannot be read says so: it never answers with an empty set, because empty and unreachable are the same sentence to whoever then has to decide what is missing. REQ-DBO-PROC-CONFIG-READ-FROM-A-SOURCE
    • not cited Only a read a source says is complete may withdraw what it no longer names, so a partial read and an unreadable one take nothing away. What is held is the applier's to answer and undoing is the applier's to do: one that cannot say withdraws nothing, and one that cannot undo makes a card rather than a silence — nothing is removed by machinery that was never told how to remove it. REQ-DBO-PROC-CONFIG-WITHDRAWAL-IS-DECLARED
  • kept by its basis its basis has no result Applying configuration on request is a right granted apart from working with the data, and is recorded exactly as the regular applying is. REQ-CFG-APPLYING-IS-A-RIGHT-OF-ITS-OWN
    Based on 1 promise
    • not cited Applying what is declared can be asked for, and the ask is the whole of the interface: it opens the same pass the deployment runs on its own and answers with what that pass did, so there is no second entry point that applies without leaving a record. It is reached behind a scope of its own, granted separately and usually not granted at all, because changing what a tenant is, is not the same right as writing records into it. REQ-DBO-TEN-APPLYING-IS-ASKED-FOR-AND-RECORDED
  • kept by its basis its basis has no result Every configuration change applied names what changed, who made it and who asked for it, and an earlier version can be returned to. REQ-CFG-EVERY-APPLIED-CHANGE-NAMES-ITS-AUTHOR
    Based on 1 promise
    • cited, no result A tenant may declare a repository its owner keeps, read at a commit from its objects and never fetched: its declared ref is applied when it comes up, and any ref when asked. Each apply reconciles the commit with what each file applied before — a file unchanged is not read, a changed one is applied, and what a file stops declaring is withdrawn and nothing else — so an older commit is a rollback. The run names the ref, the commit, its author and message, and who asked. REQ-DBO-TEN-AN-OWNERS-CONFIGURATION-IS-APPLIED-FROM-ITS-REPOSITORY
      Cited by: cloud.jengu.dbo.tenant.AConfigurationReadsBackEveryFileItAppliedTest#aFileRemovedPastThePageIsWithdrawn, cloud.jengu.dbo.tenant.AConfigurationReadsBackEveryFileItAppliedTest#theCommitAppliedChangesNothing
  • kept by its basis its basis has no result An organisation's secrets are kept in its configuration encrypted under its own key, opened only through that key or the owner's own, and a secret withdrawn from the configuration is forgotten. REQ-CFG-SECRETS-OPEN-ONLY-UNDER-THE-ORGANISATIONS-KEY
    Based on 2 promises
    • cited, no result A tenant owner's secrets are kept in its repository encrypted as SOPS writes them, each value under its name and the file under a MAC, with the data key wrapped by the tenant's own Transit key in the deployment's Vault. Applying one opens it through that Vault alone, refuses a file wrapped by any other key, and hands each secret to the tenant's authority, which keeps it wrapped and never as a record; a secret withdrawn from the repository is forgotten. REQ-DBO-TEN-AN-OWNERS-SECRETS-ARE-SEALED-IN-ITS-REPOSITORY
      Cited by: cloud.jengu.dbo.tenant.ASecretsFileIsReadAsSopsWroteItTest#aChangedFileDoesNotOpen, cloud.jengu.dbo.tenant.ASecretsFileIsReadAsSopsWroteItTest#aFileSopsWroteOpens, cloud.jengu.dbo.tenant.ASecretsFileIsReadAsSopsWroteItTest#onlyStringsAreSecrets
    • cited, no result A deployment writes a file of a tenant's secrets, whole, as SOPS writes one: each value under its name, a MAC over them, the data key wrapped through Transit's encrypt endpoint alone under the tenant's key and for the owner's age recipients, as the repository's .sops.yaml names them for the file's path. The store opens it, the owner's own SOPS opens it through Vault or with their age key alone, a writer that may only encrypt cannot open it, and a rule the writer cannot use is refused. REQ-DBO-TEN-A-DEPLOYMENT-WRITES-AN-OWNERS-SECRETS-AS-SOPS-DOES
      Cited by: cloud.jengu.dbo.tenant.AFileOfSecretsIsWrittenAsSopsWritesOneTest#aTamperedFileIsRefused, cloud.jengu.dbo.tenant.AFileOfSecretsIsWrittenAsSopsWritesOneTest#theOwnersAgeKeyOpensIt, cloud.jengu.dbo.tenant.AFileOfSecretsIsWrittenAsSopsWritesOneTest#theRulesAreFollowedByPath, cloud.jengu.dbo.tenant.AFileOfSecretsIsWrittenAsSopsWritesOneTest#whatIsWrittenOpens
  • cited, no result A person closed in the configuration can no longer sign in, and reopening them restores their sign-in. REQ-SES-CLOSED-PERSON-SIGNS-IN-NO-MORE
    Cited by: cloud.jengu.platform.people.APersonIsConfigurationInAPersonsDraftTest#aPersonClosedSignsInNoMore
    Based on 1 promise
    • not cited Deactivating a subject retires its credentials — every factor, at once, and never by deletion: history and audit need the record, and a login that vanishes cannot be told from one that never existed. REQ-DBO-AUTH-DEACTIVATION-RETIRES-CREDENTIALS
  • cited, no result The configuration page shows the configuration in force against what was applied, its history, what is not yet saved, and what a preview or an apply came to, in every language. REQ-CFG-THE-PAGE-SAYS-WHAT-IS-APPLIED
    Cited by: cloud.jengu.platform.configuration.TheConfigurationPageShowsWhatIsAppliedTest#mainStandsAgainstWhatTheStoreApplied, cloud.jengu.platform.configuration.TheConfigurationPageShowsWhatIsAppliedTest#thePageIsDrawnInEveryLanguage, cloud.jengu.platform.configuration.TheConfigurationPageShowsWhatIsAppliedTest#theRepositorysMainItsHistoryAndWhatIsNotCommitted, cloud.jengu.platform.configuration.TheConfigurationPageShowsWhatIsAppliedTest#theStoresAnswerIsRead
  • cited, no result Every change to an organisation's setup is shown by what its author said it does, or by what its parts said, and by how many records it added, changed and removed in each section of the setup, each record named; whoever made it says, when agreeing it, what they changed and why. REQ-CFG-A-CHANGE-IS-SAID-BY-WHAT-IT-DID
    Cited by: cloud.jengu.platform.configuration.TheSetupIsSaidInPeoplesWordsTest#aDraftIsTitledByItsSavesUntilItsPersonSaysOtherwise, cloud.jengu.platform.configuration.TheSetupIsSaidInPeoplesWordsTest#aDraftTitledOnlyByWhoseItWasIsCalledByWhatItsSavesSaid, cloud.jengu.platform.configuration.TheSetupIsSaidInPeoplesWordsTest#whatAChangeTouchedIsSaidBySectionOfTheSetup
  • cited, no result Every customer has a configuration of its own from the start, made from its kind's seed where it has none and never replaced where it has one. REQ-CFG-EVERY-CUSTOMER-HAS-ITS-OWN-CONFIGURATION
    Cited by: cloud.jengu.platform.configuration.ATenantsConfigurationIsAGitRepositoryTest#aRepositoryThatExistsIsTheTenantsAndIsLeftAsItIs, cloud.jengu.platform.configuration.ATenantsConfigurationIsAGitRepositoryTest#aTenantWithNoSeedStartsEmptyAndAFolderIsNamedOnlyByACode, cloud.jengu.platform.configuration.ATenantsConfigurationIsAGitRepositoryTest#aTenantWithNoneIsGivenOneFromItsSeedCommittedOnMain, cloud.jengu.platform.configuration.ATenantsConfigurationIsAGitRepositoryTest#itsRecordsAreReadInPathOrderAndAHiddenDirectoryHoldsNone
  • gap: not yet stated A configuration is tried in staging and promoted to production only as reviewed. FEAT-GAP-d79be722
  • gap: not yet stated A customer's configuration alone is enough to rebuild their service. FEAT-GAP-44d867db