I have a host site, and a discourse site; each is hosted on a AWS EC2 unit. The host site is a data dashboard for schools, and I want to use the discourse site for discussing the data. For example, a user will click on a data visualization (f.e. a pie chart) on the host site, and start a conversation. This will create the topic on the host site and the discourse site, and embed comments from the discourse site on the host site. The reason for having the topic on the host site as well is that the visualisations could change over time and the user should be able to update their posts on the discourse site. Once the visualizations become stable, this feature might be redundant.
Being about data, the topics will include svg graphics (generated by d3.js on the client side of the host site). If discourse topic is created by the crawler, it will wipe out the svg. Thus I need to create the discourse topics via API. Another requirement is that users from a school should only see their schools topics.
Here is a possible scenario:
- user signs on to host site, clicks on a visualization to create a topic
- client side sends svg to server side, and creates a topic
- server side sends API request(s) to discourse site to:
– create subcategory for the school (if missing)
– create group for the school (if missing)
– adjust subcategory settings so the school group only have access
– create the topic in the subcategory (including the svg)
– get the link to the topic, so it can be used for comments embedding on the host site
- send user’s school group to discourse during SSO
- finally I will have to create a custom theme to include the css file with the styles needed for the svg
is this possible as far as the discourse is concerned?
do you think this is a solid architecture, if not what are the weaknesses?