How sandeeprage/momentstamp works
Momentstamp is a private, browser-based photobooth for two people in different places. A host creates a booth and shares an expiring invite; guests request entry, and the host admits one. The participants connect peer-to-peer, take portraits, and create and download matching photo strips locally. The Worker and each booth’s Durable Object coordinate room membership and signaling, while the browser handles camera access, photo transfer, styling, and export. The README documents the broader workflow; some UI and API details are not shown in the excerpts.
Main entry points: app.js Booth interface · index.js Booth room · strip.js Strip renderer
Components 16
Browser experience
- Booth interface
public/app.js - Invite entry
public/app.js - Participant browser
Room coordination
- Worker API
src/index.js - Booth room
src/index.js - Room state
src/index.js
Live media
- Camera previews
public/app.js - Peer connection
public/app.js - Portrait capture
public/app.js - Cloudflare TURN
Photo strip
- Strip composition
public/app.js - Strip styling
public/app.js - Strip renderer
public/strip.js - Local downloads
public/app.js
Other components
- Host
- Guest
Connections 21
- Host → Booth interface: creates booth
README.md - Guest → Invite entry: opens invite
README.md - Invite entry → Booth interface: enters booth
public/app.js - Booth interface → Worker API: requests room
public/app.js - Worker API → Booth room: coordinates room
README.md - Booth room → Room state: reads and writes
src/index.js - Host → Booth room: approves guest
README.md - Booth room → Booth interface: provides room events
README.md - Booth interface → Camera previews: requests camera
public/app.js - Camera previews → Peer connection: supplies previews
README.md - Booth interface → Worker API: requests ICE servers
src/index.js - Worker API → Cloudflare TURN: fetches credentials
src/index.js - Peer connection → Booth room: sends signaling
README.md - Peer connection → Portrait capture: exchanges photos
README.md - Portrait capture → Strip composition: provides portraits
public/app.js - Host → Strip styling: styles strip
README.md - Strip styling → Strip renderer: renders style
public/app.js - Strip renderer → Strip composition: composes locally
public/app.js - Strip composition → Local downloads: exports image
README.md - Strip styling → Peer connection: shares changes
README.md - Local downloads → Participant browser: downloads locally
README.md