June 16, 2025
I've implemented a whole system of accounts, groups and objects in order to have a clean and efficient API.
First of all, I added an account system to let the user choose his api key and root api.
Then I created a route to retrieve entities compatible with the API, and an object system to simplify requests to Home Assistant.
At first I made POST requests on the state of the entities, but having encountered certain bugs, I use the Home Assistant ‘turnoff’ and ‘turnon’ services to avoid bugs.
I've also added a group system, so that the user only has to make a few requests to turn off a large number of devices.
A simple API to simplify the usage of the Home Assistant API The API is based on an internal object system: the user must first provide his Home Assistant API root and API key, then you can list all compatible entities available on your account, then you must create an object by specifying an entity name and id, then you can do a simple on/off with the API. You can also add groups with several objects, where you can switch all the devices in the group on or off.
The details page is dynamic :3
The front end is now dynamic : I make requests at mail.hackclub.com to get information.
I finished the backend, I added the selected menu.
I've started on the frontend, adding a mail list (not yet dynamic) and a help menu.
A TUI tool to keep track of your letters on HackClub Mail.
I've added two commands: one to display the list of challenges, and another to clear the challenges in the database (reserved for the bot owner).
I've added the main function: retrieving challenges and sending messages when a challenge has been solved or not.
I started the bot, and added two commands: subscribe, and unsubscribe, which allow the user to subscribe to the feed, to send them messages when a challenge is solved, or when a challenge has been added.
A simple bot discord to let you know when there's a new challenge on the CTF and when a challenge has been validated. Mainly for team CTFs. Message to reviewers : It's not possible to do a non-video demo because you'd have to have a CTFd instance, and challenges, teams etc., it's too many logistics.
I made a few modifications at the end of the project: I had a friend test the interface for feedback (which revealed a major problem).
So I changed the font to a static font, not just any monospace font. I also redid the responsive a bit so that it would work with the static font.
I've started the backend of the page where you can see the statistics. I opted for a double data retrieval: one source coming from the project API, so as to have an almost instantaneous loading, then the other coming from a websocket sending the data every X seconds.
For the moment, I've only done the API part, to ensure clean loading and all the functions needed to easily integrate the websocket.
I've started the stats display interface. On PC, the interface will look like this. I've decided to use ASCII graphics to keep the style minimalist.
For the moment, this is just the front-end, as the back-end to display all the stats has not yet been integrated.
The next step is to make the interface... responsive.
I've added very little visually, but a lot on the backend.
I made the server list page functional, with a modal to retrieve the connection token. I've added the page for adding a server and the page for changing its password.
I've also added better management for the icons used in the project. I used custom elements in HTML to create a simpler icon system to avoid repetition.
I've also started a websocket, to update live information from the servers.
I started doing the client's backend and frontend. I decided to use Elysia, in particular so as not to slow down server development because I'm used to this framework, but also for server performance, Elysia having very good benchmark results.
For the frontend, I decided on a minimalist design to simplify use of the service, and because I'm not very good at design.
I've finished the socket, all the data is saved in the database. The translation part is finished.
I've also added a function to clear the database: every 10 minutes, all data older than 10 minutes is deleted.
The next step is to create the interface and a user system, and then run a websocket to receive information in real time.
I've started the translation part, which retrieves information from a TCP server and stores it in a database. For now, it only handles authentication and CPU name registration.
Each message sent to the server must be a JSON composed of three keys: Id, which corresponds to the server id; Type, which corresponds to the type of message (authentication, cpu name, cpu usage etc.); Data, which corresponds to the data to be stored.
For authentication, you need to provide a key and an id. This assembly of key and id is called a token, and is encoded in base64, which simplifies client installation. The key is generated by a SHA256 signature, encrypted with HMAC and a key specific to the server. This guarantees the authenticity of the data, to prevent a malicious person from sending false data to the server.
I've added several features to the PoC: recovery of the CPU model name, and recovery of disks and its statistics.
Disk read doesn't just read mounted files, but will read every available disk, look to see if it's mounted, if mounted, retrieve the name of the folder where it's mounted, and retrieve the available size.
Both are based on linux system files: /sys/class/block (a folder) which has an equivalent folder on each disk, and /proc/cpuinfo which lists CPU info, including its model.
The basic plan was to make the server in C, but I finally decided to make it in Go, for the simple reason that Go is simpler and I don't have too much risk of memory leaks.
I started by making a PoC with the main information, such as CPU usage in percentage, memory info and swap info.
The most complicated part was CPU usage, because you have to read raw information, which means nothing when you don't know how to do it. Thanks Stackoverflow.
This was widely regarded as a great move by everyone.