A simple real-time global chat app built with Express, Socket.IO, and Vue 3. Made as a learning project to understand WebSockets, real-time systems, and PWAs.
🌐 Live demo: https://globalchat-sdmz.onrender.com/
- Real-time global chat using Socket.IO
- Username chosen on first visit (saved in
localStorage) - System messages for user join / leave
- Message history on connect (in-memory)
- Send via Enter or Send button
- Installable Progressive Web App
- Minimal UI with Pico.css
- Reactive frontend with Vue 3 (CDN)
-
The client asks for a user on first visit and stores it in
localStorage -
The browser connects to the Socket.IO server, sending the username during the handshake
-
The server:
- Sends existing messages to the new client
- Broadcasts a join system message
-
When a user sends a message:
- It is sent to the server
- Stored in memory ( for now )
- Broadcast to all connected clients
-
On disconnect, the server broadcasts a leave system message
-
Vue updates the UI reactively as messages arrive
That’s it — no polling, no page refreshes.
git clone [https://github.com/mastercuber55/GlobalChat](https://github.com/mastercuber55/GlobalChat)
cd GlobalChat
npm install
node index.jsServer runs at: http://localhost:8080
- No authentication currently
- Messages stored in RAM only currently
- Single global room for now
- No spam protection or moderation
- No markdown support yet
MIT — free to fork, modify, and learn from.
