Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meshchat.py by itself or maybe docs explaining routes #44

Open
resession opened this issue Jan 8, 2025 · 2 comments
Open

meshchat.py by itself or maybe docs explaining routes #44

resession opened this issue Jan 8, 2025 · 2 comments

Comments

@resession
Copy link

is there any resource or docs that explain the websocket server and what the different routes/endpoints are for?

i work on a p2p web browser, https://github.com/HybridWare/hybrid-browser

i've been trying see how i can bring reticulum to the browser/electron. if you can explain the different routes and endpoints of the meshchat websocket server that meshchat.py creates, then it will make it easy for people to make sites and browser apps that can interact with reticulum.

i know you're working https://github.com/liamcottle/rns.js, which i am very interested in. but since meshchat uses the official main python implementation of reticulum, this will have all the features.

i'd love to create a protocol handler in electron, something like reticulum:// and then we can grab reticulum data using your meshchat websocket server.

@liamcottle
Copy link
Owner

Howdy! There's no docs for the internal APIs as they're designed for being used by MeshChat directly, and no by external programs. However if you do want to use them, the source code is the best place to look to understand what they do.

I write a lot of comments in my code, so it should be pretty easy to figure out what each endpoint does ;)

If you're looking to build a new project, I'd probably suggest writing your own minimal wrapper around RNS that does what you need it to do, rather than hooking into MeshChat.

I'm interested to hear what you're looking to build, regarding sites/browser apps, since MeshChat already has support for nomadnet and is already running on Electron itself.

@ducksandgoats
Copy link

ducksandgoats commented Jan 25, 2025

what i had in mind is having a protocol scheme such as reticulum:// that can do CRUD interactions with reticulum data on the browser. my app https://github.com/HybridWare/hybrid-browser (fork of https://github.com/AgregoreWeb/agregore-browser) is a p2p browser. it uses electron's protocol handler capabilities to bring p2p networks to the browser. for example, in a single html page, you can do fetch('ipfs://hash/path/to/file.ext', {method: 'GET'}) and fetch('hyper://key/some/path/to/file.ext', {method: 'POST', body: 'some text'}). agregore and hybrid supports multiple protocols for different networks.

this is all the protocol handler logic https://github.com/HybridWare/hybrid-browser/tree/main/app/protocols

in my example, you can have a single html page and do fetch('reticulum://identity/some/path/to/something') work along with fetch('ipfs://hash/some/data') and fetch('bt://hashorkey/to/something').

i will look into RNS, maybe i can have a local server with RNS and proxy all the http requests and interact with reticulum data that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants