Zero-knowledge, ephemeral group chat for the moment.
TempChat is an open-source, short-lived chat application designed for immediate, real-world social interactions. It facilitates secure group communication without requiring phone numbers, app downloads, or permanent data footprints.
- Zero-Knowledge: Messages are encrypted in your browser. We literally cannot read them.
- Ephemeral: Rooms and messages vanish forever after a set time (e.g., 3 hours).
- No Friction: No accounts, no sign-ups, no app store. Just a link or a QR code.
TempChat follows a strict zero-knowledge security model. All cryptographic operations happen entirely in the browser via the Web Crypto API.
When a room is created, the browser generates an ECDSA P-384 keypair locally.
- Private Key: Embedded in the room's URL
#hash(fragment). Since URL fragments are never sent to the server in HTTP requests, the private key never leaves your device. - Public Key: Sent to the server once (as a JWK) to allow verification of your messages.
Before any message or metadata (like display names) leaves your device:
- Key Derivation: An AES-256-GCM encryption key is derived deterministically from the private key using HKDF-SHA-384 (with a fixed salt and info).
- Encryption: Plaintext is encrypted to ciphertext using the derived AES-GCM key.
- Authentication: An ECDSA signature is generated for each request to verify the sender's identity without revealing their private key.
The backend (Go/Gin) acts as a "blind" relay:
- Opaque Storage: It only sees and stores scrambled ciphertext blobs in Redis.
- No Backdoors: There is no master key and no way for the server to derive the encryption keys.
- Automatic Purge: Every message and room metadata entry has a TTL. When it expires, it is permanently purged from memory with no backups or archives.
tempchat/
├── webapp/ # React + Vite + TypeScript PWA → app.tempchat.app
│ └── .env.example
├── backend/ # Go + Gin + coder/websocket → api.tempchat.app
│ ├── .env.example
│ └── .air.toml # air hot-reload config
├── site/ # Plain HTML/CSS/JS → tempchat.app
├── scripts/
│ └── dev.sh # dev startup script
├── docker-compose.dev.yml # Redis + RedisInsight (dev only)
├── Makefile
└── docs/
└── design/ # Architecture & API specs
| Tool | Purpose |
|---|---|
| Go 1.22+ | Backend |
| Node.js 20+ | Webapp |
| Docker | Dev infrastructure (Redis) |
| air | Go hot-reload (go install github.com/air-verse/air@latest) |
| Firebase CLI | Deployment (npm i -g firebase-tools) |
cp backend/.env.example backend/.env
cp webapp/.env.example webapp/.envcd webapp && npm installmake devThis single command:
- Starts Redis + RedisInsight via Docker Compose (if not already running)
- Starts the Go backend with
air(hot-reload on file changes) - Starts the Vite dev server (HMR)
- Streams all logs to the same terminal —
Ctrl+Cstops everything cleanly
| Service | URL |
|---|---|
| Webapp (Vite HMR) | http://localhost:5173 |
| Backend (Go/Gin) | http://localhost:8080 |
| Redis | localhost:6379 |
| RedisInsight | http://localhost:5540 |
To start/stop infrastructure only (Redis + RedisInsight):
make dev-up
make dev-down| Service | URL | Platform |
|---|---|---|
| Webapp | https://app.tempchat.app | Firebase Hosting |
| Backend | https://api.tempchat.app | DigitalOcean Droplet (Singapore) |
| Site | https://tempchat.app | Firebase Hosting |
Both app.tempchat.app and tempchat.app are served from the same Firebase project using multi-site Hosting targets.
make deploy-webapp # builds webapp → deploys to app.tempchat.app
make deploy-site # deploys site/ → tempchat.app
make build-backend # compiles Go binary → backend/bin/serverFor backend deployment, copy backend/bin/server to the DigitalOcean droplet and restart the systemd service. See docs/design/techstack_draft.md for the full server setup guide.
make dev Start full dev environment (infra + backend + webapp)
make dev-up Start Redis + RedisInsight only
make dev-down Stop Redis + RedisInsight
make webapp-build Build webapp for production
make deploy-webapp Build + deploy webapp to Firebase (app.tempchat.app)
make deploy-site Deploy site to Firebase (tempchat.app)
make build-backend Compile Go binary
make help Show this list
docs/design/system_design.md— Product overview, security architecture, business rulesdocs/design/api_design.md— REST endpoints & WebSocket eventsdocs/design/redis_design.md— Redis key schema, TTL strategy, boost logicdocs/design/techstack_draft.md— Tech stack, infra guide, Nginx config, TLSdocs/design/user_interaction_flows.md— Mobile UX flows