RTC Terminal is a modern real-time chat application that enables users to create or join chat rooms and communicate instantly with other participants. The application features a clean, responsive interface and supports real-time message delivery using WebSocket technology.
-
Cloning the Repository:
git clone https://github.com/yashksaini-coder/relay-chat
-
Installing Dependencies:
npm install
-
Running the application:
npm run dev
-
Click on the local deployment URL of the Application:
https://localhost/5173
- π Create new rooms with auto-generated unique room IDs
- π Join existing rooms using room IDs
- π Copy room IDs to clipboard for easy sharing
- π₯ Real-time user connection tracking
- β‘ Real-time message delivery
- πΌοΈ User-friendly message interface with distinct styling for sent/received messages
- π¨βπ©βπ§βπ¦ Support for multiple users in the same room
- π Username display for each message
- β Enter key support for sending messages
- π Clean, modern interface with dark theme
- π± Responsive design that works on mobile and desktop
- π Toast notifications for important actions
- π’ Smooth transitions and hover effects
- π Scrollable message history
React | TypeScript | Tailwind CSS | Vite | React Toastify | Lucide React |
---|---|---|---|---|---|
![]() |
The frontend is built as a single-page application (SPA) with React. Key components include:
- π Connection management with WebSocket
- ποΈ State management using React hooks
- π Responsive UI components
- β‘ Real-time message handling and display
The backend implements a WebSocket server that handles:
- π₯ User connections and disconnections
- π Room management
- π‘ Message broadcasting to room participants
- π’ User count tracking
The application uses a simple message protocol over WebSocket:
{
"type": "join",
"payload": {
"roomid": "ROOM_ID"
}
}
{
"type": "chat",
"payload": {
"name": "USERNAME",
"message": "MESSAGE_CONTENT"
}
}
- π Secure WebSocket connections (WSS)
- π‘οΈ Input validation
- πͺ Room isolation (messages only broadcast to users in the same room)
- π Frontend deployed on Vercel
- π₯οΈ Backend deployed on Render
- π§ WebSocket server configured for production use