How sysadminsmedia/homebox works
HomeBox is a self-hosted home-inventory application: users organize items, locations, tags, custom fields, attachments and maintenance, then find, report on, or export that inventory. The documented workflow enters through the web UI and versioned API, where services and repositories operate on persistent data; search and label generation support discovery and physical organization. The tree and excerpts establish routing, service wiring, generated database querying, search, export, and label generation. Other documented capabilities are represented at subsystem level because their handlers were not sampled.
Main entry points: controller.go V1 handlers · services Domain services · items.ts API client · routes.go HTTP router
Components 20
Web experience
- Inventory UI
frontend/pages/item/[id]/index.vue - Search UI
frontend/pages/search.vue - API client
frontend/lib/api/classes/items.ts
API and domain
- HTTP router
backend/app/api/routes.go - V1 handlers
backend/app/api/handlers/v1/controller.go - Domain services
backend/internal/core/services - Authentication
backend/app/api/providers
Persistence and search
- Repositories
backend/internal/data/repo - Ent database client
backend/internal/data/ent/client.go - Database search
backend/internal/data/search/database.go - SQLite database
Inventory capabilities
- Inventory organization
backend/app/api/handlers/v1/v1_ctrl_entities.go - Files and attachments
backend/app/api/handlers/v1/v1_ctrl_entities_attachments.go - Maintenance tracking
backend/app/api/handlers/v1/v1_ctrl_maintenance.go - Reports and imports
backend/internal/core/services/reporting - Data export
backend/internal/core/services/service_exports.go - Label generation
backend/pkgs/labelmaker/labelmaker.go
Runtime
- API server
backend/app/api/main.go
Other components
- Home user
- OIDC provider
Connections 21
- Home user → Inventory UI: uses
- Inventory UI → API client: requests
- Search UI → API client: searches
- API client → HTTP router: calls API
- API server → HTTP router: serves
backend/app/api/main.go - HTTP router → V1 handlers: routes to
backend/app/api/routes.go - V1 handlers → Domain services: invokes
backend/app/api/handlers/v1/controller.go - V1 handlers → Authentication: configures auth
backend/app/api/handlers/v1/controller.go - Authentication → OIDC provider: authenticates with
- Domain services → Repositories: uses
backend/internal/core/services/service_exports.go - Repositories → Ent database client: queries
- Ent database client → SQLite database: persists
- Database search → Ent database client: queries entities
backend/internal/data/search/database.go - V1 handlers → Database search: searches
- V1 handlers → Inventory organization: handles inventory
- V1 handlers → Files and attachments: handles uploads
- V1 handlers → Maintenance tracking: handles schedules
- Domain services → Reports and imports: processes reports
backend/internal/core/services/service_exports.go - V1 handlers → Data export: starts exports
- Domain services → Data export: runs jobs
backend/internal/core/services/service_exports.go - V1 handlers → Label generation: generates labels