Inspiration

InvoiceReplayLab explores a common reliability problem: invoice events can arrive twice, out of order, or with conflicting claims. The workbench makes those cases inspectable using authored synthetic data.

What it does

Six authored synthetic scenarios compare a naive listener with a conservative journal. A seventh experiment anchors a clearly imagined untrusted payment claim to the genuine recorded PayPal sandbox DRAFT observation. The journal deduplicates identities, quarantines conflicting or untrusted claims, and resolves refund dependencies. Users can drop or duplicate deliveries, reverse arrival order, inspect individual decisions, and export evidence JSON. A locally trained multiclass softmax classifier ranks incident signals and links its advisory to deterministic findings.

How it was built

The implementation uses JavaScript ES modules, Node.js 22+, HTML and CSS, and Node standard-library HTTP, crypto, and test modules. It has no package dependencies or external AI calls. The local classifier was trained on synthetic examples; real incident accuracy and calibration remain unestablished.

Challenges and learning

The core challenge is preserving causality and source evidence while handling duplicate, delayed, and conflicting events. Model predictions are advisory; journal decisions and linked evidence remain inspectable.

Current integration status

The sandbox-only PayPal REST adapter was exercised in one approved test on October 9, 2026. OAuth returned HTTP 200, creation of one synthetic USD 1.00 invoice returned HTTP 201, and lookup of that same invoice returned HTTP 200. The recorded response verified DRAFT status and the amount. No invoice was sent and no payment, capture, refund, or webhook delivery occurred. The sanitized evidence can be replayed without further PayPal requests. PayPal AI Toolkit was consulted as a reference and is not integrated.

Recorded validation

The current build records 70 passing tests and seven browser scenarios, including mobile checks. These validate the local prototype and recorded-evidence replay; no additional PayPal requests were made.

Source and integrated demonstration

The current public MIT repository includes runnable source, sanitized recorded sandbox evidence, and judge setup instructions: https://github.com/prakharsingh1/invoice-replay-lab. Verified source revision: https://github.com/prakharsingh1/invoice-replay-lab/commit/9dd1820ff247c15599ab0a6c45e6adc2f5925e88. The public 2m29s integrated demo records the actual browser app and genuine saved DRAFT observation: https://youtu.be/ptpVzQdP01A. Narration uses original scripted text synthesized locally by a computer voice. The historical 2m12s offline preview remains at https://youtu.be/AstZoLKYphU and does not establish actual PayPal integration.

Next steps

Improve incident coverage and evaluate classifier performance and calibration on real incident data.

Built With

Share this project:

Updates

Submission history