No description
  • HTML 52.2%
  • Go 47.8%
Find a file
2026-05-01 21:13:55 +02:00
cmd/server refactor: introduce Server struct, split seed, DRY helpers 2026-05-01 21:13:55 +02:00
internal refactor: introduce Server struct, split seed, DRY helpers 2026-05-01 21:13:55 +02:00
.gitignore Fix nil slice JSON encoding and add dummy port to seed data 2026-04-30 15:32:49 +00:00
go.mod Add Go API for configs and services, update README, add .gitignore 2026-04-30 14:01:32 +00:00
go.sum Add Go API for configs and services, update README, add .gitignore 2026-04-30 14:01:32 +00:00
index.html Add 'both' as default protocol option for ports 2026-04-30 16:31:07 +00:00
README.md added API endpoints to readme 2026-05-01 20:53:42 +02:00

Homelab Config Manager

A small Go API for managing homelab configurations and services.

Build

go build -o server ./cmd/server

Run

./server

The server listens on http://localhost:8080.

Read API Endpoints

The following endpoints are public read-only API endpoints you can use from bash scripts, curl, or other tools.

All endpoints return application/json and run on http://localhost:8080.

Method Path Description
GET /configs List all configuration entries.
GET /configs/{id} Get a single configuration by its ID.
GET /hosts List all hosts.
GET /hosts/{id} Get a single host by its ID.
GET /services List all services.
GET /services/{id} Get a single service by its ID.
GET /ports List all ports, including joined service name and host name.
GET /services/{id}/ports List all ports belonging to a specific service.
GET /ports/{id} Get a single port by its ID.

Schema changes

The database version is tracked via PRAGMA user_version. If you change the schema, bump currentSchemaVersion in internal/db/db.go. The server will refuse to start against an older database and print a clear error. Just delete the database file and restart to get a fresh one.