How glanceapp/glance works
Glance is a configurable web dashboard: a user opens pages defined in YAML, the server builds a page from configured widgets and theme settings, and browser-side JavaScript renders and enhances the dashboard. Widget families cover feeds, community and video content, weather and markets, and infrastructure; some widgets retrieve data from external services. The graph preserves those documented capabilities, but most backend routing and widget-dispatch connections cannot be verified from the excerpts, so those links are marked unverified. The sampled server-stats implementation does show its local sysinfo dependency.
Main entry points: glance.go HTTP application · widget.go Widget runtime · page.js Page interactions · calendar.js Calendar UI
Components 23
Server runtime
- Program entry
main.go - HTTP application
internal/glance/glance.go - YAML configuration
internal/glance/config.go - Authentication
internal/glance/auth.go
Dashboard presentation
- Page templates
internal/glance/templates.go - Themes
internal/glance/theme.go - Widget runtime
internal/glance/widget.go
Content widgets
- Feeds and communities
internal/glance/widget-rss.go - Video and streaming
internal/glance/widget-videos.go - Search and links
internal/glance/widget-search.go
Data widgets
- Weather and calendar
internal/glance/widget-weather.go - Markets and releases
internal/glance/widget-markets.go - Infrastructure status
internal/glance/widget-server-stats.go - System information
pkg/sysinfo/sysinfo.go
Browser interaction
- Page interactions
internal/glance/static/js/page.js - Calendar UI
internal/glance/static/js/calendar.js - Todo UI
internal/glance/static/js/todo.js - Popover UI
internal/glance/static/js/popover.js - Masonry layout
internal/glance/static/js/masonry.js - DOM helpers
internal/glance/static/js/templating.js - Animations
internal/glance/static/js/animations.js
Other components
- Dashboard user
- External data sources
Connections 28
- Dashboard user → HTTP application: opens dashboard
- Program entry → HTTP application: starts
main.go - HTTP application → YAML configuration: loads settings
- HTTP application → Authentication: handles sign-in
- HTTP application → Page templates: serves pages
- HTTP application → Themes: applies themes
- HTTP application → Widget runtime: renders widgets
- Widget runtime → Feeds and communities: dispatches
- Widget runtime → Video and streaming: dispatches
- Widget runtime → Search and links: dispatches
- Widget runtime → Weather and calendar: dispatches
- Widget runtime → Markets and releases: dispatches
- Widget runtime → Infrastructure status: dispatches
- External data sources → Feeds and communities: provides feed data
- External data sources → Video and streaming: provides content
- External data sources → Weather and calendar: provides forecasts
- External data sources → Markets and releases: provides prices
- Infrastructure status → System information: collects local stats
internal/glance/widget-server-stats.go - HTTP application → Page interactions: serves dashboard
- Page interactions → Popover UI: sets up
internal/glance/static/js/page.js - Page interactions → Masonry layout: sets up
internal/glance/static/js/page.js - Page interactions → Calendar UI: sets up
internal/glance/static/js/page.js - Page interactions → Todo UI: sets up
internal/glance/static/js/page.js - Calendar UI → DOM helpers: builds DOM with
internal/glance/static/js/calendar.js - Calendar UI → Animations: uses
internal/glance/static/js/calendar.js - Todo UI → DOM helpers: builds DOM with
internal/glance/static/js/todo.js - Todo UI → Animations: uses
internal/glance/static/js/todo.js - Masonry layout → Page interactions: reflows dashboard
internal/glance/static/js/page.js