My funding application to NLnet: A website to run webxdc apps

Thanks to the encouragement from @hpk and other people working on Delta Chat, I submitted my first ever funding application to the NGI Zero Entrust program (NLnet is a major source of funding for Delta Chat btw (see FAQ - Delta Chat)). I’m writing this mainly to give the same encouragement to others not closely familiar with this “free money glitch”, and, well, to keep you posted on what’s going on with the idea.

The idea is related to Are there any Webxdc runtime which works directly in browser?.

As their manual says, it really is quite simple. Took me just ~2 hours to make the doc (choosing and forming the idea itself aside).
As this is my first time, I’m not expecting much. Just shooting my shot, as they say, to see what happens.

If you want to share feedback, you can set aside your politeness and go ahead!


Abstract: Can you explain the whole project and its expected outcome(s).

A web store for webxdc apps has recently been released.
What I want to do is create another website capable of running any (or almost any) webxdc app.

The main purpose of this website is to be integrated with the above-mentioned web store. The web store would have a “try online” link for each webxdc app that would point you to this website and would automatically load the webxdc app in question to let the user play around with the app before downloading it (and perhaps even before downloading Delta Chat or other software with a webxdc runtime), which should make it much easier to grasp the concept of webxdc (“just web apps”) for both potential developers and users.

The first iteration of the website (which is what this proposal covers) shall be capable of simulating multi-user interaction by opening several tabs in the same browser.
If there is time left, I will start working on integrating true P2P communication with WebRTC, based on a prototype of mine called webxdc-x-web.

Have you been involved with projects or organisations relevant to this project before? And if so, can you tell us a bit about your contributions?

I have been working on webxdc closely with Delta Chat people part-time for almost a year now. I have created and ported several apps to webxdc, found and helped fix a couple of security vulnerabilities related to the Delta Chat implementation of webxdc, created several libraries to ease the development of webxdc apps and in general I’m constantly experimenting with the concept.
In fact, I already did some work towards making such a website, in cooperation with GitHub - DavidSM100/Web-App: Open any web app easily with the browser

Requested Amount

€ 6450

Explain what the requested budget will be used for?

I estimate the project to take ~15 8-hour working days, taking a single person with a rate of 430 EUR per such a day.

Compare your own project with existing or historical efforts.

GitHub - Simon-Laux/ZHV: ZHV - Zipped HTML Viewer (for https://github.com/adbenitez/simplebot/) - an Android app to open zipped HTML. It’s Android, so it cannot run on the web
Files · master · gold holk / sword-xdc · GitLab - a prototype of such an app, though with not enough app isolation (apps can read each other’s data and interfere with each other), and there is no integration with the web store.

Surprisingly, I have not managed to find any more “web apps to run web apps” even though this seems like an obvious path for exploration of ServiceWorkers.

Another alternative is manually deploying each webxdc app on something like GitHub / Codeberg Pages. Some apps, like Calendar already have an online-demo deployed, however, it is infeasible to ensure for each existing and future app. Some apps require a build step, some do not work with non-root paths, some might not even be posted online because their developers haven’t done so.

What are significant technical challenges you expect to solve during the project, if any?)

The hardest part personally for me is going to be setting up DNS in such a way that every app can be origin-isolated. The idea is to ensure that every app gets its own on-the-fly generated subdomain, but each subdomain would serve the same data (the code of the website). After getting loaded, it would download an .xdc file and “replace” itself with its content using a service worker. Thus each webxdc app instance would have its own subdomain.
However, a single domain can also be used, but we’d need to clear the data of the older apps.

Describe the ecosystem of the project, and how you will engage with relevant actors and promote the outcomes?

As I said, I am in close contact with Delta Chat people (I guess I’m one of them myself?), the people who are responsible for the webxdc.org website. Given that they have already been posting online demos for separate apps, I think it’s going to be easy to convince them to add the “try online” button on the web store.

And even if they refuse to, the website is quite useful by itself. I can host it by myself without requiring anyone’s involvement.

3 Likes

GitHub - Simon-Laux/ZHV: ZHV - Zipped HTML Viewer (for https://github.com/adbenitez/simplebot/) - an Android app to open zipped HTML.

Fun fact: you can view this as predecessor to webxdc :wink: @adbenitez used it to make html interfaces for his bots before we even had the full message html view integrated into deltachat.

Of course you are!

If it works well enough, then I’m all for it.

2 Likes

How could you isolate apps in service worker?
Are you going to provide fake localStorage and indexedDB?
Fake localStorage is relative easy, but indexedDB has a large of api.
(as I said in Are there any Webxdc runtime which works directly in browser? - #3 by gholk )

In my opinion, the runtime should be able to export the save data, so user can move apps and data to other devices.
It is also easy for localStorage and hard for indexedDB.

I am interested in how will you deal with these.

Firstly, @DavidSM100 came up with an idea of creating a subdomain for each separate app. This is how GitHub - DavidSM100/Web-App: Open any web app easily with the browser works. And this is what I describe here:

Secondly, for purely demo purposes (where you would use the website to check out the apps and not actually use them for real stuff) this might not be required as we can just clear everything before loading a new app.

As @WofWca says every app gets a new subdomain meaning a different URL (origin), since local bases (localStorage, indexedDB, etc) are already isolated to its origin, then every app get all local bases isolated.
Now I had some ideas on how to even managa to get this working even without having to worry about DNSs things.
And also will probably work even on GitHub/codeberg pages.
Also I’m thinking on making every app a progressive web app so they will be more like nativas apps of the system.

2 Likes

Regarding to this, perhaps you are right and will be an interesting thing to do, right now it is not a priority for me, but perhaps in the future I will come up with some solution for this.

Hey! News: I got an email saying that the proposal was rejected.

They didn’t point out anything specific wrong with it. They said the competition is tough and the fact that they didn’t approve the request doesn’t mean they don’t see the value of the project. They said they’ll keep the project is in the back of their head and come back to it if an opportunity arises.

Pity this didn’t work out … there are some questions i’d have as a reviewer. Let’s maybe see to chat a bit about the idea soon … maybe a DNS setup is not so hard (we are doing this also with chatmail).

sidenote: If you submit another time please feel free to send me drafts for comments. Happy to review/help any propoals if they have a relation to DC or webxdc or chatmail. Did this with three other proposals and they all got to the second round (they haven’t been announced here – i think the proposers prefer to only announce their proposal when they are finally accepted).

1 Like

Good to hear!

Thanks, I’ll keep that in mind!