Hi Alexey,
If I understand you correctly, you would like to write a completely new component based on the UI5 framework and not simply include a standard UI5 component like the rating indicator. If that's the case, then in addition to the documentation Mike has referred to you can refer to the Developing UI5 Controls in JavaScript section of the UI5 Developer Guide.
In this case you will generally begin with the base control as follows in the component.js file:
sap.ui.commons.Control.extend(...
Regards,
Mustafa.