/ home / chrono / blog / hammer.md

blog  /  current & past projects  /  political notes

 /  twitter  /  sr.ht  /  github

Hammer, Meet Nail

tags: hammer javascript

I've been working on a project for a while now, I hastily named it "Hammer". It's a chat app written in JavaScript, it doesn't use any frameworks, and it's built with a custom database intermediate to allow me to use different databases. It uses a custom protocol to communicate between the client and the server. The communication is over WebSockets.

Hammer Protocol

The protocol is very simple. I took a look at the Discord gateway protocol, and I decided to take a similar approach for some of the most basic levels of it. The protocol is a simple JSON-based protocol, with a few different types of messages. The protocol is designed to be easy to expand should I ever need to add more features.


The server sends a few different types of messages to the client. It has an in-socket authentication handshake after an initial HTTPS email + passsword authentication. I've learned about using Postman to help plan out the HTTP API, and I've been using it to help plan out the protocol.


My client is relatively non-existent at the moment. I'm currently working on the server, and I've only made an API wrapper for testing. I'm planning on learning React for the full graphical client. I might end up settling for a terminal-based client, but I'm not sure yet. I want to get the server completed first, and then I'll worry about the client.

React sucks


I actually hate React. I hate it so much, more than I hate Rust. I've spent over a hundred hours working on this website, and it is a furthest thing from "modern" the closest thing it has to a modern webdev feature is that it uses CSS Grid for the layout.