The Problem
Home labs accumulate scattered infrastructure — VMs on one hypervisor, apps on another, storage and shares in separate tools, network topology in a spreadsheet. Tracking relationships between these entities (which VM runs which app, which storage hosts which share) becomes manual and error-prone. This repo is a self-hosted single-pane-of-glass for that inventory, with a network map to visualize how things connect.
What This Does
homelab-hub is a Flask + Svelte web app that stores your homelab inventory in SQLite and exposes it through a browser UI. The backend (backend/app/) defines SQLAlchemy models for hardware, vm, app_service, storage, share, network, misc, and document, each with full CRUD. The frontend (frontend/src/pages/) provides three views: InventoryPage.svelte for tabular CRUD, MapPage.svelte for a Cytoscape.js graph of relationships, and DocsPage.svelte for markdown documentation with live preview.
This is a fork of RaidOwl/homelab-hub (698 stars upstream), with 0 stars and no description of what changed. The README is upstream's, including Docker commands pointing at the raidowl/homelab-hub image — not this fork's own build.
How It Is Wired
Execution starts at frontend/index.html, which loads frontend/src/main.js and mounts App.svelte. That routes to the three page components, which call frontend/src/lib/api.js for all HTTP requests. On the backend, backend/wsgi.py boots the Flask app in backend/app/__init__.py; backend/docker-entrypoint.sh runs Alembic migrations on container start, then launches Gunicorn.
The critical hub is backend/app/routes/_crud_factory.py. It generates the list/detail/create/update/delete handlers for every entity type, and all ten route modules (apps.py, hardware.py, vms.py, storage.py, networks.py, shares.py, misc.py, documents.py, inventory.py, map_routes.py) funnel through it. backend/app/models/base.py is the declarative base every model inherits. The blast radius is concentrated: a change to _crud_factory.py or base.py affects all entity types at once. That's a cost if you need to diverge behavior per entity — the factory is the single point of variation. Nine Alembic migrations (backend/migrations/versions/) evolve the SQLite schema; migration_helpers.py supports them.
The map feature is the only path that doesn't purely use the factory: map_routes.py builds the graph from all entity types and their relationships, served to NetworkMap.svelte.
How To Use It
The README documents Docker deployment, but those commands pull the upstream raidowl/homelab-hub image. For this fork, build from the local Dockerfile:
docker build -t homelab-hub .
docker run -d --name homelab-hub -p 8000:8000 -v ./data:/data homelab-hub
Data persists in ./data/. For local development: pip install -r backend/requirements.txt (Python 3.14+), then npm install in frontend/ and npm run dev (Vite). The backend serves on port 8000; the Vite dev server proxies API calls. No environment variables are documented in the repo.
Real-World Use
A homelab operator with a Proxmox host, a NAS, and a few Docker apps imports each into the inventory, links the VM to its hypervisor and the shares to their storage device, then uses the map view to see the topology before touching anything. The JSON export/import in inventory.py gives a backup path before hardware changes.
Code Health & Issues
Static analysis found no test files repository-wide and no CI/CD pipeline (no .github/ config). Both are Medium severity SDLC gaps: untested code paths and no automated build gate. Additional observations from the file structure: the README's Docker instructions point at the upstream image, not this fork, which will confuse anyone who clones this repo expecting those commands to work. The schema is actively evolving (nine migrations), so expect churn in the models and factory.
The Bottom Line
A well-structured CRUD app with a genuinely useful network visualization, and the factory pattern keeps per-entity routes small. The lack of tests and CI is the main risk for anyone modifying it, and the fork's README/image mismatch needs resolving. Suitable for a homelab operator who wants a unified inventory, not for production-critical use without adding test coverage.