Surge
Extracted contract fields now have one schema, and both sides use it.
- Backend: a field schema with an ISO 4217 currency registry, coercion for every field type, section validation, and an endpoint that serves the schema with ETag caching.
- Frontend: a hook that loads the schema, validation that mirrors the backend, typed inputs (text, number, date, boolean, enum, percent), a money input, and a type-ahead currency picker.
- Shared tests: one fixture of coercion cases runs on both sides, and a drift guard fails if the two schemas fall out of step.
The account overview, the extraction review panel, and the confirm and edit views all validate through it. A manual pass afterwards made ARR paste-friendly and kept the raw text when an edit has an error.