Skip to content

3 Context and Scope

FeeCheck as a black box among its neighbours: what they exchange with it in the business's terms (3.1), and over which channels (3.2). The planned components inside the backend are a building block view, blocks/full-product-scope.md.

3.1 Business Context

3.1.1 System context

The task and the scope of the proof of concept are in 1.1; the invoice check is not in the PoC (6.1).

flowchart TB
  vis["Visitor<br/>[Person]"]
  rm["Relationship Manager<br/>[Person]"]
  rev["Audit / Compliance<br/>[Person]"]
  dist["Distribution partner<br/>[External system]"]
  docsrc["Document sources<br/>[External system]"]

  fc["FeeCheck<br/>[Software system]"]

  llm["LLM provider<br/>[External system]"]
  reg["Public reference registers<br/>[External system]"]
  mkt["Market data provider<br/>[External system]"]
  fdx["FinDatEx standards<br/>[Standard / specification]"]
  sd["Master-data system<br/>[Existing system]"]
  inv["Fee calculation and invoicing system<br/>[Existing system]"]
  idp["Google<br/>[External system]"]
  mcpc["MCP clients<br/>[External system]"]
  bi["Analytics and downstream systems<br/>[External system]"]

  vis -- "reads what FeeCheck is" --> fc
  rm -- "contract PDF, corrections, releases" --> fc
  rev -. "reads the audit trail" .-> fc
  dist -- "fee agreements" --> fc
  docsrc -. "contract documents" .-> fc
  fc -- "contract text for extraction" --> llm
  fc -. "identifiers to confirm" .-> reg
  fc -. "NAV per valuation date" .-> mkt
  fc -. "exports conform to EMT / EET" .-> fdx
  fc -. "reads master data" .-> sd
  fc <-.->|"invoice, findings"| inv
  fc -- "sign-in" --> idp
  mcpc -- "asks for results" --> fc
  fc -. "report, export" .-> bi

  classDef person fill:#ffe8b0,stroke:#9a6b00,color:#000
  classDef built fill:#b7e4c7,stroke:#2d6a4f,color:#000
  classDef planned fill:#c6dcff,stroke:#1168bd,stroke-dasharray:4 3,color:#000
  classDef external fill:#e6e6e6,stroke:#6b6b6b,color:#000
  classDef standard fill:#fff,stroke:#666,stroke-dasharray:5 5,color:#333
  class vis,rm,rev person
  class fc built
  class dist,docsrc,llm,reg,mkt,mcpc,sd,inv,idp,bi external
  class fdx standard
Colour Meaning
green built
dotted arrow planned
grey existing or external system
light orange person
white, dashed standard / specification (not a system)

Input and output are seen from FeeCheck.

Partner Input Output
Visitor — person — what FeeCheck does and the way to the sign-in, through the public website
Relationship Manager — person the contract PDF; later checks, corrections and releases the converted case and its extraction; later the deviations to check
Audit / Compliance — person — the audit trail
Distribution partner — external system the fee agreements and statements —
Document sources — external system: SharePoint, DMS, archive contract documents —
LLM provider — external system the answer with the values and the passages they were read from; in the extraction loop its requests for passages the contract text, page by page, and the classification request
Public reference registers — external system: OpenFIGI, ESMA FIRDS, GLEIF, FINMA lists, Zefix / UID, INSEE Sirene, VIES, address registers the register entries that confirm funds, companies, tax numbers and addresses lookups by identifier or name
Market data provider — external system: SIX, fundinfo, Swiss Fund Data NAV and unit prices per valuation date —
FinDatEx standards — standard: EMT, EPT, EET — the extracted product and cost data, aligned to the target format
Master-data system — existing system contract, partner and product master data; it also enables the pre-check before invoice creation —
Fee calculation and invoicing system — existing system the invoice to check the findings on it
Google — external system, the identity provider of the PoC the signed-in person's identity —
MCP clients — external system requests for FeeCheck's results released findings only (G-3)
Analytics and downstream systems — external system: Power BI, report storage — the comparison report and the data export

