data-contract-demo — static browser app for data contract validation
Jigon Yoo
Published
Data contracts define expectations for CSV and JSON formats. When data drifts, contracts catch it before bad data corrupts downstream systems. This static browser application checks CSV or JSON data against an editable contract and compares basic drift metrics. Files are parsed in browser memory and are not uploaded, stored, or transmitted.
There are no runtime dependencies, external CDNs, cookies, analytics scripts, localStorage, or server endpoints. The browser uses File.text() for user-selected files. The only fetch() calls load the two same-origin bundled fixtures. Type inference is deliberately conservative and remains editable.
The measured run.
| Fixture | Planted | Caught | Missed | False alarms |
|---|---|---|---|---|
| clean.csv | 0 | 0 | 0 | 0 |
| broken.csv | 24 | 24 | 0 | 0 |
The broken control contains four instances of each fault: Fahrenheit-like values in a Celsius field, missing required IDs, out-of-enum status values, duplicate IDs, mixed date formats, and comma-formatted numeric strings.
Honest limits.
Maximum input size is 5 MB. Drift uses the bundled synthetic clean fixture as a visible demonstration baseline; a production baseline would need to be supplied and reviewed by its owner. Results are evidence for a person to interpret, not an automated fitness decision.