Frictionless, zero-persistence chat rooms with rich media support.
Live Demo β’ Architecture β’ Report a Bug β’ Contribute
- The Problem & Solution
- Target Use Cases
- Key Features
- Security & Privacy
- Architecture & Data Flow
- Tech Stack
- Getting Started
- Roadmap
- Contributing
- License
The Problem: Traditional messaging apps require account creation, phone numbers, or email verifications. They store your data indefinitely, making them bloated and unsuited for quick, disposable communication or fast file transfers between devices.
The Solution: TempChat is designed for the modern web. It provides zero-friction, ephemeral communication. Generate a room, share the OTP or QR code, exchange messages, code, and files, and watch the room self-destruct when the timer runs out. No tracking, no accounts, no trace.
- Cross-Device File Transfer: Quickly send a document or photo from your phone to your PC without using email or cloud drives.
- Developer Collaboration: Share code snippets with live syntax highlighting and execution previews without cluttering Slack or Discord.
- Privacy-First Conversations: Have secure, temporary discussions that are guaranteed to expire and delete from the database.
- Classrooms & Workshops: Create instant rooms for students or attendees to share links and files during a session.
- Instant Rooms: 1-click room creation with auto-generated QR codes and OTPs.
- Real-Time Sync: Ultra-low latency messaging powered by Server-Sent Events (SSE).
- Auto-Destruction: Built-in countdown timers. Once time is up, the room and its contents are purged.
- Chat Export: Download your conversation history locally before the room expires.
- Versatile Uploads: Support for Images, Videos, Audio, and Documents.
- Seamless UX: Drag-and-drop zones, real-time upload progress bars, and rich media previews.
- Cloudflare Edge Storage: Lightning-fast global file delivery via Cloudflare R2.
- GitHub Flavored Markdown (GFM): Full support for tables, blockquotes, lists, and links.
- Code Execution: Write and run JavaScript/TypeScript directly inside the chat interface.
- Syntax Highlighting: Auto-detected language formatting for clean, readable code sharing.
TempChat treats user privacy as a first-class citizen.
| Feature | Description |
|---|---|
| No Authentication | Users are completely anonymous. No emails, passwords, or OAuth required. |
| Ephemeral Data | Database records (messages, rooms) are designed to be temporary and are purged after the session expires. |
| Secure Assets | Uploaded files via R2 are isolated to specific chat sessions. |
| XSS Protection | Markdown rendering is strictly sanitized to prevent Cross-Site Scripting attacks. |
TempChat leverages a modern, serverless architecture optimized for edge delivery and real-time synchronization.
- Client Layer (Next.js + React): Handles the UI, markdown parsing, and local state management.
- Transport Layer (SSE): Instead of heavy WebSockets, TempChat uses lightweight Server-Sent Events to push database updates directly to connected clients efficiently.
- Data Layer (Neon Postgres + Drizzle ORM): Serverless PostgreSQL handles room states and message history with minimal cold starts.
- Storage Layer (Cloudflare R2): S3-compatible edge storage handles heavy media assets to keep database costs low and download speeds high.
| Category | Technology | Purpose |
|---|---|---|
| Frontend | Next.js 14, React 18 | App Router, Server Components, UI rendering |
| Styling | Tailwind CSS, shadcn/ui | Utility-first styling and accessible component primitives |
| Database | Neon PostgreSQL | Serverless, scalable relational database |
| ORM | Drizzle ORM | Type-safe database queries and migrations |
| Storage | Cloudflare R2 | High-performance, zero-egress-fee object storage |
| Markdown | react-markdown, remark-gfm |
Secure, rich text and code block rendering |
- Node.js v18 or higher
- Git
Clone the repository and install dependencies:
git clone [https://github.com/Rohithdgrr/Temp-chat.git](https://github.com/Rohithdgrr/Temp-chat.git)
cd Temp-chat
npm install