A resource can be flagged as favourite by simply clicking on a star icon available on the dashboard of any project, module or package:
or on any component on the Components page:
or at file level: