How sergi0g/cup works
Cup checks container images for version-tag or digest changes and presents the results through a CLI or a web server/UI. The main CLI dispatch and server routes are visible in excerpts; the registry-checking internals are only partly sampled, so some subsystem links are omitted. The README documents registry support and JSON access, while the browser component relationships below are supported by the App excerpt and SOURCE INDEX references.
Main entry points: App.tsx Dashboard app · image.rs Image evaluation · main.rs CLI commands · server.rs HTTP server
Components 25
Product entry points
- CLI commands
src/main.rs - HTTP server
src/server.rs - Configuration
src/config.rs
Image update checking
- Update checks
src/check.rs - Docker inspection
src/docker.rs - Image evaluation
src/structs/image.rs - Reference parsing
src/utils/reference.rs - Registry queries
src/registry.rs - HTTP client
src/http.rs
Results and serialization
- Update result model
src/structs/update.rs - Update statuses
src/structs/status.rs - Version comparison
src/structs/version.rs - JSON output
src/utils/json.rs - CLI formatting
src/formatting/mod.rs
Web experience
- Dashboard app
web/src/App.tsx - Dashboard data hook
web/src/hooks/use-data.tsx - Image result view
web/src/components/Image.tsx - Search and filters
web/src/components/Filters.tsx - Server grouping view
web/src/components/Server.tsx - Cup branding
web/src/components/Logo.tsx - Tooltip UI
web/src/components/ui/Tooltip.tsx - Runtime theme
web/src/theme.ts
Other components
- Cup user
- Browser user
- Container registries
Connections 25
- Cup user → CLI commands: runs command
src/main.rs - CLI commands → Configuration: loads settings
src/main.rs - CLI commands → Update checks: runs check
src/main.rs - CLI commands → HTTP server: starts server
src/main.rs - CLI commands → CLI formatting: prints results
src/main.rs - Image evaluation → Reference parsing: parses reference
src/structs/image.rs - Image evaluation → Registry queries: queries tags or digests
src/structs/image.rs - Image evaluation → Version comparison: compares versions
src/structs/image.rs - Image evaluation → Update statuses: derives status
src/structs/image.rs - Image evaluation → Update result model: creates result
src/structs/image.rs - Registry queries → Container registries: queries registry
- CLI formatting → JSON output: formats raw JSON
src/formatting/mod.rs - CLI formatting → Update statuses: prints status
src/formatting/mod.rs - HTTP server → JSON output: builds JSON views
src/server.rs - HTTP server → Cup user: serves API
src/server.rs - Browser user → Dashboard app: opens dashboard
web/src/App.tsx - Dashboard app → Dashboard data hook: loads data
web/src/App.tsx - Dashboard app → Image result view: renders images
web/src/App.tsx - Dashboard app → Search and filters: renders filters
web/src/App.tsx - Dashboard app → Server grouping view: groups by server
web/src/App.tsx - Dashboard app → Cup branding: renders branding
web/src/App.tsx - Dashboard app → Tooltip UI: uses tooltips
web/src/App.tsx - Image result view → Tooltip UI: uses tooltips
web/src/components/Image.tsx - Dashboard app → Runtime theme: uses theme
web/src/App.tsx - Dashboard data hook → HTTP server: requests JSON