TalkBox is an open-source real-time chat application built with the MERN stack and Socket.IO. It provides user registration, JWT-based authentication, private messaging, and live online-presence indicators — all wired together with a responsive React frontend and a WebSocket-powered backend.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/abdelhafid37/talkbox/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Run TalkBox locally in minutes — set up the server, client, and start chatting.
Architecture
Understand how the frontend, backend, and Socket.IO layer fit together.
API Reference
Explore every REST endpoint and WebSocket event TalkBox exposes.
Configuration
Configure environment variables for both the server and the client.
What TalkBox Does
TalkBox enables users to register, log in, and exchange real-time private messages with any other registered user. Every message is persisted to MongoDB and delivered instantly to online recipients via Socket.IO. Offline users see their full conversation history when they reconnect.Configure environment variables
Copy
.env.example in both server/ and client/ and fill in your MongoDB URI, JWT secret, and URLs.Start the backend
Run
npm run dev inside server/ to start the Express + Socket.IO server on port 3000.Key Features
JWT Authentication
Secure registration and login with bcrypt password hashing and 7-day JWT tokens.
Real-Time Messaging
Messages are delivered instantly via Socket.IO without polling.
Online Presence
See which users are currently connected with live online-status indicators.
Conversation History
All messages are stored in MongoDB and loaded when a conversation is opened.
Responsive UI
Built with React, Tailwind CSS, and shadcn/ui — works on desktop and mobile.
Protected Routes
Client-side route guards prevent unauthenticated access to the chat interface.