p2p-webapp makes building peer-to-peer web applications dramatically simpler. It handles the complexity of IPFS and libp2p networking, exposing a clean JavaScript API that any web developer can use.
The tool bundles a P2P web app into a double-clickable binary that runs as-is (no extracting) and serves up the site. You can extract the bundled site and/or create new binaries that bundle different sites.
The binary runs a web server that serves the web app and manages one or more libp2p peers. Your browser app communicates with these peers via WebSocket using a simple JSON-RPC protocol.
All you need to develop P2P webapps is the TypeScript client library that comes bundled in the binary. Apps can publish and subscribe with GossipSub topics and use libp2p protocols to send messages to other peers.
The source is also suitable for rapid mods with spec-driven AI coding.
Try it:
./p2p-webapp # Run the bundled demo
./p2p-webapp cp 'client.*' . # Copy client library to your project
GitHub: GitHub - zot/p2p-webapp: Single command to launch an IPFS webapp