A realtime, private, self-destructing chat application built using Next.js, Redis, and Upstash Realtime.
Create a temporary chat room, share the link with a friend, and start chatting instantly.
Rooms automatically expire and all messages are permanently deleted.
- Private chat rooms
- Self-destructing rooms (auto TTL)
- Realtime messaging using WebSockets
- Max 2 users per room
- Auto-generated anonymous usernames
- One-click room link copy
- Manual "destroy room" option
- Automatic cleanup using Redis TTL
- Next.js (App Router)
- React
- Upstash Redis
- Upstash Realtime
- Elysia (API routing)
- Zod (validation)
- Tailwind CSS
- React Query
- User creates a room
- A unique room ID is generated
- Redis stores room metadata with TTL
- Realtime connections are established
- Messages are broadcast instantly
- Room auto-destroys when TTL expires
- All messages are permanently deleted
git clone https://github.com/yourusername/realtime_chat.git
cd realtime_chatnpm installUPSTASH_REDIS_REST_URL=your_url
UPSTASH_REDIS_REST_TOKEN=your_token
NEXT_PUBLIC_BASE_URL=http://localhost:3000npm run dev