Add a "Hubbenråttan" heartbeat user to distinguish an empty hub from a service outage

Open
#124 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
backend, frontend

Research direction

Start by tracing how real users are detected, assigned identities, and shown in the hub list; the issue does not name files or tests. Then inspect how the UI represents an empty hub and decide how it can distinguish that state from unknown status. Done means the heartbeat uses the same detection path, its identity is reserved to the bar computer, and the UI meets the three acceptance criteria.

Written by the indexing model from the issue text.

Description

Add a "Hubbenråttan" heartbeat user to distinguish an empty hub from a service outage

Problem

Right now, "no smurfs in the Hubben" can mean two different things:

  1. The hub is actually empty.
  2. The service is down, which happens fairly often.

From the outside there's no way to tell which one it is.

Proposal

Add a default user, Hubbenråttan, that isn't tied to a real person. It would be linked to the IP address of the bar computer, which is always connected to the network.

This works as a heartbeat check:

  • Hubbenråttan is shown, but nobody else → the service works and the hub is truly empty.
  • Hubbenråttan is not shown → the service is down (or the bar computer is off), so the hub's status is unknown.
Requirements
  • Hubbenråttan must go through the same detection path as real users, just with a fixed identity. It should not be hardcoded in the frontend, otherwise it would show up even when detection is broken.
  • The identity must be reserved: only the bar computer's IP can be used by Hubbenråttan, and no real user can claim it.
  • The bar computer's IP should be stable (static lease or DHCP reservation), or the system should match on MAC address if that is what detection uses.
Edge cases / open questions
  • If the bar computer is off or rebooting, Hubbenråttan disappears. The UI should treat this as "status unknown" rather than "empty".
  • Spoofing the IP could fake a live hub. This is low risk for a student hub, but worth noting.
  • Optional complement: a "last updated" timestamp to show how fresh the data is.
Acceptance criteria
  • Hubbenråttan appears in the list when the bar computer is online and detection works
  • Hubbenråttan cannot be assigned to or claimed by a real user
  • The UI distinguishes "empty hub" (only the rat) from "status unknown" (no rat)







image
Dominant language
Rust
Stars
3
Forks
17
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cthit/hubbit

All issues in cthit/hubbit

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.