Hi Patrick,
For the URL of the app, often a constant is used where you state the location like “https://app.company.com”.
You can also use the Java Action GetApplicationUrl of the CommunityCommons module to retrieve the information stored in the Java parameter “ApplicationRootUrl”. In case of a custom domain, make sure you also set this information correctly in the Runtime Customization (see documentation here).
Does this help? Or are you looking also for other information?
Regards, Johan