Web apps

A web app without a server? WebRTC and peer-to-peer in our Planning Poker

Every real-time app brings to mind a server that holds state and relays messages. It isn't always needed. Here is how we rebuilt our Planning Poker from a classic backend into a peer-to-peer WebRTC architecture, when this approach makes sense and where its limits are.

The short answer

A web app can run without its own application server when data is short-lived and belongs to one session – a meeting room, a game, a shared board for the length of a workshop. Browsers then connect directly over WebRTC, and one of them (for example the host's) acts as the server. All that's needed to set up the connection is a signalling mechanism, which can use public relays. You only host static files.

If data has to be stored, reported on or protected with permissions, a server is needed.

How WebRTC works, briefly

WebRTC is a standard built into browsers that lets you send data, audio and video directly between users. For two browsers to connect, they first exchange "offers" with network information – this is called signalling. Once the connection is set up, data flows straight from one browser to the other, encrypted.

Signalling is usually the smallest part of the system, but someone has to provide it: your own WebSocket server, a cloud service or – as in our case – public relay networks.

An example: Planning Poker

Planning Poker is our free estimation tool for agile teams. The first version had a Node.js backend: the server kept room state and relayed votes. It worked, but a server costs money every month and needs monitoring and updates – and the tool is free.

We rebuilt it like this:

  1. The host's browser is the server. It keeps the room state – players, votes, whether the cards are revealed – and sends participants a snapshot of the room after every change.
  2. Guests only send requests. "Vote", "new round", "leave" – and the host decides what happens. No conflicts, no diverging states.
  3. Signalling through public networks. The Trystero library exchanges WebRTC offers through Nostr and MQTT networks. No game data passes through the relays – only the information needed to connect.
  4. Two networks at once. Every browser joins through both simultaneously, so an outage of one network or of individual relays doesn't interrupt the meeting.
  5. Survives a reload. The room state is saved in the host's browser storage. After a tab reload the room comes back and guests reconnect automatically.

The result: a team starts online planning poker with one link and no accounts, and we only host static HTML.

Advantages of a peer-to-peer architecture

  • Near-zero infrastructure cost – no application server and no database.
  • Privacy – data never reaches a server and disappears when the session ends.
  • Less to maintain – no server to update, scale and monitor.
  • Low latency – data flows directly between participants.

Limits you need to know about

LimitWhat to do about it
Strict corporate networks block direct connectionsa TURN server that relays traffic when a direct connection fails
State lives only with the hostwhen the host closes the tab for good, the session ends – this must be communicated clearly
No history or reportsif they're needed, the data has to reach a server anyway
Large groupsin a "host sends to everyone" model the number of connections grows with the number of people; for hundreds of participants a server is better
Trusting the clientthe logic runs in the host's browser, so it doesn't suit anything someone would have an interest in cheating

When to choose P2P and when a classic backend

P2P makes sense for meeting-length tools (estimation, voting, quizzes, retrospectives), simple multiplayer games, video calls in small groups and sending files between devices.

A backend is needed when the app has accounts and permissions, stores history, generates reports, takes payments or processes data whose integrity matters. We build such web applications in Node.js and NestJS – often with real-time parts over WebSockets.

The best solutions are often hybrid: a server for accounts and data, and WebRTC for what happens live.

Related services: web apps, custom software.

FAQ

Frequently asked questions

Is an app without a server secure?

WebRTC connections are encrypted and data never reaches a server. The weak spot is trust in the participants' browsers – which is why this architecture doesn't suit payments or data someone might want to forge.

How much does it cost to run a P2P app?

Often only as much as hosting a static website. An extra cost appears when a TURN server is needed for users on strict networks.

Can you convert our app to an architecture without a backend?

If its data is session-based – yes, and it can cut maintenance costs significantly. We start by analysing which parts really need a server and which don't. More about such projects on the custom software development page.

Related articles

All articles

FINALContact

Got a question? Get in touch

A few sentences about your idea, a rough deadline and budget are enough to start. The first conversation and the initial quote are free and non-binding.

biuro@app4mobile.pl
Get in touch