matrix-org / matrix-js-sdk

Matrix Client-Server SDK for JavaScript
Apache License 2.0
1.49k stars 578 forks source link

Add guide how to use this package #4194

Closed vitonsky closed 1 week ago

vitonsky commented 1 month ago

Hi, I tried to use this library, but it is absolutely not possible with no any guideline.

Currently i can found only generated SDK API http://matrix-org.github.io/matrix-js-sdk/ that is pretty useless, because does not explain any concepts, any high level library design and does not provide any information about typical use cases.

I tried to implement a trivial scenario where a bot automatically join to any chat and respond with echo. But i have a lot of problems and questions like

Finally, i decided to pause my exploration of this SDK, because it have a pretty low quality due to lack of documentation.

Could you provide some guide with:

harrismcc commented 1 month ago

This would be huge. I'm in the same boat, where even a simple example (that isn't super out of date) would be helpful. There seems to be a ton of ways to do the same things and it's not clear as a consumer of this SDK what the intended way is.

I would be happy to help contribute to this, although I'd need to understand it myself first!

nukeop commented 3 weeks ago

They've got some examples here:

nikiforos-dev commented 2 weeks ago

yeah but they are not easy to understand at all. You need a PHD in matrix before you can do anything basic. Creating and interacting with rooms is straight forward, but if you want to encrypt the chat, createa a new user, invite new users, it's basically a month long mystery to find out how. The docs are not good. They are too atomic and need to be fit into the context of real-world use-cases.

nukeop commented 2 weeks ago

That is true but you can easily implement those methods behind a simple api yourself and then use that. Discord makes that a lot easier admittedly.

richvdh commented 1 week ago

duplicate of https://github.com/matrix-org/matrix-js-sdk/issues/430