~/projects $ cat socket0/README.md
Socket0
Tools & infrastructure·May 2025·● live·00last push May 31, 2025
Lightweight WebSocket server with authorization, broadcasting, and channel management.
Why it exists#
Socket0 is a lightweight WebSocket server that does one job: move messages between connected clients in real time, and nothing else.
How it works#
Clients send small JSON commands (join, leave and broadcast) to subscribe to channels and send to them. Your backend can also broadcast over plain HTTP without holding a socket open.
The interesting part is what Socket0 doesn't do. It has no idea who your users are. Authorization is delegated to a webhook you run: Socket0 sends it every connection attempt and every message first, a 200 lets it through, and anything else rejects it. That keeps the server small, and keeps your auth logic in your own app.
- Brokers: in-memory for a single instance, or Redis to fan out across several
- Graceful shutdown for zero-downtime deploys, plus a health endpoint
- Configured with flags or environment variables, and shipped as a Docker image
How it's built#
Go, with Redis as an optional broker.
What I learned#
Keep the server dumb and push decisions to the edges. Delegating authorization to a webhook meant Socket0 never had to know about users, sessions or permissions, which is what kept it small enough to trust.