Skip to content
bacloud22Public

About

Similar to Slowly phone app on the web

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Slow Mail

A tiny WebRTC experiment for sending letters instead of instant messages. A sent letter travels across a Leaflet map for a computed duration; both peers see the same marker progress, and the body stays sealed in the UI until arrival.

Letters no longer appear by default on first load. After a letter is delivered, click its card in the Inbox to open and read it.

Run

Install dependencies once:

cd server && npm install
cd ../client && npm install

Start the local signaling relay:

cd server
npm run dev

Start the client:

cd client
npm run dev

Open the client in two browser windows. Click Host in one window, copy the same room code into the other, then click Join. Wait until both show p2p connected before sending a letter.

Deploy on Vercel

This repo includes vercel.json so Vercel can build and host the Vite client from the repo root:

  • Build command: npm run build
  • Output directory: client/dist

On Vercel, the client uses the public PeerJS broker for room signaling. That avoids the serverless limitation where each WebSocket isolate keeps its own in-memory room map, so Host and Join never meet.

Local development still uses the standalone relay at ws://localhost:8787. You can force a custom relay anywhere with VITE_SIGNALING_URL in client/.env.

The optional /api/ws function remains available if you point VITE_SIGNALING_URL at it, but it only works reliably when both peers land on the same Fluid compute instance (or when you run server/ as a long-lived process).

Notes

Letter payloads travel through the peer data channel after the connection is established. The delayed-reading behavior in this prototype is enforced by the UI rather than hard cryptography.

About

Similar to Slowly phone app on the web

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages