Muhammad KaifKarachi, Pakistan
Muhammad Kaif

Back to all projects

AI Live Chat

A real-time chat app with friends, read receipts and AI reply suggestions in the language of the conversation.

For
Personal build: real-time messaging with an AI layer.
Built with
Next.js, Firebase, Firestore, Groq, GSAP
Proof
Smart replies follow the conversation: English, Urdu, Roman Urdu or Hinglish.
Live
live-chat-app-red.vercel.app
Code
GitHub
AI Live Chat conversation with AI smart reply suggestions in Roman Urdu

The problem

Most reply suggestions assume English. Here, people chat in Urdu, Roman Urdu and Hinglish, often in one conversation.

What I built

  • Sign-in with email and password or Google, through Firebase Authentication.
  • Private chat in real time with Firestore listeners.
  • Read receipts (blue ticks for seen), a typing indicator and online status.
  • Friends: requests, accept or reject, user search and notifications.
  • AI smart replies: Groq (LLaMA 3.3 70B) reads the conversation and suggests three replies in its language.
  • Local fallback suggestions when the AI request fails.

How it fits together

  1. Firebase Authemail or Google
  2. Firestoremessages, presence, friend requests
  3. Groq (LLaMA 3.3)three reply suggestions
  4. Fallbacklocal suggestions if the AI fails

Hard parts

Security rules and race conditions

Firestore security rules control who can read each chat, and the social and chat flows had race conditions I had to handle.

Replies in the right language

The suggestions follow the conversation's language: English, Urdu, Roman Urdu or Hinglish.

Results

Live at live-chat-app-red.vercel.app, code on GitHub.

Stack

Next.js 16, TypeScript, Firebase, Firestore, Groq API (LLaMA 3.3), Tailwind CSS v4, GSAP, Cloudinary

Screens