-
-
Notifications
You must be signed in to change notification settings - Fork 2
architecture: derive UX from data layer schema rather than manual construction #742
Copy link
Copy link
Open
Labels
Description
Context
The frontend UX should be driven by the data layer — forms, lists, and views should reflect the backend models and API schema rather than being manually constructed with hardcoded fields.
Tasks
- Audit frontend forms and views — identify where field definitions are hardcoded vs derived from the API
- Leverage the OpenAPI schema to auto-generate or validate frontend form fields
- Ensure new backend model fields automatically surface in the frontend (or are explicitly excluded)
- Consider a metadata-driven approach where the API describes available fields, validation rules, and display hints
- Reduce frontend/backend field name mismatches (e.g., the existing `item_name` vs `name` bug in bug: inventory add endpoint requires 'name' and 'item_type' but frontend sends 'item_name' — always 422 #721)
Why
Manually constructed UIs drift from the data layer over time, causing bugs like field name mismatches and missing fields. A data-driven approach keeps the UX in sync with the backend automatically.
Reactions are currently unavailable