Comments Module in a static page with Text Box

AI-generated summary

Integrating a Comments Module in a Static Page with a Text Box

@wtolotti is looking for a way to add a comments module to an Angular app without using an iframe or linking to an external forum page. @Falco suggests three steps to achieve this:

  1. Rewrite the composer in Angular.
  2. Use Single Sign-On (SSO) between the app and Discourse to associate comments with the correct user.
  3. Create a backend to receive requests from the Angular app and post comments to Discourse using an admin API key.

@wtolotti considers using the Discourse API Docker to avoid creating a backend. However, @Falco advises against this approach as it would expose the admin API key in plain JavaScript.

Hi guys!

I was thinking, how can I insert a module in my Angular app, without an iframe page, with all the features that comments can have.

I was looking, nowadays there is an embbed tool, but without a comment box and linking to a external page (forum) to reply and view all discussions…

How Can I structure this feature?

Thx!

You will need to:

  • Rewrite the composer in Angular

  • Use SSO between your app and Discourse so the comment goes to the right user

  • Create a backend that will receive the request from the Angular app and post to Discourse using an admin API key.

Great!

But, I can use the Discourse API docker to up in my server, right? This way I don’t need to create a backend..

That would expose the admin API key in plain Javascript. Won’t work.

You are correct..
Thx for the explanation..

:slight_smile: