introduce how and why "schemas" figure in the n-tier web architecture: in the db, in the API, and on the Client. We primarily need them for validation, but they can also be used for developer tooling, code generation, etc.
describe the problems with this architecture:
introduce the local-first architecture with dxos
our value hypothesis: the schema of the db IS the schema of the API and the frontend - all state lives in strongly typed, validated, reactive objects. this means radically improved developer velocity and new scenarios possible.
show how we use @effect/schema to make our API type-safe:
show how schema is important to interop:
composer can see the same data as the guestbook app - show how it's reactive between the apps
composer can visualize things in tables by examining the schema
show ability to infer columns and display guestbook data
show ability to add/edit records and perform validation trivially (reject invalid input - i.e. schema in the database was used to protect guestbook app from invalid changes in composer, no extra effort on either app, no API layer in between because both apps use the database directly.)
show ability to extend schema at runtime without breaking either app: add a column and annotate some user records with custom fields in composer - observe data is retained and guestbook app continues to work
explain how composer is extensible and can delegate rendering of arbitrary things to plugins, which can use schema to decide how to render things, or delegate parts of rendering to other plugins through more surfaces - surface nesting ftw.
show how schema can be used in AI scenarios:
conclude with calls to action about composer and dxos.