and the app's cells get to communicate with sharepoint using rest for see some client object model so that.
you can host on-premise with the sharepoint server but not in the same space if you wish as the sharepoint server itself application grants permission to access to be able to access different pieces of sharepoint if it needs to using a law the author protocal