What would be the best tech stack for creating a nostr client that can be built and run consistently on any OS, without an internet connection? Bonus points for andoid/ios. Static html file? Zig? C?
Login to reply
Replies (33)
is this a trick question?
web browser stack on anything and coracle
Not coracle, it relies on a ton of npm packages, including to compile svelte. If all you had was the repo you'd be sunk.
React Native has been my go to for simple apps in both OSs for years now. It's great for simple things and purely based on JavaScript, which almost everybody can maintain.
Flutter, but its not very good for web. Works nice on android/ios/windows/linux
Probably too early, but https://socketsupply.co/ looks really promising.
I’m watching this project
i like rust + egui + nostrdb. runs on ios, android, linux, macos, windows. its built on wgpu so its hardware accelerated on all platforms. offline first thanks to nostrdb.
I would like to test
for the multi OS desktop scenario.
If I'm not wrong, @gsovereignty has some experience with this.
GitHub
GitHub - wailsapp/wails: Create beautiful applications using Go
Create beautiful applications using Go. Contribute to wailsapp/wails development by creating an account on GitHub.
Kotlin can transpile to JS and Swift, so that could do the trick.
Do you think that nostrdb could be used in Flutter?
Does dart have C ffi ?
lololol
yeh that's a big downside to the javascript
but there's not any way to do without those deps on any language i know of so it's a pretty harsh and tiny set of options that are left
pretty much tothing tbh
if there was a Go based one with the vendor folder that would satisfy it if that had a UI
This is promising. Is this the stack you're going to use for the new damus?
I'm always suspicious of frameworks that try to merge front and back ends, but maybe this is different? I see there's no embedded browser, which means they're interpreting javascript some other way. Strange/interesting.
yes, i have it running on a $150 android phone at 0.5ms render time per frame. Also running on my pixel phone, samsung tablet, macos/linux desktop (notedeck). Linux server (notecrumbs). Haven’t tried ios yet but should work.
Beautiful. Is this notedeck or something else?
notedeck is just damus android. It’s the same codebase. When on a tablet it looks like notedeck, on phones it’s a single panel notedeck.
Got a link to the new thing?
https://github.com/damus-io/android
Still very early prototype. Been working on refining nostrdb and the nostrdb rust bindings so most of the work happens in there. I just want rust networking code to dump into nostrdb and it does all the hard work. Even note content parsing. The egui UI is just going to subscribe to nostrdb filters and talk to the local db. Anytime new notes are written the local subscriptions will get triggered. Thats the next thing im working on since I just finished queries and subscriptions in nostrdb.
Rad, excited to see how it turns out.
maybe you colud distribute the node_modules?
That would definitely be an option. I'm thinking of maybe creating a complete disk image with all dependencies already downloaded. Then it would be possible to change the source and re-build. How hard is this with Go?
it's built in just run "go mod vendor" and it puts all the dependencies inside a tree inside the "vendor" folder at the root (next to the go.mod)
From the docs:
> Wails uses a purpose built library for handling native elements such as Window, Menus, Dialogs, etc, so you can build good-looking, feature rich desktop applications.
> It does not embed a browser, so it delivers a small runtime. Instead, it reuses the native rendering engine for the platform. On Windows, this is the new Microsoft Webview2 library, built on Chromium.
So it should use the OS webview.
A web stack can be a complex payload for an app and have a wider attack surface, however it speeds up the UI development a lot. Of course you alredy know that :)
I like that
I'll take a look, seems promising
Oh yes, I have this one on my to-check list.
This is a nostr project that uses it: 
GitHub
GitHub - Galaxoid-Labs/nostr-chat-fyne: An experimental chat client written with Fyne. Its a work in progress based on kind 9 ideas
An experimental chat client written with Fyne. Its a work in progress based on kind 9 ideas - Galaxoid-Labs/nostr-chat-fyne
there's lots to like about Go except for the lack of GUI tooling
Ah, I see, that makes sense. I don't love that, but it's a hard tool to drop
Interesting! 👀 Why too early?
I'll be making one in #C as soon as I get some time (TM). #Zig is a close second, deliberating that.
noice
