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?

Reply to this note

Please Login to reply.

Discussion

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.

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

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)

I like that

there's lots to like about Go except for the lack of GUI tooling

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

Interesting! 👀 Why too early?

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.

Do you think that nostrdb could be used in Flutter?

Does dart have C ffi ?

This is promising. Is this the stack you're going to use for the new damus?

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.

noice

I would like to test https://github.com/wailsapp/wails for the multi OS desktop scenario.

If I'm not wrong, nostr:npub1mygerccwqpzyh9pvp6pv44rskv40zutkfs38t0hqhkvnwlhagp6s3psn5p has some experience with this.

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.

Also look at https://fyne.io/

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: https://github.com/Galaxoid-Labs/nostr-chat-fyne

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 :)

Ah, I see, that makes sense. I don't love that, but it's a hard tool to drop

Kotlin can transpile to JS and Swift, so that could do the trick.

I'll be making one in #C as soon as I get some time (TM). #Zig is a close second, deliberating that.