$ show Panonim/dynacat
Dynacat is a self-hosted, configurable personal dashboard application forked from Glance. It aggregates content from dozens of external services — RSS/Atom feeds, Reddit, Hacker News, Twitch, YouTube, weather (Open-Meteo), financial markets (Yahoo Finance), Docker containers, media servers (Plex/Jellyfin/Emby/Navidrome), torrent clients, and DNS servers — into a single YAML-configured page layout. The backend is a Go HTTP server built on the standard library, serving server-rendered HTML templates with progressive enhancement via vanilla JavaScript, htmx, and SSE for live widget updates. It supports password-based and OIDC authentication, per-page access control, a CSS-variable theme system, and PWA/installability features. Architecturally, the codebase centers on a widget plugin system: each widget type implements a common lifecycle (initialize, update, render, optional request handling) registered in a factory. Shared infrastructure includes a disk-based image cache with proxy fallback, a singleflight-based shared HTTP request layer that deduplicates concurrent external fetches, a generic worker pool for parallel requests, and an SSE update loop. Configuration supports YAML includes, environment variable and Docker secret substitution, and hot-reload via fsnotify. The code is well-organized for a fork of this size: shared patterns are extracted into reusable helpers (generic singleflight, worker pool, custom YAML unmarshalers, and a standalone sysinfo package under pkg/), and focused unit tests cover auth and several widgets. Main caveats are large monolithic widget files (700–900 lines mixing HTTP, parsing, and rendering), duplicated fetch logic across the 'latest-media' and 'playing' widgets, and heavy reliance on many external APIs whose availability or rate limits can affect the dashboard. The project is actively maintained with frequent releases, GitHub Actions CI/CD, and a goreleaser setup for multi-arch Docker images.
The LLM identified 5 files worth highlighting for reuse:
Generic, type-safe singleflight implementation that deduplicates concurrent calls to the same key, returning a shared result to all callers while executing the underlying function only once. Self-contained and dependency-free, it can be dropped into any Go project needing request coalescing or cache-stampede protection.
Standalone system information package wrapping gopsutil to expose CPU, memory, disk, temperature, and ZFS-aware mountpoint statistics in a normalized format. Lives under pkg/ with no imports of internal modules, making it directly reusable by other Go services needing host metrics.
Generic worker pool (workerPoolDo) that bounds concurrency for fan-out HTTP/processing tasks with configurable parallelism. Extracts a common concurrency-control pattern used by widgets to fetch many URLs or items in parallel without exhausting connections or API rate limits.
Shared HTTP request layer that caches GET responses in memory for a short TTL and collapses identical in-flight requests via singleflight, with per-caller max-age handling. Demonstrates a reusable pattern for reducing external API load in widget-driven aggregators.
Disk-based remote image cache with TTL eviction, in-flight request deduplication, and fallback to a URL-rewriting proxy. Solves the recurring problem of caching and privacy-preserving proxying of third-party images in web applications.