Use simple storage and wire data structures

We tend to create too many core types which can cause our application to become brittle and inflexible. Types stored on disk (database) are important, but as soon as you go distributed and have communication between systems, types sent over the wire are even more critical. Changing types is no longer a simple DB migration, but now you have to coordinate multiple systems if a data-type sent over the wire changes. Each additional type is a liability – it requires special logic to handle, communicate, store, query, etc. Getting to the correct data structures is one of the hard parts of programming and it sometimes takes a few iterations. If things are getting simpler (at least for your users) as you go along, that is usually a good sign.

The following is an example of the process in the Pocketbase community:

The conclusion was to merge user and profile types.