That is being done today at https://geogram.radio

Each device (cellphone/laptop) is a server. They connect to preferred server stations that are used for discovering other peers. There are things like common chat rooms on the station servers but personal messages are completely p2p using webrtc.

There are other apps there, for example to host own websites or blogs and other things you'd expect from modern usage. Mesh is done today using cheap ESP32 devices (3 euros each).

It is a work in progress, the main point is that it can exchange data even outside the internet and use radio connections.

Nice project. P2P is not the way to go for DMs though. Both users and servers have to stay anonymous if we want to defeat surveillance and censorship long-term.

Ideally, nobody except a single server node of your choice (which is probably the one you self-host) is able to match your Nostr identity to your real IP address. Instead, IP-like-identifiers (like in Yggdrasil Network) should replace IP addresses when interfacing with other nodes. Server hosts would not share their traditional IP when inviting new people to connect to it, only their IP-like-identifier. The invited person can pick/host their own trusted server node as well, and that trusted server would relay that user's connection to your server, which they don't trust. Everyone has a trusted server that represents them.

The trusted server and the untrusted server should not have eachother's IPs during this relay process, either. Instead, the data should be bounced through some other server first, who may bounce it again, and again. The actual underlying path the data travels between the two servers which represent the two users should involve many onion-routed bounces that is not fully known to any server or user. The only situation where a device needs to know another device's IP is when two server nodes establish a reciprocal routing agreement and exchange IPs over an encrypted tunnel ("if I bounce X amount of traffic for you, you will bounce X amount of traffic for me in the future", it's a bandwidth transaction). Such negotiations should be made by querying random addresses or established manually (early on, when the network is small and sparse). This is where offline meshes can help. An ESP32 mesh doesn't have nearly enough capacity to handle all the messages and multimedia flying around, but they can be an alternative pathway to negotiate routing agreements. When the network is dense enough, it will be difficult to pin down your IP, even for state-level actors. And they certainly won't be able to surveil many people at once because even honeypotting one would be incredibly expensive.

Also consider encapsulating all of the Internet-routed traffic in HTTPS using only port 443 (like this: https://www.softether.org/1-features/1._Ultimate_Powerful_VP...). It needs to blend in with traditional web traffic so that no infra operator can identify/block/throttle it.

Also make sure to stay anonymous while developing this so you can't be sued or prosecuted.