Skip to content

FeeCheck frontend — layout and design

Written from the design canvas FeeCheck UI Design (a mockup of seven screens). This file is the reference; the canvas is a sketch of it. Where a screen spec in docs/specs/ is more precise, the spec wins for that screen. The web app's shell is built in frontend/app (spec 200 (docs/specs/200-web-app-skeleton.md)); the target stack is in the architecture description.

The web app's shell and sign-in pages were worked out in two interactive mockups on claude.ai (private, illustration only — this file governs): the shell mockup FeeCheck web app shell, approved on 18 October 2026 in #197, and the component wireframes FeeCheck web app layout · components, which split it into React components.

Approved mockups are kept in the repository as standalone snapshots in mockups/ (shell, component map, contract intake, website). The canvas stays the place where design work happens; when a mockup is approved, its snapshot is committed in the same pull request, and the screen's spec links to it. Once a screen is built, its page stories in the component and screen catalog (frontend/app/README.md) show it as built and are its reference; the snapshot stays as the record of what was approved (ADR-0017 (docs/adr/adr-0017-component-catalog-storybook.md)).

1 Principles

Nothing is released without a person Release is its own confirmed step, with the versions on screen. The workflow enforces the same rule (spec 15 (docs/specs/15-workflow-module.md), W-3).
Evidence beside every value Contract passage, master-data value and the reason sit side by side — no tab switching to decide.
Every screen answers "what needs me next?" One primary action per screen, leading to the next step.
Keyboard first J/K move between findings, A/C/R decide, / searches.
The case is the hub Every list row opens a case; review, release and audit are reached from the case and lead back to it.

2 Shell

Every screen is the same frame at desktop width (mockups at 1440 × 900):

┌──────────────┬───────────────────────────────────────────────────────────┐
│  Sidebar     │  Header 72 px: section · title · state   [search] [action] │
│  248 px      ├───────────────────────────────────────────────────────────┤
│              │                                                           │
│  Work        │  Content, padding 28–40 px                                │
│   Cases  7   │                                                           │
│   Intake     │                                                           │
│   Review     │                                                           │
│   Release 3  │                                                           │
│  Oversight   │                                                           │
│   Audit      │                                                           │
│   Evaluation │                                                           │
│   Catalog    │                                                           │
│              │                                                           │
│  user · SSO  │                                                           │
│  inference   │                                                           │
└──────────────┴───────────────────────────────────────────────────────────┘
  • Sidebar — product mark, the groups Work (Cases, Contract intake, Review, Awaiting release) and Oversight (Audit trail, Evaluation runs, Attribute catalog); at the bottom the signed-in person with role and the inference region in use. The active entry has a lighter fill and an accent bar on its left edge. Counts are shown for the two queues that need a person.
  • Header — a breadcrumb or section name above the title. The title is the partner name on case screens and the screen name elsewhere. State chip next to the title; primary action right-most.

2.1 The first web app (milestone Web app — first UI on Google Cloud)

