High-signal, no-noise communication.
Kernel is a real-time, anonymous chat application designed for fast and private conversations. It provides room-based communication channels for both text and peer-to-peer audio calls without requiring permanent user accounts.
The core principle of Kernel is to facilitate immediate and secure interaction. Users can instantly create a private chat room, share the unique link, and begin conversing with others who join. All chat history is persistent for the life of the room, and audio calls are handled directly between peers for maximum privacy and performance.
- Anonymous & Ephemeral Rooms: Instantly create chat rooms with unique, shareable links without needing to sign up.
- Persistent Text Chat: Chat history is saved and loaded for all users in a room, allowing for seamless re-entry into conversations.
- Peer-to-Peer Audio Calls: High-quality, low-latency audio calls are established directly between users via WebRTC, ensuring the server never processes the audio stream.
- Real-Time Presence: See a live count and list of all online users in a room.
- Responsive Design: A clean, minimal, and fully responsive user interface that works across all screen sizes.
Landing / homepage view.
Chat room: messages, participants, and controls.
Active call UI / controls.
Incoming call notification modal.
Online users list / presence indicator.
This project is a full-stack MERN application with a focus on real-time technologies.
| Category | Technology | Purpose |
|---|---|---|
| Frontend | React, Vite, Tailwind CSS | For a fast, modern, and responsive user interface. |
| Backend | Node.js, Express | For the core server logic and API endpoints. |
| Database | MongoDB (with Mongoose) | To provide persistence for room-based chat history. |
| Real-Time | Socket.IO | For text messaging, user presence, and WebRTC signaling. |
| Real-Time | WebRTC | For direct peer-to-peer audio streaming. |
The application is built on a client-server model but utilizes a peer-to-peer architecture for its most bandwidth-intensive feature.
-
Client-Server (for Chat & Signaling): The Node.js server acts as the central hub for all text-based communication. It manages user presence within rooms, handles the storage and retrieval of chat messages from MongoDB, and, most critically, serves as the Signaling Server for WebRTC.
-
Peer-to-Peer (for Audio): For audio calls, the server's only role is to perform the initial "handshake" between users. Once the connection is established, the audio data is streamed directly between the clients' browsers, ensuring low latency and privacy.
The repository is a monorepo structured into two main directories: client and server.
kernel-chat/
├── client/ # Contains the React Frontend (Vite)
│ ├── public/
│ └── src/
│ ├── components/ # Reusable React components (CallUI, Modals, etc.)
│ └── pages/ # Main page components (HomePage, ChatRoom)
└── server/ # Contains the Node.js Backend
├── models/ # Mongoose schemas (Message, User)
├── routes/ # Express API routes
└── src/ # Main server logic (index.js)
To run this project locally, you will need Node.js and MongoDB installed on your system.
-
Clone the repository:
git clone https://github.com/rajveeerr/Kernel.git cd Kernel -
Setup the Backend Server:
cd server npm installCreate a
.envfile in theserverdirectory and add your environment variables:PORT=3000 MONGO_URL=mongodb://your_mongodb_connection_stringStart the server:
npm run dev ``` The server will be running on `http://localhost:3000`.
-
Setup the Frontend Client: Open a new terminal window.
cd client npm install ``` Create a `.env` file in the `client` directory and point it to your backend:
VITE_BACKEND_URL=http://localhost:3000
Start the client: ```bash npm run devThe application will be available at
http://localhost:5173(or another port specified by Vite).





