A cleaner foundation for Hive Node Beacon

avatar
(Edited)

This is one of those updates that is not very flashy on the surface, but it will make working on the project so much easier for me and other contributors (cc @rishi556 and @forkyishere).

I just finished ...ok let's be honest here, Codex just finished a fairly substantial refresh of the Hive Node Beacon codebase (repository link).

Random cover to make the post look nicer

The old project structure I originally created was simple and worked fine for a long time. But it was starting to show its age. Backend and frontend were living in different worlds, dependency management was still tied to npm, and even simple upgrades were more annoying than they should have been.

So I took the time to rework the repository into a more modern pnpm monorepo. To put things into perspective this is the amount of changes (consider this is a relative small repository):

image.png

Current structure is now much cleaner:

  • apps/backend for the NestJS API
  • apps/frontend for the Vue app
  • shared workspace management at the root with pnpm

On top of that, the frontend was moved to a more modern Vue 3 + Vite setup, while the backend was refreshed around the current Nest tooling.

For reference, the project homepage is here: https://beacon.peakd.com/
But many projects simply use it via API: https://beacon.peakd.com/api/nodes

Why this is a win

The biggest benefit is not just newer tools for the sake of newer tools. It is that the project is now easier to reason about, easier to update, and easier to improve without fighting the repo every step of the way.

A few practical wins:

  • dependency management is simpler and more predictable with a single workspace lockfile
  • frontend and backend now have a clear home and a cleaner separation of concerns
  • upgrading one side of the stack no longer feels like surgery on the whole project
  • build and development commands are more consistent
  • the repo is in a much better position for future shared tooling or packages if needed

This kind of cleanup work usually does not get much attention, but it is exactly the sort of thing that makes future iteration faster.

Single app deploy, cleaner internals

To keep the website and API compatible with the current deployment pipeline the frontend is built as static assets, and the backend serves it directly while keeping the API under /api.

So from the outside it still behaves like a single app, but internally the codebase is much better organized. That feels like the right compromise here: modern internals without making deployment more complicated than necessary.

And one bonus page

As part of this rework there is also a new Nodes page on HiveHub.dev with a very familiar look and feel. This is an easy win to make HiveHub even more complete in terms of features.

Hive nodes on HiveHub.dev

Going forward

This refactor makes Beacon way easier for me and other contributors to work on. The structure now actually supports incremental changes on a modern tech stack.



0
0
0.000
13 comments
avatar

Not a shiny new feature, but a better foundation to keep building on.

Noooo, not the AI ending :mrtats/kekw:

0
0
0.000
avatar

Excelente trabajo de optimización. Ese cambio a y la limpieza del repositorio van a dejar el proyecto fino para el futuro.

Excellent optimization work. That move to and the repository cleanup are going to leave the project great for the future.

0
0
0.000
avatar

It looks like a few nodes need some attention. I suspect a lot of people are not so aware of how this infrastructure works, but it's good to have tools to check on it.

0
0
0.000
avatar

Nice, do packages work on Node 24+ now?

0
0
0.000
avatar

Default is Node 22+ but it should work on 24 as well 👍

0
0
0.000
avatar

Awesome! I recall having to drop down to 20 or something when I made my last updates so this is very appreciated!

0
0
0.000
avatar

cleaner code makes life easier
solid update

0
0
0.000