Decided in the mockup round of #197:

  • Only live entries are listed. The first web app had one: Work › Contract intake; since #566 Work › Cases comes first. Entries that do not work yet are left out, not greyed out; the full sidebar above is where it grows to.
  • Signed-in person — at the bottom of the sidebar: name, Google address, and the line Signed in with Google. No region line yet: the line returns once the inference region is a real choice. The backend names the region it is configured with in GET /api/intake/settings (#604) — Vertex AI's location; Mistral is configured with none — for the intake screen's What is used, which the web app is to read (#582). No role until roles exist. The data comes from the backend's session, never from a token in the browser.
  • Sign out — below the person. It ends the session in the backend and returns to the public website. It is a form that posts to the backend, not a plain link.
  • No header search on Contract intake: there is nothing to search yet.
  • Light only. Dark mode follows once the status pairs below have dark values.
  • Phone width: the sidebar stacks above the content.

2.2 Components of the shell

How the frame splits into React components in frontend/app (board 1 and 4 of the component wireframes). Shared components live in frontend/app/app/components/, one kebab-case file each, and are built once; a screen uses them and does not re-style them. Each has a story per state beside it, <component>.stories.tsx — the frame's pieces grouped in frames.stories.tsx and navigation.stories.tsx — in the catalog (frontend/app/README.md): look there before writing a component, and add the stories of a new one or a new state in the same change. What only one screen needs stays in its route module until a second screen needs it. A shared package (packages/ui) follows only when a second app needs the same components (owner, 20 October 2026, in #200).

The names below stand. The skeleton built AppShell, Sidebar with ProductMark, NavGroup · NavItem, SignedInPerson (a placeholder until sign-in), PageHeader and Icon; sign-in (#201) built SignOutButton, AuthLayout and AuthCard; Contract intake (#204) built Button (primary, secondary) and StatusMessage (status, error); the result views of Contract intake (#319) built Tabs; the case screen (#568) built ConfirmDialog and the danger Button. The others are built with the first screen that needs them.

Component Job
AppShell layout route of every signed-in screen: sidebar plus the outlet for the screen; asks the backend who is signed in, and sends a visitor without a session to Sign in
Sidebar ProductMark, one NavGroup per group, SignedInPerson with SignOutButton
NavGroup · NavItem group label; one entry as a router link — active entry with aria-current="page", lighter fill and accent bar, optional count. The entries come from one list
PageHeader section, title, state chip and the primary action. Rendered by the screen, not by the shell, because all four are the screen's own; it sets the document title too
StateChip the state word with one of the six tones of §6
Button primary, secondary, danger (§6)
Section a card with its heading row
Tabs the views of one area, one shown at a time — WAI-ARIA tabs: one Tab stop, the arrow keys move between the tabs and switch the view, the selected tab carries the accent bar
StatusMessage loading, empty, error and status — §6
Banner a message about the app as a whole across the top of the content area, error or info — §6; built with #239
ConfirmDialog the confirmation question — §6
AuthLayout · AuthCard the frame of the sign-in pages (§2.3)
Icon the sprite of §6, as on the website

The screen itself — for the first web app routes/intake.tsx — fills the outlet with its PageHeader, its messages and its own content.

2.3 Sign-in pages

Outside the shell and reachable without a session: one card centred on the page ground, with the product mark (AuthLayout, AuthCard). The way in is the website's Login → Sign in to FeeCheck → Google's own page → back to the screen that was asked for. Google's page is Google's; FeeCheck does not imitate it.

Page Content
Sign in to FeeCheck title, one sentence (only invited Google accounts get in), Sign in with Google as the primary action, Back to the website
No access chip Not signed in, title This Google account has no access, that no session was started and how to get invited; Use another Google account and Back to the website. It shows no address — the owner's decision of 20 October 2026 on #201, against the approved mockup, which shows one

3 Screens and flow

flowchart LR
  intake["<b>Contract intake</b><br/>upload, progress,<br/>duplicate and paused notices"]
  cases["<b>Cases</b> (home)<br/>search · 4 filter cards<br/>list of cases"]
  case["<b>Case overview</b><br/>PDF · state · use cases<br/>data · history · details"]
  review["<b>Review</b><br/>per use case<br/>accept · correct · reject"]
  release["<b>Release</b><br/>per use case<br/>confirm with versions"]
  audit["<b>Audit trail</b><br/>append-only, filters"]

  intake -- "Open review / Go to that case" --> case
  cases -- "row" --> case
  cases -- "Upload contract" --> intake
  case -- "Open review" --> review
  review -- "all decided → Continue to release" --> release
  release -- "Release n findings" --> audit
  review -- "breadcrumb" --> case
  release -- "breadcrumb" --> case
Screen Question it answers Primary action
Cases (home) Which case needs me first? open a case; Upload contract
Case overview What is this contract, where does it stand, what happened? Open review
Contract intake Did my upload arrive, and how far is it? Open review
Review Is this finding right? Accept / Correct / Reject
Release Is everything decided, with which versions? Release n findings (after the confirmation box)
Audit trail Who decided what, when, on which model and rule set? Export sample

Who lands where: the reviewer on Cases; an approver on Awaiting release through a deep link; audit and compliance on Audit trail; a downstream agent has no screen and reads released findings through the MCP tool only. As built (#566): every signed-in person lands on Cases — / leads to /cases — on its reviewer tab; an approver switches to the approver tab there, as long as Awaiting release does not exist.

4 Case and use case

A case is one contract document. A use case is a piece of work that runs on it; Fee reconciliation is the first, more will follow, possibly per customer. The screens keep the two apart because the workflow does (spec 15 (docs/specs/15-workflow-module.md)):

Belongs to the case — once Belongs to each use case
Received, converted, extracted reconciled, in review, released
the PDF and the extracted attributes the findings and their decisions
the history of the case its own review and its own release

State words used on screens, and nowhere else invented:

Where Words
Case, list and header chip Needs a decision · Ready to release · Blocked, resumable · Released
Document Received · Converted · Extracted · Extracted, paused
Use case stage Reconciled · In review · Released; Waiting while blocked
Confidence of a value Grounded · Citation not found · Not in document · Ambiguous — the four values of FieldConfidence
Decision Accepted · Corrected · Rejected

5 Screen layouts

Cases (home)

As built (#566, spec 566 (docs/specs/566-cases-dashboard.md)): a first form at /cases — the header with Upload contract; a reviewer tab with the case list, filtered by state (opening on needs review, failed and blocked) and paged by 50, each row's case ID opening the case screen; for an approver a second tab with the counts of a period. No search, no filter cards, no use cases. The table below is the full screen it grows into.

No. Area Content
1 Header Cases, search (/), Upload contract
2 Filter cards four buttons that filter the list: Needs my decision, Awaiting release, Blocked, resumable, All cases — count and one line of context each; the active one has an accent border
3 List one link per case: partner and case ID with file name · received · document state · one chip per use case with its stage · attention chip · chevron. Sorted by lowest confidence first.

Case overview

As built (#568, spec 568 (docs/specs/568-case-screen.md)): a first, read-only case screen at /cases/<id> — the header with the case ID and Delete case … for a reviewer or an approver; state and uploader; the steps with their times; the extracted fields with their verdicts and cited pages; the pages as text. No PDF, no use cases, no review. The table below is the full screen it grows into.

No. Area Content
1 Header breadcrumb Cases / case ID, partner name, state chip, Download PDF, Open review
2 PDF (left, 500 px) the original file: page thumbnails, page back / forward, the page
3 Case state strip Document · Received · Assigned to · Contract ID with its confidence
4 Use cases on this case one row per use case: name, stage bars, open findings, Review; below, Apply use case for the next one
5 Tabs Extracted data (attribute, value, confidence, page) · History (timeline of the case) · Details (file, checksum, model, prompt and rule-set versions, master-data snapshot)

Contract intake

Drop zone for one PDF; This session shows each upload with its processing steps, a duplicate notice (no second case is created) and a paused notice with Retry now; the right column explains what happens after upload and shows the run settings — the converter and its release, the classification's and the translation's model, the provider and its region — from GET /api/intake/settings (#604); the classification card shows the confirmed indicators and the tokens the model used from the case's gate.

Review (per use case)

Three columns: the findings list (Needs your judgement, then Decided by rule with Confirm all), the contract evidence with the passage highlighted, and the decision panel (Contract says beside Master data has, the reason, Accept / Correct / Reject, and undo). Progress Decided n of m in the header; Continue to release only when all are decided.

Release (per use case)

Counts of accepted, corrected and rejected; the table of what will be released; Recorded with this release (who, model, prompt, rule set, eval set, master-data snapshot); the confirmation box, and only then the release button.

Audit trail

Filter chips (all, human decisions, AI and rules, releases, tool calls), case ID filter, append-only event table with time, event, what, who and versions; Export sample.

6 Foundations

Colour — every text pairing below meets 4.5 : 1. In code these become CSS variables used as Tailwind classes, never raw values (2.4 Conventions).

Token Light Dark Use
navy #0B1F3A — sidebar, secondary buttons
on navy #FFFFFF — text and glyphs on the sidebar; at 70 % for its group labels and the signed-in person
text #0B1F3A #E9EDF4 primary text
accent #D6002A #D6002A primary action, active states, counts
on accent #FFFFFF #FFFFFF text on the accent
link #B00022 #FF8095 links
ground #F4F5F8 #08172C page background
surface / line #FFFFFF / #E1E5EC #0F2240 / #233A5E cards and their borders
line strong #C5CCD8 #3A5480 outlined buttons, flow connectors — decorative only: below the 3 : 1 of WCAG 1.4.11, so never text and never the only cue that something is a control (an outlined button is identified by its label)
muted text #5A6780 #A7B3C7 labels, captions
status pairs #E3F4EE/#0B6B4F success · #FFF1E0/#8A3B00 warning · #FDECEF/#A0001F needs a person · #E8EEF8/#23406E info · #F1EAFB/#5B2A9E AI · #EEF1F5/#3A4760 neutral not defined yet — the website uses none chips and notices

Dark applies when the visitor's system asks for it (prefers-color-scheme: dark); there is no toggle. The accent glyphs on the dark surface reach 2.9 : 1 and are decorative — they sit beside a label, never replace one.

Type — Space Grotesk for titles and figures, IBM Plex Sans for text, IBM Plex Mono for IDs, versions and file names, IBM Plex Serif for contract passages.

Shape — 8 px radius on controls, 12 px on cards; chips fully rounded; controls at least 44 px high.

Controls — every control is a <button> (it acts) or an <a> (it navigates), also when an <a> looks like a button.

Control Look When
Primary button filled accent, on accent text, 600 the one main action of a screen
Secondary button outlined in navy every other action, Cancel included
Danger button outlined in needs a person; filled only inside the confirmation question an action that cannot be taken back

Messages and the confirmation question — the look. The wording, the same on every screen, and which actions ask are in the conventions (conventions.md §5, §6).

  • Loading and empty are muted text where the data will appear.
  • An error — a service that does not answer — is a notice in the needs a person pair with role="alert" and a Reload button.
  • A banner (Banner) is a message about the app as a whole, across the top of the content area: error in the needs a person pair with role="alert", info in the info pair with role="status", its action at the right. A screen that fails shows the error banner with Try again, and the sidebar stays usable. It is meant for later system-wide messages too.
  • A confirmation after an action is a notice in the success pair with role="status", above the content it concerns.
  • The confirmation question — for an action that cannot be taken back, except Release, which confirms in its own box on the page (conventions.md §6) — is a modal dialog: the title asks the question, one sentence says what happens, Cancel and the action sit bottom right. Focus starts on Cancel, Tab stays in the dialog, Escape and Cancel change nothing, and focus returns to the button that opened it, whose text ends in "…". If the action fails, the error shows in the open dialog and nothing changes.

Icons — our own set in feecheck-icons.svg, 24 glyphs, no third-party library: 24 px grid, 1.75 stroke, round caps and joins, currentColor. 16 px inline with text, 18 px in navigation, 24 px standalone. An icon sits beside a label and never replaces one; an icon-only button carries an aria-label. The target stack's component library, shadcn/ui, brings Lucide icons by default — they are not used; the sprite is the Icon component, in frontend/app/app/components/icon.tsx for the web app as on the website (§2.2).

Glyph Meaning
logo cases upload review release audit chart catalog product mark and the navigation entries
search plus minus check chevron-right arrow-left arrow-right undo download actions
info warning lock globe notices, append-only, inference region
file history layers contract PDF, case history, use cases

7 Open

  • The screen specs (docs/specs/<issue>-<screen>.md, template _template-frontend.md (docs/specs/_template-frontend.md)) are written per screen when it is built; this file is what they link to for the shared frame.
  • The size budget of K-4 (conventions.md §8) is settled: 1 MB per screen's first load, the owner's limit (#616); sizes over 600 KB are watched by a weekly scheduled check, first-load-check.yml (#617).
  • The second use case is not known yet; the case overview shows its slot empty.