Skip to content

architecture: derive UX from data layer schema rather than manual construction #742

@Sealjay

Description

@Sealjay

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions