You might be interested in mesh [1], which is sort of what you're angling at. The creator did a video explaining it [2].
[1] https://github.com/chrispsn/mesh
[2] https://www.youtube.com/watch?v=CEG9pFNYBCI&t=499s