Projects/Real-Time Chat with Socket Programming
Real-Time Chat with Socket Programming

Real-Time Chat with Socket Programming

Socket.IO chat app with personal DMs, group rooms, and a Groq-powered AI assistant tab — all over one WebSocket connection.

Next.jsTypeScriptTailwind CSSFastAPISocket.IOGroqLlama

About this project

Computer Networks term project. The app supports three tabs over a single Socket.IO connection: direct messages between any two users, group chats with create/join lifecycle, and an AI tab that proxies to Groq's Llama 3.3 70B endpoint. The backend is FastAPI with python-socketio (ASGI), keeping users and rooms in process memory rather than persisting to a database — a deliberate scope decision so the project stayed focused on socket events rather than DB plumbing. Images are sent as base64 data URLs over the WebSocket, and unread badges are tracked per-conversation on the client.

  • Three conversation modes (DM / group / AI) multiplexed over one Socket.IO connection
  • FastAPI + python-socketio ASGI mount, in-memory user/room state
  • AI tab proxies to Groq Llama 3.3 70B with per-user routing
  • Base64 image messages, unread-badge tracking, duplicate-username protection

Key features

Direct messages

1-to-1 between users

Group rooms

Create + join lifecycle

AI assistant

Groq Llama 3.3 70B

Image sharing

Base64 over WebSocket


Screenshots

Group chat room dark mode

AI Chat

Private Chat


Tech stack

Next.js
TypeScript
Tailwind CSS
FastAPI
Socket.IO
Groq
Llama

Other projects