The heartbeat of real-time conversation.
PulseChat is an open-source, full-stack real-time messaging application built with Node.js, Express.js, and Socket.IO.
It allows users to join chat rooms instantly, send messages in real time, view live user presence, share locations, and see typing indicators without creating an account or refreshing the page.
PulseChat lets users start conversations instantly from any device.
A user enters a username, joins a room, and can immediately chat with anyone else in the same room. Rooms are created automatically, and all communication happens in real time using WebSockets through Socket.IO.
The project is designed to be simple, readable, and easy to extend. It is a good foundation for learning real-time communication, WebSocket architecture, and full-stack JavaScript development.
https://nexsync-7jcc.onrender.com/
Get Connected.
| Feature | Description |
|---|---|
| Real-time messaging | Messages are delivered instantly using Socket.IO |
| Chat rooms | Users can create or join named rooms |
| Live presence | Active users are shown in each room |
| Typing indicators | Users can see when someone else is typing |
| Location sharing | Users can share their location as a Google Maps link |
| Auto-reconnect | Socket.IO handles reconnection after network drops |
| Responsive design | Works on desktop, tablet, and mobile |
| No authentication required | Users only need a username and room name |
| Layer | Technology |
|---|---|
| Runtime | Node.js |
| Server framework | Express.js |
| Real-time communication | Socket.IO |
| Frontend | HTML5, CSS3, Vanilla JavaScript |
| Styling | Custom CSS |
| Icons | Font Awesome |
| Fonts | Inter |
| Hosting | Render, Railway, or any Node.js hosting platform |
pulsechat/
├── src/
│ ├── index.js
│ └── utils/
│ ├── messages.js
│ └── user.js
├── public/
│ ├── index.html
│ ├── chat.html
│ ├── css/
│ │ └── styles.css
│ └── js/
│ └── chat.js
├── .env
├── .gitignore
├── package.json
└── README.md| Path | Description |
|---|---|
src/index.js |
Main server file that configures Express and Socket.IO |
src/utils/messages.js |
Creates message and location message objects |
src/utils/user.js |
Manages users and rooms in memory |
public/index.html |
Join page where users enter username and room |
public/chat.html |
Main chat interface |
public/css/styles.css |
Application styling and responsive layout |
public/js/chat.js |
Client-side Socket.IO logic |
Make sure Node.js and npm are installed.
node -v
npm -vRecommended:
Node.js 18+
npm 9+Clone the repository:
git clone https://github.com/your-username/pulsechat.git
cd pulsechatInstall dependencies:
npm installStart the development server:
npm run devOr start the production server:
npm startOpen the app in your browser:
http://localhost:3000Create a .env file in the project root:
PORT=3000
HOST=0.0.0.0If no .env file is provided, the application uses port 3000 by default.
- Open the application in your browser.
- Enter a username.
- Enter a room name.
- Click Join Chat.
- Share the same room name with another user.
- Start chatting in real time.
Rooms are created automatically when users join them.
| Shortcut | Action |
|---|---|
Enter |
Send a message |
Shift + Enter |
Add a new line |
Ctrl + L |
Share location on Windows/Linux |
Cmd + L |
Share location on macOS |
Escape |
Close sidebar on mobile |
PulseChat uses Socket.IO events to communicate between the client and server.
| Event | Payload | Description |
|---|---|---|
join |
{ username, room } |
Adds a user to a chat room |
sendMessage |
message: string |
Sends a text message to the room |
sendLocation |
{ latitude, longitude } |
Sends a location message to the room |
typing |
None | Notifies others that the user is typing |
stopTyping |
None | Notifies others that the user stopped typing |
| Event | Payload | Description |
|---|---|---|
message |
{ username, text, createdAt } |
Sends a text message to clients |
locationMessage |
{ username, url, createdAt } |
Sends a location link to clients |
roomData |
{ room, users } |
Sends updated room and user data |
userTyping |
{ username } |
Shows typing status for a user |
userStopTyping |
{ username } |
Removes typing status for a user |
PulseChat can be deployed on any platform that supports Node.js applications.
Common options include:
- Render
- Railway
- Fly.io
- Heroku
- DigitalOcean
- AWS
- Google Cloud
- Azure
- Push the project to GitHub.
- Log in to Render.
- Create a new Web Service.
- Connect your GitHub repository.
- Use the following settings:
| Setting | Value |
|---|---|
| Runtime | Node |
| Build Command | npm install |
| Start Command | npm start |
| Instance Type | Free or paid plan |
- Deploy the service.
Render will generate a public URL after deployment.
Planned improvements:
- Message persistence with MongoDB or Redis
- Private direct messaging
- Image and file sharing
- User authentication with JWT
- Message reactions
- Emoji support
- Read receipts
- Push notifications
- Admin room controls
- User avatars
- Message search
- Online/offline status
- Rate limiting and spam protection
Possible production-level upgrades:
- Store messages in MongoDB or PostgreSQL
- Store active sessions in Redis
- Add JWT-based authentication
- Add input validation and sanitization
- Add rate limiting for socket events
- Add unit and integration tests
- Add Docker support
- Add CI/CD using GitHub Actions
- Add structured logging
- Add error monitoring
- Add horizontal scaling with the Socket.IO Redis adapter
Contributions are welcome.
To contribute:
# Fork the repository
# Create a new branch
git checkout -b feature/your-feature-name
# Make your changes
# Commit your changes
git commit -m "feat: add your feature description"
# Push your branch
git push origin feature/your-feature-nameThen open a pull request.
Please keep pull requests focused on a single feature, fix, or improvement.
This project is licensed under the MIT License.
See the LICENSE file for more details.
PulseChat uses the following technologies:
- Node.js
- Express.js
- Socket.IO
- Font Awesome
- Inter Typeface
PulseChat is a simple, fast, and responsive real-time chat application built with Node.js and Socket.IO.
It demonstrates the core ideas behind modern messaging systems:
- Real-time communication
- Room-based chat
- Live user presence
- Typing indicators
- Location sharing
- Responsive frontend design
The project is lightweight, easy to understand, and ready to be extended into a more advanced chat platform.