Repository navigation
docs: document how the portal, Triage and Backoffice work together - #231
Merged
Merged
Conversation
Flow docs with Mermaid diagrams, a test coverage matrix and ranked findings, based on code reading and a local click-through of all three apps.
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
Nobody has a full picture of what the system does today. A portal issue passes through three apps: the portal, the Triage Zammad and a municipality's Backoffice Zammad. They are connected by jobs, webhooks, Zammad triggers, core workflows and schedulers, and several of those pieces live only in the Zammad databases. Questions like "what does Triage set on a praise", "what happens when the volunteer asks for a supplement", or "how does a Backoffice note get to the portal" need code archaeology every time. That makes it hard to plan the integration tests, to see which parts have no tests, and to spot broken or unhandled flows.
Solution
A
docs/how-it-works/folder that maps every user flow and every sync, kept in the repo so it changes together with the code:README.md: index and how to keep it true.01–10: one file per area (overview and system map, issue lifecycle, submission and triage, resolution, praise, comment routing, Backoffice connector, onboarding, emails, scheduled work). Each has Mermaid diagrams andfile:linereferences.coverage.md: flow × test matrix from a freshbin/rails test:all(582 runs, 77.9% lines, 58.2% branches), plus the team's planned integration scenarios mapped to what exists.glossary.md: the terms used across the docs and the apps.opsrepo (epic slovensko-digital/ops#1349: 29 issues with severity, category, evidence, diagrams and a proposed fix). Dead code, setup and security are separate issues there (#1317, #1318, #1319).The main
README.mdlinks to it from a new "How it works" section and from "Connect new Backoffice instance", which also warns that the snippet fails for municipalities created byactivate_basic, and how to fix it.Everything marked (observed) was clicked through on 2026-10-15 with all three apps running locally (Rajec connected as a PRO municipality). The rest comes from reading the code. Each fix should get its own PR, which updates the affected section and removes the issue's row. This PR changes no behaviour.
The problems to look at first:
Incoming, which no volunteer can see.The flow docs describe only what happens and why. How to run a Backoffice locally next to the portal and Triage, including the
.envoverrides the Backoffice sample needs and the127.0.0.1:8081cookie workaround, is a new "Local Backoffice" section in the mainREADME.md.To keep the docs true,
CLAUDE.mdnow maps code paths to the doc file each one should update, and the PR template has a "Checklist" section with a docs checkbox. The Triage and Backoffice repos get a matchingCLAUDE.mdin slovensko-digital/ops-triage-zammad#126 and slovensko-digital/ops-backoffice-saas#85.Verify: read the files on GitHub. All 16 Mermaid diagrams were checked with Mermaid's parser and render in the file view.
Demo
Not applicable, this is documentation only. The diagrams render directly in GitHub's view of
docs/how-it-works/.Checklist
docs/how-it-works/is updated, or this PR changes no flow (job, webhook, Triage or Backoffice trigger, issue state, email, scheduled job)