Model - View - Controller architecture for Home Assistant

I assume there is a MVC architecture for the UI.
I interesed in extending the model for the target selector.
Not sure where the different parts (M V C) for the target selector are located.
I see that it use Websocket and Rest API to interact with the core.

Any pointers ?

I would also lke to look at adding the pattern property of input_text to the Text Selector.

A question I have … is the UI for intput_text, input_number legacy code … or do they internally use selectors ?