geut / building-up-on-dat

Want to know how to create a decentralized app?
https://building-up-on-dat.hashbase.io
33 stars 0 forks source link

will `gpm` work in traditional browsers too? #9

Open serapath opened 5 years ago

serapath commented 5 years ago
  1. if not yet, but if that's planned, is there a document that would describe how that would work?
  2. if not yet and there are also no plans - is that something that would be interesting to think about?
  3. or at this moment that's not feasible or desirable for certain reasons?
dpaez commented 5 years ago

Hi @serapath 👋 First of all thanks for reaching out!

gpm was made with the goal in mind of showing how to create some sort of service using dat-node. It should work as an example app. This whole repo, in fact, it is about that. Learn about dat's top level modules using some example apps.

  1. if not yet, but if that's planned, is there a document that would describe how that would work?

Was not planned so there isn't a doc.

  1. if not yet and there are also no plans - is that something that would be interesting to think about?

It would be interesting, indeed. Can you tell me more about your use case?

  1. or at this moment that's not feasible or desirable for certain reasons?

I don't think so. Tell me about your idea, if gpm is not the correct place maybe we can bootstrap something different. 👍

serapath commented 5 years ago

so, I'm building something that is "marketing labeled" as p2p search engine for solidity source code and it's using dat.

  1. You can search for code snippets to find source code which matches the snippet.
  2. you can then open it in an in-browser editor and deploy it from there to the ethereum blockchain
  3. you then get an auto-generated form (maybe think "swagger") to interact with the deployed contract

...we plan to allow users to customize this initial autogenerated form, which will then become a static website they can host on any web server to interact with the smart contract on the blockchain - given they have a wallet (e.g. like https://metamask.io)

Now - we would love to upgrade our usage of dat, so we can allow users to change/improve their frontend code with modules they choose to import/require ...all from within the browser.

dpaez commented 5 years ago

@serapath I was left wondering about this (nice use case). gpm was trying to show/prove/sketch how a decentralized package manager could look like. The way it works is like this, you have a place where you store modules (npm modules) and clients that can download and at the same time seed and hence become some sort of copy of the original registry.

You can try to extract the code of the commands, removing the oclif parts and the remain code can be browserified (or webpack'd). But according what you mention, you will also need an execution container inside the browser, similar to codepen/glitch/others, and that part is out of gpm scope.

Hope this was helpful somehow, feel free to write a line to contact@geutstudio.com if you need more in-depth assistance.

serapath commented 5 years ago

makes sense. iframes come to mind when you say "execution container". still - i feel that all of this only makes sense if it is a joint effort in the sense, that many people rally behind the same practice and adopt it. I don't know how to get there and just assume it's not ready, because once it is, i expect popular names to push it - that's for sure not me :D