The platform of the fee calculation and invoicing system also provides a gateway (gateway-service), an MCP server and a streaming service; FeeCheck uses none of them. Its only public entry is its own API gateway (ADR-0010 (docs/adr/adr-0010-api-gateway-and-api-contract.md)), it has its own MCP server (ADR-0011 (docs/adr/adr-0011-mcp-server-placement.md)), and its eventing is its own: Spring Modulith's events, carried to other deployables by Pub/Sub (8.16.3).

3.1.2 Actors

The actors are the stakeholders of 1.3, with what each expects of the architecture; their interests and how each works with FeeCheck are SPEC.md (SPEC.md) §4.

The person who reviews is called specialist reviewer here, as in SPEC.md; the diagrams in 3.1.1 and 6.3 and ADR-0001 call the same role Relationship Manager. Which name stays is open (OQ-10 in open.md).

3.2 Technical Context

The channels to the neighbours of 3.1.1. The trust boundaries SPEC.md §4 asks to be marked, and the risks at each interface, are in the last but one column. The edge login in front of the web app's public address is infrastructure, in 7.1.2.

Partner Channel Inputs / outputs on it Trust boundary · risk Status
Visitor HTTPS, the public website out — static pages public, no business data built (5.1)
Relationship Manager HTTPS, the web app; the upload POST /api/cases in — the contract PDF, later corrections and releases; out — the case the uploaded PDF is untrusted input, a prompt-injection vector (QS-4) built for the upload (5.1.1); the review planned
Audit / Compliance HTTPS, the web app out — the audit trail — planned
Distribution partner, document sources the web app's upload; later connectors to SharePoint, DMS and archive in — contract documents and statements untrusted input (QS-4) built for the upload; the connectors planned
LLM provider HTTPS out — prompt with document text, and in a loop every tool result; in — the raw answer outside the organisational boundary — data egress of every prompt and tool result; cost per call; availability — a failed call ends in the extraction's fallback (8.7), a provider change is QS-6 built: the Mistral API under the Mistral profile; Gemini on Vertex AI in europe-west3 under the Vertex AI profile (8.13, ADR-0012 (docs/adr/adr-0012-model-provider-and-extraction-shape.md))
Public reference registers REST, bulk downloads out — lookups; in — register entries external data, availability and rate limits per register planned
Market data provider REST / file in — NAV and unit prices commercial — cost per subscription not in the PoC
Master-data system REST, read-only out — reads contract, partner and product master data the strangler cut, target vs legacy state; validated only against the mock (RISK-1) planned; a contract-equivalent mock in its place (2.3)
Fee calculation and invoicing system REST/JSON, both directions in — the invoice to check; out — the findings existing platform not in the PoC
Google OIDC, federated the sign-in; no local user store the identity provider is chosen per installation and kept switchable (4.5) built (ADR-0008 (docs/adr/adr-0008-google-sign-in-and-backend-on-cloud-run.md)): Google through OIDC with an allowlist of accounts; the sign-in moves to the gateway (ADR-0010 (docs/adr/adr-0010-api-gateway-and-api-contract.md) §3 point 2), planned
MCP clients MCP over HTTPS, /mcp in — MCP calls; out — released findings only outside the organisational boundary; the endpoint's own access check is open built: /mcp with two read-only tools, under the MCP profile, behind Cloud Run's IAM check (ADR-0011 (docs/adr/adr-0011-mcp-server-placement.md)); the findings tool of KF-5 planned
Analytics and downstream systems an export API; FindingsPublished over Pub/Sub (8.16.3) out — the comparison report and the data export released findings only (G-3) planned

docling-serve and the event broker are FeeCheck's own containers, inside its boundary (5.1). In scope, FeeCheck only reads master data; settlement calculation and write-back to the master data are out of scope (SPEC.md §2, "Out of scope").