Ever got tired of writing this over and over again?
ws.on('connection', (client) => {
client.on('message', (msg) => {
// process data
});
});
β¦and then implementing broadcasts, rooms, retry logic, logging, CLI utilities β manually?
Yeah. Me too.
Thatβs why I built Blink Socket β a minimal WebSocket framework designed to make real-time development feel like writing pseudocode.
π§ Why I Built This
I was working on multiple real-time projects, and I noticed:
Problem Existing WebSocket libraries
Too verbose Need too many event handlers
No built-in broadcast / rooms Had to implement everything
No utility helpers No CLI tools or auto-retry
Not beginner friendly Hard for newbies to understand
I wanted something where I could write:
server.cnct()
server.rcv()
server.brd()
β¦and be done.
Not boilerplate. Not callback hell. Not 20 lines to send a single message.
β¨ What Makes Blink Socket Special?
Feature Why It Matters
β
Short Syntax brd(), rcv(), cnct() β readable like plain English
β‘ Lightweight No dependencies. Just pure Node.js + WebSockets.
π§© Modular Server, client, and utils β use only what you need.
π Built-in Retry + Rooms + Logging No need to write boilerplate.
π§βπ« Beginner Friendly Functions named in simple words like send, join, leave
π οΈ Quick Example
const { Server, Client } = require('blink-socket');
const server = new Server(3000);
server.cnct(ws => server.log('Client joined'));
server.rcv((msg, ws) => server.brd({ echo: msg }));
And for the client:
const { Client } = require('blink-socket');
const client = new Client('ws://localhost:3000');
client.cnct(() => client.log('Connected!'));
client.rcv(msg => client.log('Got:', msg));
client.send({ hi: 'there' });
Thatβs it. Real-time in 5 lines.
π Open Source & Community First
Blink Socket is fully open source β feel free to clone, fork, modify, or extend!
π GitHub Repo:
https://github.com/DeveloperPuneet/blink-socket
π Future npm Package:
https://www.npmjs.com/package/blink-socket
If you like the idea, star the repo β β thatβs my caffeine.
βοΈ Wanna Contribute? Or Just Say Hi?
Iβd love to hear your thoughts.
Want extra features?
Want wrapper functions?
Want React / Unity / Python support?
Drop an issue on GitHub or leave a comment here.
Top comments (0)