You should also mention Zod, which acts as the type safe glue between the different boundaries.
I have been using Google Sheets as a kind of hacky database. By defining the schemas in Zod I am able to automatically validate my sheets data and coerce the string cell values into their proper types.
Zod schemas can be used all over the stack, imported for form validation, and avoid heaps of duplication and tests.