An offline-first, peer-to-peer emergency communication system built to communicate in disaster-prone areas where there is no connectivity to the internet.
Demo video
In areas hit with natural disasters tend to have no internet connectivity. Using this system, any number of devices (the rescue team or the civilians) can communicate with each other as long as they are connected to a same network via wifi/hotspot/ethernet LAN.
It uses libp2p-go library to establish peer-2-peer connections. Creates a Chat Room abstraction, allowing multiple users to communicate in the chat room. Requires a known connection string or a roomName to be connected to the specific room.
Defined in /cmd/disasternet/main.go like this.
roomFlag := flag.String("room", "chat-room", "name of chat room to join")
This shall be passed while running the node through the terminal(as of now)
It uses MDNS(Multicast DNS) to discover peers in the same LAN network. Its implementation is given in /cmd/internal/p2p/mdns.go
Brief explanation about MDNS
Multicast DNS (mDNS) is a computer networking protocol that resolves hostnames to IP addresses within small networks that do not include a local name server. It is a zero-configuration service, using essentially the same programming interfaces, packet formats and operating semantics as unicast Domain Name System (DNS).
## Files description - /cmd/disasternet/main.go :- Main file to create the host, discover peers and connect to them. - /cmd/disasternet/logs.txt :- Records all the messages,as a recovery backup. - /internal/p2p/host.go :- Creates the host on the specified port. - /internal/p2p/mdns.go :- MDNS implementation. - /internal/p2p/pubsub.go :- Implementation of ChatRoom and PubSub/topics by libp2p-go - /cmd/node/main.go :- File to initialise a host and connect to a peer address(used for testing).

npm install
npm run dev
go run main.go --port 9000 --same_string xyz --room myroom --nick Abhi --enable-http true
go run main.go --port 9001 --same_string xyz --room myroom --nick Aaradhya
Created by - Abhinav Jha
$ claude mcp add DisasterNet \
-- python -m otcore.mcp_server <graph>