I'm building a CRUD project management web app for construction (yes, I'm sure there's existing apps out there, but they're paying me to build a custom one). Currently, I'm using Django with DRF, React with MUI, and generating frontend OpenAPI endpoints using drf-spectacular.
When building the frontend, I originally designed it to be generated from the backend database structure because:
1) The database might change
2) I don't have to hard code the database structure on the frontend
For example, the `Employee` entity has properties like `email`, `first_name`, `last_name`, etc. The entity data and metadata (e.g., max character length of `email`) are sent to frontend components which then generates forms to create new employees and a data grid with employee information.
The alternative approach I can think of is to hard code each forms' fields and data grid columns on the frontend instead of receiving this information from the backend and then generating the forms and data grid.
I'm wondering if building an application with this schema-driven architecture is common? Will this solution be performant if I'm making requests to the backend for this information? I'm finding I'm spending a lot of time updating the metadata API endpoint and making the frontend components generalizable for edge cases.