Add read-only web UI

Serves Pete's classified-story archive over HTTP alongside the Matrix
bot. Three sections (gaming/tech/politics), Animal-Crossing-vibe Tailwind
templates, day/night palette driven by the visitor's browser clock.
Web port configurable via web.listen_addr and ${PETE_WEB_PORT} in
docker-compose. Tailwind built in a node stage in the Dockerfile so
deployments don't need node at runtime.
This commit is contained in:
prosolis
2026-05-24 21:51:49 -07:00
parent 87906719fa
commit fbd4b84eaf
20 changed files with 1695 additions and 1 deletions

11
main.go
View File

@@ -18,6 +18,7 @@ import (
"pete/internal/poster"
"pete/internal/scheduler"
"pete/internal/storage"
"pete/internal/web"
"maunium.net/go/mautrix/id"
)
@@ -226,6 +227,16 @@ func main() {
}
}
// Start the read-only web UI alongside the Matrix bot.
if cfg.Web.Enabled {
ws, err := web.New(cfg.Web)
if err != nil {
slog.Error("web server init failed", "err", err)
} else {
go ws.Start(ctx)
}
}
// Run maintenance on startup
storage.RunMaintenance(cfg.Storage.RecentWindowHours, cfg.Storage.ClassificationLogDays)