Follow up on on my week project with repo

This is a repo I put together over the last week on and off. Considering I had never touched libp2p prior to, I’m fairly happy with the amount I’ve learned. The forum thread I was previously asking questions on, my early ignorance was very apparent even with the basic concepts at first, is here: Small Group Use Case(<10 Peers): Optimal Peer Discovery Protocol?

The repo: https://github.com/AustinFoss/p2pdnd

Essentially what my process boiled down to, after reading one pass through the docs I started going through the examples in js-libp2p and ended up modifying the libp2p-in-the-browser example.

Stripped the bootstrapped peers so that it was discovering peers purely over the wrtc-relay system and then started trying to attach it to a bare bones Vuex skeleton. I got a wrtc relay server running on a Vultr VPS instead of my localhost, but anyone using this would have to set that up themselves.

The only thing that doesn’t work 100% is if you have no IP to input, or make a mistake, and hit P2P you get stuck loading waiting for peers that’ll never connect and you need to refresh to start over.

So now I have the beginnings of a dynamic user interface for a game that can for now only connect to peers. Next is to build the content routing so the peers can start to share JSON data.

The end goal is to be able to play D&D together. If anyone has input on how I’ve glued these two things together this is the first project. Beginner mistakes, bad form, missing best practices, etc. The only thing I know I need to do more of for now is comment more.

Special thanks to @jacobheun for the help earlier in the week answering my very noob questions!

3 Likes