dat-ecosystem / dat

:floppy_disk: peer-to-peer sharing & live syncronization of files via command line
https://dat.foundation
BSD 3-Clause "New" or "Revised" License
8.24k stars 450 forks source link

PhoneGap / Browser Implementation? #904

Closed chadananda closed 4 years ago

chadananda commented 6 years ago

We have a educational hybrid app which manages lots of small audio files. We want to provide file sharing between students without hitting the (very expensive) internet.

Even in our browser interface with Chrome we have about 15GB of local storage to work with for caching our audio files.

I don't see any reference to browser or hybrid app implementation here. Has anyone worked on something like this? It seems like an obvious use-case for rural classrooms.

creationix commented 6 years ago

I'd love this as well. I'm currently working on some gateway/proxy/relay stuff where browsers talk to a localhost websocket server which then speaks the more interesting P2P protocols, but lets me keep all my crypto in the browser side. The websocket server is pretty much a dumb transport that can't read the actual data. It just knows enough to route the packets to where they need to go.

Something similar could be done for dat. Also projects like hypercored expose the dat replication protocol over websocket directly.

I'm interested to see more work in this direction, especially for mobile.

carloslfu commented 6 years ago

Hi @chadananda geat project!, there is a cordova / phonegap plugin that lets you run node.js libraries, see here. You can use dat-node and this cordova plugin for running Dat in an hybrd app. Hope it helps.

okdistribute commented 4 years ago

We recommend using https://github.com/JaneaSystems/nodejs-mobile-react-native, see https://github.com/digidem/mapeo-mobile for an example application