Hi @thionor ,
ui.frontend has a "clientlib.config.js", which contains configuration to store generated Clientlib-site.JS in the ui.app repository.
You can modify this as per your project structure to store generated js file in your project.
If you want to use JavaScript controller in the HTL/sightly file, please refer to the below link for the same.
https://adobemarketingclub.com/2015/12/05/javascript-use-api-with-a-simple-component-in-sightly/