For the IPFS/WebRTC chat app, I have the chat UX requirements roughly identified.
A test of using IPFS-JS for WebRTC signaling has been previously created, but they ran into difficulties doing NAT traversal:
https://github.com/cretz/webrtc-ipfs-signaling
IPFS Issue 153 acknowledges the NAT traversal issue
https://github.com/ipfs/in-web-browsers/issues/153
For reference, here is info on WebRTC signaling protocol requirements https://www.html5rocks.com/en/tutorials/webrtc/infrastructure/
A working title for the project is IPSN (Inter-Planetary Social Network).
IPSN app would do the following:
- Perform normal IPFS daemon functions and data caching
- Identify other IPFS nodes that support IPSN (using the Identify message)
- Perform signaling to selected IPFS nodes in order to build an appropriate session description to be handed off to WebRTC for making and managing the datastream connection with the remote peer
- Perform handling of WebRTC datastream errors
An alternative to the forked browser concept would be to do the proof-of-concept in a Windows app, using IPFS-JS lib, to avoid the browser forking and to avoid install of the IPFS desktop app. The assumption is that deployment would be simplified if we can incorporate js-IPFS into the app. Issues currently include:
- Getting NAT traversal fully implemented into js-IPFS, so that it can pass the appropriate session description to WebRTC for P2P datastream connection
- Getting IPFS daemon fully operational in js-IPFS
- Allowing Identify message metadata such as IPSN protocol support, avatar, and user name.
In order to populate a Contacts list in the IPSN app, each IPSN app would need to include metadata with their IPFS client, passed in the Identify message, so that the other IPFS clients deployed as IPSN nodes would gracefully add that particular IPFS node into the IPSN contacts list. The UX would be much better if an IPSN app could create a user name, which appears in the remote IPSN client chat contact list.
Thatās the basic concept, single app that performs both IPFS functions and P2P chat. The exact approach is yet to be determined.
On Issue 3, is the IPFS Identify message overridable, such that once an IPSN protocol capability is detected, an Identify/push variant can be used to push extra metadata to compatible IPFS client nodes, containing custom metadata, such as avatar, user name, etc.?
Iām also looking for opinions/comments on best approach for a project with regard to app structure and which libraries to use.