Anonymous, registration-free web chat for exactly two participants.
Built for quick private conversations with ephemeral rooms, one-time invite links, and automatic data cleanup.
- One-click room creation
- One-time invite link for the second participant
- Strict 2-user room limit
- Real-time messaging with Socket.IO
- File and image sharing
- Paste image from clipboard
- Reply-to-message support
- Full-size image preview modal
- Typing indicator
- Automatic room termination when one participant leaves
- Automatic cleanup of chat history and uploaded files
- User A creates a room.
- The server returns:
hostUrlfor User AinviteUrlfor User B
- User B joins using the one-time invite.
- The room becomes active for two users only.
- If either user leaves/disconnects, the room is destroyed.
- Messages and temporary uploads are removed from memory/disk.
- Backend: Node.js, Express, Socket.IO, Multer
- Frontend: Vanilla HTML/CSS/JS
- Public Access: Cloudflare Tunnel (
trycloudflare.com)
.
├─ public/ # Frontend (landing + chat UI)
├─ scripts/ # Utility scripts (e.g. free-port)
├─ tests/ # Smoke tests
├─ uploads/ # Temporary uploaded files (auto-cleaned)
├─ room-manager.js # Room lifecycle + state machine logic
├─ server.js # HTTP + socket transport layer
├─ package.json
└─ README.md
Room lifecycle is strictly controlled server-side:
CREATED -> WAITING_SECOND -> ACTIVE -> DESTROYED
The server is the only authority for:
- joining
- leaving
- destroying
- TTL expiration
npm installnpm startOpen: http://localhost:3000
npm run start:cleanStart with Cloudflare Tunnel:
npm run start:publicThe console will print:
Public tunnel URL: https://...trycloudflare.com
Use that URL to access/share the app.
If port 3000 is busy:
npm run start:public:cleannpm start- Start server on local network.npm run dev- Same as start (simple dev mode).npm run start:clean- Free port 3000 and start server.npm run start:public- Start server with Cloudflare public tunnel.npm run start:public:clean- Free port 3000 and start public mode.npm run test:smoke- Run basic end-to-end smoke checks.
Implemented protections include:
- Anti-cache headers (
no-store,no-cache,Expires: 0) - Security headers (
CSP,X-Frame-Options,nosniff, etc.) - Ephemeral in-memory message history
- Automatic room TTL cleanup
- Temporary file deletion on room destruction
- URL token removal from browser address bar after join
Note: No web app can fully erase a user's browser history/downloads on their device.
Run smoke tests:
npm run test:smokeChecks include:
- two participants can join
- third participant is blocked
- room is destroyed on leave
You are likely in the wrong folder or dependencies are missing.
npm installtrycloudflare URLs are temporary.
Restart public mode and use the new URL printed in console.
Ensure you are running the latest code and dependencies:
npm install
npm run start:publicISC