|
1 | 1 | # Cash Reconciliation Automation |
2 | 2 |
|
3 | | -This project explores how cash reconciliation can move from manual spreadsheet review to a structured, analyst-facing workflow. |
| 3 | +> A control-aware reconciliation workbench that automates clear matches, prioritizes exceptions, and helps analysts resolve cash breaks faster — while keeping a human accountable for every decision. |
4 | 4 |
|
5 | | -It started as a rule-based matching prototype. It has now grown into a v3 alpha system that generates synthetic bank and ledger data, validates it, reconciles deterministic matches, surfaces unresolved breaks, attaches candidate evidence, and presents everything in an interactive Next.js workbench. |
| 5 | +[](https://cash-reconciliation-automation.vercel.app) |
| 6 | +[](#current-stage) |
| 7 | +[](#how-v3-works) |
| 8 | +[](#the-analyst-workbench) |
| 9 | +[](#how-to-run-locally) |
6 | 10 |
|
7 | | -Live demo: https://cash-reconciliation-automation.vercel.app |
| 11 | +Cash reconciliation usually lives in fragile spreadsheets. This project shows how it can become a structured, auditable, analyst-facing workflow: a deterministic pipeline does the unambiguous matching, and an interactive workbench focuses human attention on the breaks that actually need judgment. |
8 | 12 |
|
9 | | -Current stage: v3 alpha. Synthetic data only. Not production software. |
| 13 | +**The core principle:** the system *recommends*, the analyst *decides*, the action log *records*. Candidate evidence and model output are treated as hypotheses for review — never as final reconciliation decisions. |
10 | 14 |
|
11 | | -## Why this project exists |
| 15 | + |
12 | 16 |
|
13 | | -Cash reconciliation sounds simple: compare bank activity against internal ledger records and find what does not match. |
| 17 | +**[▶ Try the live demo](https://cash-reconciliation-automation.vercel.app)** — no setup required. |
14 | 18 |
|
15 | | -In practice, the work is repetitive and messy. Breaks can come from timing differences, missing ledger entries, missing bank activity, amount mismatches, duplicate records, reference formatting issues, split payments, or data quality problems. Some items can be matched automatically. Others need a human analyst to review evidence, decide what to do, and leave a clear action trail. |
| 19 | +## How it works |
16 | 20 |
|
17 | | -The goal of this project is to show how that work can be organized. |
| 21 | +```mermaid |
| 22 | +flowchart LR |
| 23 | + A[Synthetic bank &<br/>ledger data] --> B[Schema &<br/>data-quality<br/>validation] |
| 24 | + B --> C[Canonical<br/>standardization] |
| 25 | + C --> D{Deterministic<br/>matching} |
| 26 | + D -->|clear match| E[Auto-resolved<br/>spine] |
| 27 | + D -->|unresolved| F[Candidate evidence<br/>rule + Splink +<br/>split-payment] |
| 28 | + F --> G[Exception queue<br/>+ lifecycle / SLA] |
| 29 | + G --> H[Workbench<br/>data exporter] |
| 30 | + H --> I([Next.js analyst<br/>workbench]) |
| 31 | +``` |
18 | 32 |
|
19 | | -The project is not trying to let AI make final reconciliation decisions. The core matching logic stays deterministic and auditable. Candidate evidence and recommendations are used to support analyst review, not replace it. |
| 33 | +The reconciliation spine stays deterministic and auditable. Probabilistic and rule-based candidates are layered on top *only* to support analyst review of the leftover breaks. |
20 | 34 |
|
21 | | -## What the current v3 alpha does |
| 35 | +A typical run funnels ~1,200 transactions down to a few hundred reviewable breaks: |
22 | 36 |
|
23 | | -The current v3 alpha has two main parts. |
| 37 | +| Stage | Count | |
| 38 | +|---|---| |
| 39 | +| Transactions in (bank + ledger) | ~1,195 | |
| 40 | +| Auto-matched (deterministic rules) | ~400 | |
| 41 | +| Candidate evidence generated | ~1,050 | |
| 42 | +| Breaks routed to analyst review | ~340 | |
24 | 43 |
|
25 | | -The first part is the reconciliation pipeline. It creates synthetic reconciliation scenarios, standardizes bank and ledger records, validates schemas and data quality, applies deterministic matching rules, generates candidate evidence, builds an exception queue, tracks lifecycle context, and exports frontend-ready workbench data. |
| 44 | +(Counts vary per generated run; synthetic data is regenerated relative to the run date so SLA aging stays realistic.) |
26 | 45 |
|
27 | | -The second part is the analyst workbench. It turns the pipeline outputs into an interactive review experience where an analyst can select a break, review evidence, inspect candidates, stage actions, and export a local action trail. |
| 46 | +## The analyst workbench |
28 | 47 |
|
29 | | -## What you can see in the live demo |
| 48 | +The live demo is a **break-resolution workbench**, not a static dashboard. You can: |
30 | 49 |
|
31 | | -The Vercel demo shows a break-resolution workbench, not a dashboard. |
| 50 | +- Filter the priority queue by SLA pressure, priority, amount mismatch, or candidate availability |
| 51 | +- Select a break and review bank-side vs. ledger-side evidence |
| 52 | +- Use evidence triage to surface missing fields, differences, and matched evidence |
| 53 | +- Open lifecycle, recommendation, and raw exception drill-downs |
| 54 | +- Review candidate evidence as a *hypothesis*, then stage a Review / Accept / Reject decision |
| 55 | +- Respect analyst-note requirements on higher-control actions |
| 56 | +- Build a browser-local staged action trail and export it as JSON |
32 | 57 |
|
33 | | -You can try: |
34 | | - |
35 | | -- filtering the priority queue by SLA, priority, amount mismatch, or candidate availability |
36 | | -- selecting a reconciliation break |
37 | | -- reviewing bank-side versus ledger-side evidence |
38 | | -- using evidence triage to see missing fields, differences, and matched evidence |
39 | | -- opening lifecycle, recommendation, and raw exception details |
40 | | -- reviewing candidate evidence as a hypothesis, not a final match |
41 | | -- staging Review, Accept, or Reject candidate decisions |
42 | | -- seeing analyst note requirements for higher-control actions |
43 | | -- creating a browser-local staged action trail |
44 | | -- exporting staged actions as JSON |
| 58 | +The decision boundary is enforced in the UI: recommendations and candidates are clearly framed as support, and the analyst remains responsible for final disposition. |
45 | 59 |
|
46 | 60 | ## How v3 works |
47 | 61 |
|
48 | | -The v3 flow is: |
49 | | - |
50 | 62 | 1. Generate synthetic bank and ledger scenarios. |
51 | 63 | 2. Convert records into canonical bank and ledger outputs. |
52 | | -3. Validate schema and data quality. |
| 64 | +3. Validate schema and data quality (custom + Frictionless-style + Great Expectations-style). |
53 | 65 | 4. Apply deterministic reconciliation rules first. |
54 | 66 | 5. Generate candidate evidence for unresolved or uncertain cases. |
55 | | -6. Build an exception queue and lifecycle context. |
| 67 | +6. Build an exception queue and lifecycle / SLA context. |
56 | 68 | 7. Export a workbench data package for the frontend. |
57 | 69 | 8. Let the analyst review breaks, candidates, and staged actions in the workbench. |
58 | 70 |
|
59 | | -This keeps the reconciliation spine transparent while still making room for candidate evidence and analyst workflow. |
60 | | - |
61 | 71 | ## What is already implemented |
62 | 72 |
|
63 | | -Pipeline and data layer: |
| 73 | +**Pipeline and data layer** |
64 | 74 |
|
65 | | -- synthetic v3 data generation |
66 | | -- scenario manifest |
67 | | -- canonical bank transaction output |
68 | | -- canonical internal ledger output |
69 | | -- validation issue outputs |
70 | | -- Frictionless-style validation |
71 | | -- Great Expectations-style validation |
| 75 | +- synthetic v3 data generation with scenario manifest |
| 76 | +- canonical bank and internal ledger outputs |
| 77 | +- three-layer validation (custom, Frictionless-style, Great Expectations-style) |
72 | 78 | - deterministic reconciliation links |
73 | | -- rule-based candidate links |
74 | | -- Splink-related candidate layer |
75 | | -- split-payment candidates |
76 | | -- exception queue |
77 | | -- exception lifecycle |
78 | | -- exception action recommendations |
79 | | -- pipeline run summary |
80 | | -- frontend workbench data exporter |
81 | | - |
82 | | -Frontend workbench: |
83 | | - |
84 | | -- Next.js frontend |
85 | | -- public Vercel deployment |
86 | | -- priority queue |
87 | | -- queue filters |
88 | | -- search |
89 | | -- next-break navigation |
90 | | -- hide-staged toggle |
91 | | -- evidence triage |
92 | | -- bank-side versus ledger-side comparison |
93 | | -- field-level evidence review |
94 | | -- drill-down panels |
95 | | -- candidate evidence preview |
96 | | -- full candidate review section |
97 | | -- candidate decision guardrails |
98 | | -- structured action log preview |
99 | | -- browser-local staged action trail |
100 | | -- localStorage persistence |
101 | | -- JSON export for staged actions |
102 | | -- clear current and clear all controls |
103 | | - |
104 | | -## What is not finished yet |
105 | | - |
106 | | -This is still an alpha project. |
107 | | - |
108 | | -The current version does not have: |
109 | | - |
110 | | -- real bank or ERP connectors |
111 | | -- real customer data |
112 | | -- authenticated analyst identity |
113 | | -- backend action submission API |
114 | | -- production database |
115 | | -- server-side audit log |
116 | | -- enterprise access control |
117 | | -- permissioned workflow |
118 | | -- production deployment hardening |
119 | | - |
120 | | -Staged actions are saved only in the browser. They are useful for demonstrating the workflow, but they are not yet a real operational audit log. |
121 | | - |
122 | | -## Repository structure |
123 | | - |
124 | | -Important areas: |
125 | | - |
126 | | -- `versions/v1/` contains the first prototype. |
127 | | -- `versions/v2/` contains the scenario-driven deterministic pipeline generation. |
128 | | -- `versions/v3/` contains the current contract-aware reconciliation pipeline. |
129 | | -- `frontend/` contains the Next.js break-resolution workbench. |
130 | | -- `tests/` contains pytest coverage for the v3 pipeline and exporter. |
131 | | -- `frontend/design/` contains design notes, release notes, QA checklists, and action-log schema documentation. |
132 | | - |
133 | | -## How to run locally |
134 | | - |
135 | | -The easiest way to view the project is the hosted Vercel demo: |
| 79 | +- rule-based candidate links, Splink-related candidate layer, split-payment candidates |
| 80 | +- exception queue, lifecycle, and action recommendations |
| 81 | +- pipeline run summary and frontend workbench data exporter |
136 | 82 |
|
137 | | -https://cash-reconciliation-automation.vercel.app |
| 83 | +**Frontend workbench** |
138 | 84 |
|
139 | | -To run the full project locally, clone the repository and run the commands below. |
| 85 | +- priority queue with filters, search, and next-break navigation |
| 86 | +- evidence triage and bank-vs-ledger field-level comparison |
| 87 | +- drill-down panels and candidate evidence preview |
| 88 | +- full candidate review with decision guardrails |
| 89 | +- structured action-log preview, browser-local staged action trail |
| 90 | +- localStorage persistence, JSON export, and clear controls |
140 | 91 |
|
141 | | -### 1. Clone the repository |
| 92 | +## Current stage |
142 | 93 |
|
143 | | - git clone https://github.com/xiangtinghe616-blip/cash-reconciliation-automation.git |
144 | | - cd cash-reconciliation-automation |
| 94 | +This is a **v3 alpha** built on synthetic data only. It is a product-facing demo of the workflow, not production software. The current version does not have: |
145 | 95 |
|
146 | | -### 2. Set up Python dependencies |
| 96 | +- real bank / ERP connectors or real customer data |
| 97 | +- authenticated analyst identity or permissioned workflow |
| 98 | +- backend action submission API or server-side audit log |
| 99 | +- production database, access control, or deployment hardening |
147 | 100 |
|
148 | | - python -m venv .venv |
149 | | - source .venv/bin/activate |
150 | | - python -m pip install --upgrade pip |
151 | | - pip install -r requirements-v3.txt |
| 101 | +Staged actions are saved only in the browser. They demonstrate the workflow but are not yet a real operational audit log. |
152 | 102 |
|
153 | | -### 3. Run tests and generate v3 outputs |
| 103 | +## Repository structure |
154 | 104 |
|
155 | | - python -m pytest -q |
156 | | - python versions/v3/src/reconciliation/run_v3_pipeline.py |
157 | | - python versions/v3/src/publish/frontend_workbench_exporter.py |
| 105 | +- `versions/v1/` — the first rule-based prototype |
| 106 | +- `versions/v2/` — scenario-driven deterministic pipeline and synthetic data generation |
| 107 | +- `versions/v3/` — the current contract-aware reconciliation pipeline |
| 108 | +- `frontend/` — the Next.js break-resolution workbench |
| 109 | +- `tests/` — pytest coverage for the v3 pipeline and exporter |
| 110 | +- `frontend/design/` — design notes, release notes, QA checklists, action-log schema, and screenshots |
158 | 111 |
|
159 | | -### 4. Run the Next.js workbench |
| 112 | +## How to run locally |
160 | 113 |
|
161 | | - cd frontend |
162 | | - npm install |
163 | | - npm run dev |
| 114 | +The fastest way to view the project is the hosted demo: https://cash-reconciliation-automation.vercel.app |
164 | 115 |
|
165 | | -Then open: |
| 116 | +To run the full stack locally: |
166 | 117 |
|
167 | | - http://localhost:3000 |
| 118 | +```bash |
| 119 | +# 1. Clone |
| 120 | +git clone https://github.com/xiangtinghe616-blip/cash-reconciliation-automation.git |
| 121 | +cd cash-reconciliation-automation |
168 | 122 |
|
169 | | -### What this local setup runs |
| 123 | +# 2. Python environment |
| 124 | +python -m venv .venv |
| 125 | +source .venv/bin/activate |
| 126 | +python -m pip install --upgrade pip |
| 127 | +pip install -r requirements-v3.txt |
170 | 128 |
|
171 | | -This does not install a packaged commercial product. |
| 129 | +# 3. Run tests and generate v3 outputs |
| 130 | +python -m pytest -q |
| 131 | +python versions/v3/src/reconciliation/run_v3_pipeline.py |
| 132 | +python versions/v3/src/publish/frontend_workbench_exporter.py |
172 | 133 |
|
173 | | -It runs the repository locally: |
| 134 | +# 4. Run the Next.js workbench |
| 135 | +cd frontend |
| 136 | +npm install |
| 137 | +npm run dev |
| 138 | +# open http://localhost:3000 |
| 139 | +``` |
174 | 140 |
|
175 | | -- Python generates synthetic reconciliation outputs. |
176 | | -- The frontend exporter creates `frontend/public/demo-data/workbench-data.json`. |
177 | | -- Next.js serves the analyst workbench. |
178 | | -- Staged actions are stored only in the browser through localStorage. |
| 141 | +This runs the repository locally — it does not install a packaged product. Python generates synthetic reconciliation outputs, the exporter writes `frontend/public/demo-data/workbench-data.json`, Next.js serves the workbench, and staged actions live only in browser localStorage. |
179 | 142 |
|
180 | 143 | ## Version history |
181 | 144 |
|
182 | | -v1 was the first rule-based reconciliation prototype. It focused on basic matching and exception surfacing. |
183 | | - |
184 | | -v2 expanded the synthetic data and introduced a more scenario-driven deterministic reconciliation pipeline. |
185 | | - |
186 | | -v3 alpha adds validation contracts, canonical outputs, candidate evidence, exception lifecycle context, action recommendations, a frontend exporter, and an interactive Next.js workbench. |
| 145 | +- **v1** — first rule-based reconciliation prototype: basic matching and exception surfacing. |
| 146 | +- **v2** — expanded synthetic data and a scenario-driven deterministic reconciliation pipeline. |
| 147 | +- **v3 alpha** — validation contracts, canonical outputs, candidate evidence, exception lifecycle context, action recommendations, a frontend exporter, and an interactive Next.js workbench. |
187 | 148 |
|
188 | 149 | ## Design principle |
189 | 150 |
|
190 | | -The important boundary is simple: |
191 | | - |
192 | | -The system can recommend. |
| 151 | +The boundary is deliberately simple: |
193 | 152 |
|
194 | | -The analyst decides. |
| 153 | +> The system can **recommend**. The analyst **decides**. The action log **records**. |
195 | 154 |
|
196 | | -The action log records. |
197 | | - |
198 | | -Candidate evidence is review support. It is not a final reconciliation decision. |
| 155 | +Candidate evidence is review support. It is never a final reconciliation decision. |
199 | 156 |
|
200 | 157 | ## Safety note |
201 | 158 |
|
202 | | -This repository is for synthetic data only. |
203 | | - |
204 | | -Do not commit real bank statements, ERP extracts, customer names, account numbers, or operational reconciliation data. |
205 | | - |
206 | | -The public demo uses synthetic generated data. |
| 159 | +This repository is for **synthetic data only**. Do not commit real bank statements, ERP extracts, customer names, account numbers, or operational reconciliation data. The public demo uses synthetic generated data. |
207 | 160 |
|
208 | 161 | ## Next priorities |
209 | 162 |
|
210 | | -Near-term work: |
211 | | - |
212 | | -- continue Salt-inspired visual polish |
| 163 | +- continue Salt-inspired visual polish and queue throughput |
213 | 164 | - improve candidate evidence detail |
214 | | -- improve high-throughput queue workflow |
215 | | -- plan a backend action-log API |
216 | | -- decide persistence architecture |
| 165 | +- plan a backend action-log API and decide the persistence architecture |
217 | 166 | - record a concise alpha demo walkthrough |
0 commit comments