Deep-integration of Discourse within an Ionic App


We are starting to integrate the discourse forum within our Ionic app and we thought we could use help from the community here to collect feedback on our plan below: Here’s the workflow we have though of for now:

  • User logs into our Ionic app.

  • The backend, checks for category assigned to user, logs in the user to the Discourse, loads cat topics, and serves them back to the UI. The UI is created and managed within the Ionic app.

  • The user can then read the existing topics belonging to that category. Fetch a topic from discourse via backend.

  • Contribution to any existing/new topic is posted on discourse via backend, post-checking if user has rights to post to that category or not.

  • Can Discourse send push notifications to the user directly in the native app, on any ‘watching’ change?

So, all user interaction to discourse happens through the backend server, not directly through the UI. The user authentication happens at the backend server, but how does the system communicate with discourse so the discourse setup knows all about the logged-in user? On every call, the category set should be restricted depending on logged in user.

Can we also restrict the specific categories for users for the login via web, on the basis of allowed categories form the backed server for that user?

*We have explored the basic APIs which ensures we can create entities in discourse from outside and serve the selected filtered content to users. Our backend server already manages users(incl authentication) and each user would be restricted to a certain category by default. Users can add tags, but should be able to create posts only in the default categories they are restricted to. Many of these questions might sound dumb, but please consider that we are just starting to work with discourse, and any feedback/input on this would be really appreciated. Thanks for the help.