nishant.
← All projects

ChatVerse

Real-time chat with end-to-end encryption and AI-powered rooms.

Next.js 16React 19Express 5FirebaseECDH/AES-GCMAI APIs

What it is

ChatVerse is a real-time chat platform with end-to-end encryption baked in. Two users exchange ECDH public keys, derive a shared secret, and every message is encrypted with AES-GCM before it ever hits the server. The server stores ciphertext; only the participants can read it.

Why I built it

I wanted to understand E2E encryption by implementing it, not just reading about it. Building Signal-style key exchange from scratch — with real failure modes like lost keys, multi-device sessions, and message ordering — teaches you things a blog post never can.

Architecture highlights

  • ECDH key exchange over the P-256 curve via Web Crypto.
  • AES-GCM for authenticated encryption with per-message nonces.
  • Firebase for realtime message delivery (ciphertext only).
  • Express 5 API for auth and key registry.
  • AI smart rooms — opt-in rooms where an LLM joins the conversation.

What I learned

That "just use a library" is the right answer in production, but doing it once by hand makes the libraries legible. Also: key rotation and multi-device sync are where 80% of the real complexity lives — encryption is the easy part.