BACK 02 / 03

EXPERIMENT · 2026

FlatBrain

SELF-HOSTED FLAT ADMIN PANEL · RASPBERRY PI 4 · LAN ONLY

ROLE
Concept · full-stack · UI · deployment
TOOLS & PROCESS
React · Vite · Express · plain JSON files · Raspberry Pi · systemd
YEAR
2026
The dashboard — every app as a tile
Saved months, and where the money went
01

Problem

Splitting bills with a flatmate is a small annoying job every month. We were doing it in a spreadsheet and it got messy. Who paid for what. What's a straight 50/50 and what isn't. What the actual number to transfer is. I wanted one page that answers that. Then I wanted the rent on there too. So it turned into a panel.

02

Process

FlatBrain runs on a Raspberry Pi 4 sitting in the flat. One Express server holds the API and serves the frontend. There's no database. Each app writes plain JSON files, saved atomically so a power cut can't corrupt them. For two people and twelve invoices a year, a database would be silly.

The first app is the bill splitter. You set the bills and a split ratio. 50/50 by default, or 60/40 if one room is bigger. Each of us has our own page for the things we bought, and every item carries its own share. Buy a nine-pack of loo roll for £4.50 and the invoice works out the per-unit price. It ends in one number each. That's what you transfer, with your own purchases already netted off.

Then rent, a one-off invoice generator, and a settings app that watches the Pi itself. Invoices download as a PNG, captured at a fixed size so a phone and a laptop make the same file. The charts are hand-drawn SVG. I didn't want a chart library running on a Pi.

One command installs the whole thing. install.sh puts Node on, sets up a systemd service and renames the Pi. So it comes back at flatbrain.local on its own after a power cut. The built frontend is committed to the repo, because Vite is rough on 32-bit ARM. The Pi never builds anything. It just pulls and restarts.

03

Outcome

It runs in the flat and we use it every month. Bills, rent, invoices, backups to a USB stick, and a reboot at 6:30am on a Sunday.

The security is thin. It's one shared password checked in the browser, the API underneath isn't authenticated, and it's all plain HTTP. That's fine on a home network and nowhere else, so it stays on the LAN. If I ever wanted to reach it from outside the flat, that's the part I'd rebuild first.

HARDWARE
Raspberry Pi 4 · LAN only · http://flatbrain.local
APPS
dashboard · bill splitter · rent · invoice generator · settings
FRONTEND
React · Vite · one-page app · hand-drawn SVG charts
BACKEND
Express · plain JSON files · no database
SPLIT
adjustable ratio · per-item share · per-unit prices
INVOICES
fixed-size PNG · CSV export and import · saved history
INSTALL
one command · systemd service · mDNS hostname
BACKUP
scheduled copy to a USB stick · restore built in
ACCESS
one shared password · open guest page for sharing
STATUS
running in the flat · open source
MATIAS MORAGREGA · MATIAS@KEYQUEST.TECH