nerves-hub/nerves_hub_web
49.8
Weak · 15 November 2026
77.1k
lines of production code
Elixir
primary language
5
measurements over time
What this system is
Features
Add OpenTelemetry tracing with request filtering and WebSocket naming
The telemetry module now supports OpenTelemetry tracing. A new \Customizations\ module attaches to Bandit request events to rename spans for WebSocket connections and safely handles cases where connection metadata is missing (such as timeouts). A new \FilteredSampler\ implements the OpenTelemetry sampler behavior to drop traces for static assets, health checks, and specific internal spans, while applying a configurable ratio-based sampling strategy for remaining requests.
_lib/nerves\hub/telemetry · high confidence
Added Base62 encoding and decoding utilities
A new \NervesHub.Utils.Base62\ module has been added to provide functions for encoding and decoding binary data or integers using the Base62 scheme. This utility converts binary data into a URL-safe ASCII string format using characters 0-9, a-z, and A-Z, which is useful for contexts where reserved characters need to be avoided. The module exposes \encode/1\ for converting binaries or integers to Base62 strings and \decode!/1\ and \decode/1\ for reversing the process, including error handling for invalid characters.
_lib/nerves\hub/utils · high confidence
Centralized Sentry logging helper for devices and deployments
A new \NervesHub.Helpers.Logging\ module has been introduced to standardize error reporting to Sentry. This helper provides functions to log messages or exceptions, automatically attaching context-specific tags (such as device identifiers, product IDs, organization IDs, or deployment names) based on whether the source is a Device, DeviceInfo, or DeploymentGroup. This ensures consistent observability and easier debugging for issues occurring within the Nerves Hub system.
_lib/nerves\hub/helpers · high confidence
Configurable health profiles and product notifications
Products can now define custom health profiles with per-platform thresholds and warning/alert levels for device metrics, replacing the previous hardcoded checks. This includes a caching layer for profile resolution and support for built-in metrics like disconnects. Additionally, a new notification system allows products to track and display event-based alerts with configurable levels (info, warning, error).
_lib/nerves\hub/products · high confidence
Customizable device UI layout and column visibility
Users can now personalize their dashboard experience by choosing which columns appear in device and deployment group lists, and by dragging the detail boxes on the device page into custom layouts. These preferences are stored in the new DisplayPreferences schema and persist across sessions, allowing each user to tailor the interface to their workflow.
_lib/nerves\hub/accounts · high confidence
Introduce ClickHouse-backed analytics buffering and new core contexts
The platform now routes high-volume device telemetry (connections, messages, logs, metrics, alarms, health, and update history) through a new NervesHub.AnalyticsRepo backed by ClickHouse, using a GenServer-based buffer to batch writes and prevent connection pool exhaustion. This change is accompanied by the introduction of several new core contexts in lib/nerves\_hub: Accounts (user/org management), Archives (fwup file handling), AuditLogs (with reference IDs and retention), Certificate (X.509 parsing), CLISessionCache (clustered ETS cache for CLI sessions), CommandPalette (scoped search across devices, deployment groups, and firmware), Debug (performance tracing tools), DeviceLink (encapsulated device connection workflow), and DeviceSSLTransport (SSL transport with PROXY protocol support and pre-handshake rate limiting). Also in this area: 7 commits (0 fixes) modifying lib/nerves\_hub.
_lib/nerves\_hub, lib/nerves\_hub/rate\limit · medium confidence
Introduce Managed Deployments with deployment group management UI
Users can now manage deployment groups through a new set of LiveViews. The index page lists all deployment groups for a product, supporting filtering by name, platform, and architecture, as well as sorting and customizable column visibility. A new 'Add Deployment Group' form allows users to configure general settings (name, delta updates, notes), select a target firmware by platform and architecture, and define device matching conditions using tags and version constraints. The deployment group detail view provides a tabbed interface (Summary, Releases, Activity, Settings) to monitor status, manage staged rollout workflows with approval steps, and toggle group activity.
_lib/nerves\_hub\_web/live/deployment\groups · high confidence
Introduce local and S3 adapters for firmware file storage
Users can now store firmware files using either a local filesystem or Amazon S3, selected via the new \NervesHub.Firmwares.Upload\ behavior implementations. The local adapter (\NervesHub.Firmwares.Upload.File\) handles file creation, deletion, and metadata generation based on configured local and public paths, while the S3 adapter (\NervesHub.Firmwares.Upload.S3\) manages uploads, deletions, and generates presigned download URLs valid for 24 hours. Both adapters support delta firmware metadata generation, enabling the system to track and serve delta updates for both storage backends.
_lib/nerves\hub/firmwares/upload · high confidence
Introduce staged firmware rollouts via deployment workflows
Users can now define and execute staged firmware rollouts by attaching a workflow to a deployment release. A workflow consists of ordered steps—such as updating a limited set of devices (canary), requiring manual approval, or updating the remaining devices (catch\_all)—each with its own concurrency, failure tolerance, and device-matching conditions (tags, network interfaces). The new orchestrator coordinates these steps, holding the rollout at approval gates or on failures until a user intervenes, while the default coordinator continues to handle simple, non-staged deployments.
_lib/nerves\_hub/managed\deployments · high confidence
New API controllers for CA certificates, deployment groups, and device management
The API now exposes dedicated controllers for managing CA certificates, deployment groups, device certificates, device logs, and firmware. Users can create, list, and delete CA certificates and device certificates, manage deployment groups (including creating releases and updating firmware/archive associations), and perform device operations such as rebooting, reconnecting, and sending code. A new device log endpoint allows reading device logs with filtering by level, time, and search terms. Firmware uploads are now validated against product settings and signature requirements, with specific error handling for unsupported formats or signature issues.
_lib/nerves\_hub\web/controllers/api · high confidence
New CLI login flow and updated sign-in UI
Users can now authenticate via the command-line interface using a browser-based confirmation code flow, with dedicated pages for the code entry, success confirmation, and error handling. The standard sign-in page has been refreshed with a redesigned layout, a 'Remember me' checkbox, and a disabled-submit state that shows a spinner to prevent double-submission. Also in this area: 15 commits (0 fixes) modifying lib/nerves\_hub\_web.
_lib/nerves\_hub\_web/controllers/session\html · medium confidence · unverified
New CSR validation and JITP schema for CA certificate ownership
The CA certificate module now includes a new CSR validation module that generates verification codes, validates CSR common names against those codes, and verifies certificate ownership using signed tokens. Additionally, a new JITP (Just-In-Time Provisioning) schema has been added to link CA certificates to products, allowing tags and descriptions to be copied to devices upon creation. Also in this area: 13 commits (0 fixes) modifying lib/nerves\_hub.
_lib/nerves\_hub/devices/ca\certificate · medium confidence · unverified
New ClickHouse tables for device telemetry and history
The analytics repository now includes migrations for several new ClickHouse tables to store device telemetry and history data. These include \device\_log\_lines\ for device log messages, \device\_connection\_history\ for connection metadata and IP addresses, \device\_messages\ for device-sent messages, \device\_error\_reports\ for error tracking, \device\_metrics\ for health metrics, \device\_alarm\_history\ for alarm state transitions, \device\_health\_history\ for health status changes, and \device\_update\_history\ for firmware update attempts. Each table is configured with specific partitioning, sorting, and TTL (time-to-live) policies appropriate for the data type, such as 3 days for logs and messages, 30 days for metrics and errors, 90 days for alarms and health history, and 365 days for update history.
_priv/analytics\repo · high confidence
New LiveView-based Organization management pages
The organization settings area has been rebuilt using Phoenix LiveViews, introducing dedicated pages for managing Certificate Authorities, Network Identities (Iroh Endpoints), Signing Keys, Users, and Organization deletion. Users can now create, edit, and delete certificate authorities and signing keys (supporting Ed25519, ESP-IDF Secure Boot v2, and RAUC schemes) directly from the UI. The new Users page allows inviting, rescinding, and removing members, including self-removal. A new Iroh Endpoints page lets administrators register and manage network identity keys for devices and users. The Organization Settings page now includes a dedicated 'Danger Zone' to permanently delete the organization, requiring explicit name confirmation.
_lib/nerves\_hub\web/live/org · high confidence
New Mix tasks for asset management, device/metric generation, and version auditing
This change introduces five new Mix tasks in the \lib/mix/tasks\ directory to streamline development and maintenance workflows. Developers can now run \mix assets.install\ and \mix assets.build\ to manage frontend dependencies and build web assets via npm. For testing and data population, \mix nerves\_hub.gen.devices\ generates sample devices with randomized locations, while \mix nerves\_hub.gen.metrics\ populates a device's history with simulated metrics (CPU, memory, load) over a week, writing to ClickHouse. Finally, \mix nerves\_hub.versions.report\_invalid\ provides a read-only audit of existing firmware and archive records that fail SemVer validation, helping identify legacy data that needs cleanup without altering the database.
lib/mix · high confidence
New OpenAPI specifications for device, log, and support script APIs
The API documentation now includes generated OpenAPI specs for the device management, device log retrieval, and support script endpoints. Users can now see detailed operation definitions for listing and filtering devices (including advanced query support), retrieving device logs with pagination and filtering, and listing support scripts, along with shared schema helpers for common parameters and error responses.
_lib/nerves\_hub\web/controllers/api/openapi · high confidence
New Product Insights, Error Reports, and Health Profiles pages
This change introduces three new LiveView pages to the Product area: Insights, Error Reports, and Health Profiles. The Insights page provides a fleet overview with device connection and update outcome graphs (supporting 24-hour, 14-day, and 4-week periods), a firmware version distribution donut, and a list of devices failing to update. The Error Reports page allows users to view, filter, and manage error groups (resolve, mute, reopen) with a chart of occurrences over time. The Health Profiles page enables configuration of device health metrics, including adding/removing metrics, setting warning and alert thresholds, and managing platform-specific profiles.
_lib/nerves\_hub\web/live/product · high confidence
New UI components for device management and navigation
The web interface introduces a suite of new LiveView components to support the updated device management experience. Users can now utilize an advanced search field with syntax highlighting and autosuggestions on the device list, a CMD-K command palette for quick navigation across devices, deployment groups, and firmware, and a bulk actions sidebar to manage selected devices (moving products, assigning deployment groups, updating tags, and pushing firmware). Additional UI improvements include a breadcrumb navigation component, local timezone rendering for timestamps, a device location map, and a display for external network identities.
_lib/nerves\_hub\web/components · high confidence
New WebSocket sockets and channels for API token auth, device communication, and user consoles
This change introduces a new \APISocket\ that authenticates users via API tokens, enabling API-based access to the \UserConsoleChannel\ and \UserLocalShellChannel\. It also adds a dedicated \DeviceSocket\ with \DeviceChannel\ and \ExtensionsChannel\ to handle device connections, heartbeats, and extension traffic, while introducing \DeviceEventsStreamChannel\ for external services to subscribe to firmware update progress. Additionally, \EventStreamSocket\ provides a separate endpoint for external event subscriptions, and supporting modules like \Effects\, \Scrollback\, and JSON/MsgPack serializers are added to manage channel state, timers, and message serialization.
_lib/nerves\_hub\web/channels · high confidence
New advanced query language for device filtering
Users can now filter the device list using a new advanced query language, implemented via a dedicated lexer, parser, and Ecto query compiler in the \advanced\_query\ module. This feature adds support for complex boolean logic (AND, OR, NOT) and specific filters including metrics (e.g., \metric:cpu\_temp \> 10\), firmware validation status, signer CA serial, last seen time, and deployment groups, providing a more powerful alternative to the existing sidebar filters.
_lib/nerves\_hub/devices/advanced\query · high confidence
New authorization, IP resolution, and timezone helper modules
This change introduces several new helper modules in the web layer to support updated security and UX features. The new \Authorization\ module centralizes role-based access control for organization, device, firmware, and deployment group actions, replacing ad-hoc checks. \ClientIP\ provides robust resolution of device connection addresses from forwarded headers, accounting for proxy hop counts to accurately record where devices connect. \Timezone\ validates and resolves user-specified IANA time zones for local timestamp rendering, falling back to UTC for invalid inputs. Additionally, \FirmwareDeletion\ standardizes user-facing messages for firmware deletion blockers and warnings, while \RoleValidateHelpers\ offers a plug for route-level role validation. \SortedMapJasonEncoder\ ensures JSON output preserves key order for sorted maps, and \WebsocketConnectionError\ handles specific WebSocket connection failures, including redirecting misconfigured devices to the correct host.
_lib/nerves\_hub\web/helpers · high confidence
New chat channel integrations for Discord and Microsoft Teams
Users can now connect Discord channels and Microsoft Teams channels to receive device and deployment notifications via incoming webhooks. This feature introduces a new \ChatWebhooks\ system that supports event-specific subscriptions (such as health status changes, firmware update results, and deployment workflow steps) and allows organizations to limit notifications to specific products. The implementation includes a caching layer to optimize event dispatching and handles message batching to prevent channel flooding.
_lib/nerves\hub/integrations · high confidence
New chat integration cards for Slack, Microsoft Teams, and Discord
The organization Integrations page now includes dedicated UI cards for Slack, Microsoft Teams, and Discord, allowing users to connect workspaces or webhook endpoints and configure which device events are posted to specific channels. These new components enable users to add, edit, and delete channels, toggle notifications on or off, and send test messages to verify connectivity, with permissions enforced so that only users with the manage role can configure channels while admins handle workspace connections. Also in this area: 15 commits (0 fixes) modifying lib/nerves\_hub\_web.
_lib/nerves\_hub\web/live/org/integrations · medium confidence · unverified
New deployment group page with activity, releases, settings, and workflow visualization
The deployment group interface has been restructured into a new page composed of distinct LiveComponent tabs. The Activity tab displays a paginated, downloadable audit log feed for the group. The Releases tab provides a history of deployment releases, including firmware versions, archives, delta counts, and optional notes. The Settings tab allows configuration of general group properties, device matching conditions (tags and version requirements), deployment workflows (JSON upload), queue management (FIFO/LIFO), and rolling update limits. The Summary tab offers an overview of device status, delta generation controls, and CSV-based device import. Additionally, a WorkflowStepNode component renders individual steps in a deployment workflow diagram, supporting status visualization and step skipping.
_lib/nerves\_hub\_web/components/deployment\_group\page · high confidence
New device alarm tracking and advanced query filtering
The device list now supports tracking device alarms and filtering by them. A new \Alarms\ context records raised and cleared alarms in PostgreSQL for current state and ClickHouse for history, exposing counts and types for the UI. Additionally, an \AdvancedQuery\ module introduces a boolean expression grammar for the search bar, allowing users to filter devices using specific columns (including alarms) or falling back to free-text search for identifiers and tags.
_lib/nerves\hub/devices · high confidence
New device health status components and metric labeling
Added two new UI components in the device health section: a health status indicator that displays an icon and a tooltip with detailed reason strings for health breaches (including support for legacy and new health profile formats), and a metric label resolver that standardizes how health metrics are named across the health tab, device details, and health profiles pages by prioritizing built-in labels, then custom product labels, and finally deriving human-readable titles from metric keys.
_lib/nerves\_hub\_web/components/device\health · high confidence
New device page tabs for activity, data history, firmware history, and local shell
The device page now includes several new tabs to provide deeper visibility and control. The Activity tab displays paginated audit logs with a download option. The Data History tab shows incoming and outgoing device messages with live streaming and filtering capabilities. The Firmware History tab lists installed firmware versions, validation status, and auto-revert detection. The Local Shell tab provides a terminal interface for direct device access, including fullscreen mode and meta-key support.
_lib/nerves\_hub\_web/components/device\page · high confidence
New extensible device protocol with dedicated extensions for alarms, metrics, and local shell
The platform now uses a modular extension system to handle device telemetry and interaction, replacing the previous monolithic health reporting. Devices can now send real-time alarms via the new Alarms extension, independent of the periodic health check. Metrics are handled by a dedicated Metrics extension that supports batched, timestamped reports at a configurable pace, separate from device metadata. A new Local Shell extension provides targeted, low-latency terminal access using the \:group\ library for efficient PubSub routing, ensuring traffic stays only on relevant nodes. The system also includes extensions for batched logging, error reports, and geo-location, all governed by a central dispatch mechanism and configurable per-device settings.
_lib/nerves\hub/extensions · high confidence
New frontend asset configuration and LiveView integration foundation
The assets directory now includes a new ESLint configuration (eslint.config.js) and Prettier settings (.prettierrc) to standardize code formatting and linting rules for the JavaScript codebase. The main application entry point (assets/js/app.js) has been rewritten to initialize a Phoenix LiveView socket, registering a comprehensive set of client-side hooks (such as CommandPalette, WorldMap, TagAutocomplete, and ThemeSwitcher) and handling timezone persistence via cookies to ensure local time rendering. Additionally, a new Stoplight integration file (assets/js/stoplight.js) has been added to support the OpenAPI UI.
assets/js · high confidence
New interactive features: command palette, advanced search, and device console enhancements
This update introduces several new capabilities and refinements to the user interface. A global command palette (CMD-K) allows logged-in users to quickly search and navigate to actions. The device list now features an advanced search box with syntax highlighting, auto-suggestions, and support for complex filtering queries. The device console and local shell have been improved with better terminal handling, including support for the Option key to compose characters on Mac keyboards and a toggle to change modifier key behavior. Additionally, the device details page now supports dragging and rearranging information boxes, and the device location map respects the user's theme preference.
assets/js/hooks · high confidence
New product creation interface with device extension configuration
Users can now create new products through a dedicated form that includes a section for configuring device extensions. The interface displays available extensions by their human-readable display names (rather than raw keys) along with descriptions, allowing users to enable specific isolated channels for device behaviors and messaging at the product level.
_lib/nerves\_hub\web/live/products · high confidence
New webhook delivery system with Standard Webhooks support and security controls
This change introduces the core infrastructure for sending webhook notifications, including a new delivery mechanism that signs payloads using the Standard Webhooks specification (HMAC-SHA256) to ensure authenticity and replay protection. It adds a destination resolver that prevents Server-Side Request Forgery (SSRF) by validating URLs and blocking private/reserved IP addresses unless explicitly allowed. The system now supports a comprehensive set of event types, including device connection, health, and firmware update events, as well as new deployment workflow step events (started, awaiting approval, completed, failed, skipped).
_lib/nerves\hub/webhooks · high confidence
Slack integration for device management and deployment workflows
Users can now connect their Slack workspace to a NervesHub organization to manage devices and deployments directly from Slack. This integration allows users to link their Slack account to their NervesHub identity, view device status, and perform actions like rebooting or identifying devices via slash commands (\/nerveshub\) and interactive buttons. It also supports running support scripts on devices and previewing NervesHub device and deployment group links posted in Slack channels. Additionally, deployment workflow steps can be approved, retried, or skipped directly from Slack messages, with actions audited and reflected in the channel.
_lib/nerves\_hub\web/integrations · high confidence
Staged firmware rollouts with workflow-based deployment coordination
The orchestrator now supports staged firmware rollouts via deployment workflows. Deployment groups without a workflow continue to use the DefaultCoordinator, which fills concurrency slots from a single pool (respecting priority queues if enabled). Groups with a release that carries workflow steps now use the WorkflowCoordinator, which processes steps sequentially: it claims devices for the active step, updates them up to the step's concurrency limit, and waits for completion before moving to the next step. Steps can be of type :approval\_required, pausing the workflow until manually approved, or can fail if too many devices fail to update, requiring manual retry or skip. This allows for controlled, canary-style deployments where each stage is validated before proceeding.
_lib/nerves\_hub/managed\deployments/orchestrator · high confidence
Support for AtomVM, ESP-IDF, and RAUC firmware formats
The update tool now supports three additional firmware formats alongside the existing fwup format. It can now process AtomVM packbeam archives (.avm) for BEAM-based applications, ESP-IDF application images (.bin) for Espressif chips, and RAUC bundles (.raucb) for Linux-based devices. Each new format includes specific logic for metadata extraction, signature verification (Ed25519 for AtomVM/fwup, Secure Boot v2 RSA for ESP-IDF, X.509 CMS for RAUC), and delta generation (only fwup and ESP-IDF support deltas; AtomVM and RAUC do not). This allows NervesHub to manage updates for a wider variety of hardware and software stacks.
_lib/nerves\_hub/firmwares/update\tool · high confidence
Support for creating, validating, and running device scripts
Users can now create and manage support scripts for devices, specifying the language (Elixir or Shell) and tags. The system validates Elixir syntax at creation and update time, providing clear error messages for syntax issues. Scripts can be executed directly on connected devices via a new runner that handles timeouts and fallback console output, allowing for remote device management and automation.
_lib/nerves\hub/scripts · high confidence
API
Comprehensive OpenAPI schema definitions for API resources
This change introduces formal OpenAPI (Swagger) schema definitions for the NervesHub API, covering core resources such as Devices, Deployment Groups, Firmwares, CA and Device Certificates, Signing Keys, Network Identities, Iroh Endpoints, Organizations, Products, Org Users, Support Scripts, and CLI authentication sessions. These schemas standardize request and response structures, document field types and constraints, and provide examples, enabling accurate API documentation and client code generation.
_lib/nerves\_hub\web/controllers/api/schemas · high confidence
Architecture
Introduce NervesHubWeb module as the central web interface entrypoint
The \lib/nerves\_hub\_web.ex\ file has been added to serve as the unified entrypoint for defining the web interface. It provides macros for controllers, API controllers, LiveViews, and LiveComponents, standardizing imports for Phoenix, Gettext, and internal components like breadcrumbs, icons, and date helpers. This change centralizes the setup for web-related modules, ensuring consistent configuration for routing, authentication decorators, and helper functions across the application.
lib · high confidence
Behavioural changes
3 commits (0 fixes) modifying assets
A change to existing behaviour in assets — 3 commits, 9 files: “Redesign the organization page with tabs (\#3246)”; “Use one set of design tokens and components across the web UI (\#3242)”; “Redesign the sign-in, register and password reset pages (\#3243)” (refs \#3246, \#3242, \#3243). Also in this area: Refactored Tailwind configuration and added Prettier settings.
assets/vendor · medium confidence · unverified
Archive model enforces SemVer validation and safe deletion
The new Archive model introduces strict validation for archive versions, requiring them to be valid semantic versions to ensure correct ordering. It also implements a safer deletion mechanism that prevents the removal of archives currently referenced by deployment releases, replacing previous crashes caused by foreign key violations with a clear error message.
_lib/nerves\hub/archives · high confidence
Audit log schema enforces description length limits
The audit log schema now includes a 500-character limit on the description field. If a description exceeds this length, it is automatically truncated with an ellipsis rather than causing a validation error or crash, ensuring that long or unbounded input values do not disrupt the application flow.
_lib/nerves\_hub/audit\logs · high confidence
Background workers for device cleanup, firmware deltas, and audit logs
This change introduces a set of new Oban background workers in the \lib/nerves\_hub/workers\ directory to offload specific maintenance and processing tasks. Users will benefit from automated cleanup of stale device connections and soft-deleted devices, as well as the background generation and timeout handling of firmware deltas. Additionally, the system now supports configurable audit log data retention policies per organization, with scheduled truncation jobs ensuring logs are kept for the specified duration. Email delivery is also moved to a background job to improve web request performance.
_lib/nerves\hub/workers · high confidence
Centralized audit logging templates for deployments, devices, and products
Audit log descriptions for managed deployments, device operations, and product scripts are now generated through dedicated template modules. This change standardizes how audit entries are formatted for actions such as creating or deleting deployment groups, tracking firmware update attempts and failures, managing device reboots, and handling script or error group lifecycle events, ensuring consistent and detailed logging across these core management features.
_lib/nerves\_hub/audit\logs/templates · high confidence
Database migration scripts and seed data for NervesHub
The repository now includes scripts to populate the database with initial data and migrate existing records. \priv/repo/seeds.exs\ creates a default root user and sample organizations (NervesTeam, Personal) with products, firmwares, and devices. Two new migration scripts, \add\_org\_id.exs\ and \add\_audit\_log\_descriptions.exs\, backfill missing \org\_id\ fields on Firmwares, DeviceCertificates, Deployments, and AuditLogs, and generate descriptions for AuditLog entries that previously lacked them.
priv/repo · high confidence
Database schema migration updates
This change introduces a series of database migrations that evolve the application's data model. Key updates include renaming the 'tenants' table to 'orgs' and adjusting associated foreign keys, introducing soft-delete capabilities via 'deleted\_at' columns on core entities, and refining user and device uniqueness constraints to support these deletions. The schema also expands to support new features such as Just-In-Time Provisioning (JITP) for certificates, delta updates for firmwares, and detailed audit logging, while upgrading the background job processing system (Oban) to newer versions.
priv/repo/migrations · high confidence
Enforced code quality and developer tooling standards
The project now enforces a consistent code quality and development workflow through the introduction of several configuration files. Credo is configured with strict mode to enforce style and design checks, while CSpell provides spell-checking for code and documentation. Dialyzer is configured to ignore specific known false positives related to opaque types. The Elixir formatter is extended with the Quokka plugin for automatic code rewrites and the Phoenix LiveView HTML formatter. Additionally, a \.tool-versions\ file standardizes the development environment to Elixir 1.20, Erlang 29, and Node 24, and a \mise.toml\ file manages the \detools\ dependency for firmware delta generation.
(repo-wide) · high confidence
Firmware and Archive pages adopt new sidebar layout and UI components
The firmware and archive listing and detail pages have been rewritten to use the new \NervesHubWeb.Layouts.sidebar\ layout, replacing the previous structure. This update introduces a consistent visual design with updated Tailwind CSS classes, adds a visual drop-overlay when dragging files onto the firmware list, and implements a 'Show deleted' toggle on the firmware list to view retired versions. The archive pages now feature a cleaner two-column detail view for general info and metadata, while firmware details include a tooltip explaining deletion blockers and a notice for deleted firmware that preserves history without allowing downloads.
_lib/nerves\_hub\_web/live/firmware\templates · high confidence
Firmware and Archive pages adopt new sidebar layout and UI components
The firmware and archive listing and detail pages have been rewritten to use the new \NervesHubWeb.Layouts.sidebar\ layout, replacing the previous structure. This update introduces a consistent visual design with updated Tailwind CSS classes, adds a visual drop-overlay when dragging files onto the firmware list, and implements a 'Show deleted' toggle on the firmware list to view retired versions. The archive pages now feature a cleaner two-column detail view for general info and metadata, while firmware details include a tooltip explaining deletion blockers and a notice for deleted firmware that preserves history without allowing downloads. Also in this area: 6 commits (0 fixes) modifying lib/nerves\_hub\_web.
_lib/nerves\_hub\_web/live/archive\templates · medium confidence · unverified
Firmware management refactored to support multiple update tools and granular delta tracking
The firmware module has been restructured to support multiple firmware update tools (such as fwup, ESP-IDF, and RAUC) simultaneously, allowing different devices to use different update mechanisms within the same organization. This change introduces tool-agnostic metadata storage, requiring specific version constraints for both full and delta updates per tool. Additionally, the system now tracks firmware delta generation in greater detail with a dedicated schema and implements a targeted PubSub mechanism for real-time delta status updates, improving efficiency and user visibility during the delta build process.
_lib/nerves\hub/firmwares · high confidence
Initial centralized configuration for NervesHub
The application now uses a standard Elixir configuration structure with \config.exs\ for shared settings and environment-specific files (\dev.exs\, \prod.exs\, \test.exs\, \runtime.exs\) for runtime overrides. This setup defines the core application behavior, including the use of the Bandit web server adapter, Oban for background job scheduling with specific cron jobs (e.g., audit log truncation, stale device cleanup), and Scopes for user, organization, and product access control. It also configures device-specific behaviors such as TLS 1.2 enforcement for device connections, websocket compression options, and rate limiting, while exposing numerous runtime environment variables for customization (e.g., \SESSION\_COOKIE\_DOMAIN\, \DEVICE\_WEBSOCKET\_COMPRESSION\, \OPEN\_FOR\_REGISTRATIONS\).
config · high confidence
Introduction of a comprehensive light theme with unified design tokens
The application now supports a light theme alongside the existing dark mode, allowing users to switch their visual preference. This change introduces a centralized design system in the main CSS file, defining semantic tokens for surfaces, text, and interactive states that automatically invert or adjust between dark and light contexts. It also establishes fixed layout dimensions for the sidebar and topbar, ensuring consistent spacing regardless of the active theme.
assets/css · high confidence
Migrate Account, Archives, and Firmware management to Phoenix LiveView
The Account settings, Archives, and Firmware management interfaces have been rewritten as Phoenix LiveView components. This migration enables real-time interactivity, such as instant feedback on account updates and password changes, live sorting and pagination for Archives and Firmware lists, and immediate UI updates during file uploads without full page reloads. Users benefit from a more responsive experience when managing API tokens, viewing product archives, and handling firmware versions.
_lib/nerves\_hub\web/live · high confidence
New Organizations page with onboarding and live device counts
The Organizations list view has been replaced with a new LiveView interface. For new users, an onboarding flow automatically prompts them to create their first organization and product. Existing users see a list of their organizations, each displaying real-time online and offline device counts that update via PubSub. The view also highlights pinned devices at the top and provides direct links to create new organizations or products.
_lib/nerves\_hub\web/live/orgs · high confidence
New account management UI with access token controls
The account settings interface has been redesigned to consolidate personal info, password changes, and access token management into a single view. Users can now update their name and email, change their password, and generate or delete access tokens directly from the account page. A new dedicated delete-account flow requires email confirmation to permanently remove the account and all associated data.
_lib/nerves\_hub\_web/live/account\templates · high confidence
New account management and authentication UI templates
This change introduces a new set of Heex templates for the account and authentication flows, including pages for accepting organization invitations, creating new accounts, email confirmation, password reset requests and completions, and handling OAuth (Google) login failures. Users will now see a refreshed, consistent interface for signing up, resetting passwords, and managing organization invites, with specific messaging for scenarios like wrong-account mismatches or failed Google authentication. Also in this area: 15 commits (0 fixes) modifying lib/nerves\_hub\_web.
_lib/nerves\_hub\_web/controllers/account\html · medium confidence · unverified
New account, session, and OAuth controllers for user management
The web interface now uses dedicated controllers to handle user registration, login, and authentication flows. AccountController manages new user sign-ups, organization invite acceptance/declination, and registration from invites, with support for toggling open registration via configuration. SessionController handles email/password login, email confirmation, logout, and a new CLI session confirmation flow that allows CLI users to authenticate via a web browser. OAuthController integrates with Ueberauth to support external identity providers (such as Google), creating or updating user accounts upon successful authentication. PasswordResetController provides the standard forgot-password and reset-password workflow. These controllers replace previous mechanisms and centralize the user lifecycle and authentication logic in the web layer.
_lib/nerves\_hub\web/controllers · high confidence
New application layout system with theme switching and collapsible sidebar
The application's layout structure has been replaced with a new set of HEEx templates (root, sidebar, no\_sidebar, and auth) that introduce a collapsible sidebar navigation, a user menu with account/logout links, and a built-in theme selector supporting light, dark, and system preferences. The root layout now handles theme initialization via JavaScript to prevent flash, while the sidebar layout integrates a command palette and an organization/product picker, providing a refreshed and more responsive user interface.
_lib/nerves\_hub\web/components/layouts · high confidence
New authentication, API specification, and upload handling components
The web layer introduces a new \NervesHubWeb.Auth\ module that manages user sessions, including a configurable remember-me cookie and an allow-listed external redirect mechanism to prevent open-redirect vulnerabilities. A new \NervesHubWeb.ApiSpec\ module generates the OpenAPI 3.0 specification for the REST API, while \NervesHubWeb.BrieflyUploadWriter\ implements a durable, chunked upload writer for LiveView that uses the \Briefly\ library to manage temporary file lifecycles. Additionally, \NervesHubWeb.DynamicConfigMultipart\ enables runtime configuration of maximum file upload sizes, and \NervesHubWeb.RateLimitPubSub\ synchronizes IP-based rate limiting across web nodes using the \Group\ library. Also in this area: 6 commits (0 fixes) modifying lib/nerves\_hub\_web.
_lib/nerves\_hub\_web, lib/nerves\_hub\web/mounts · medium confidence
New device management UI with advanced filtering and bulk actions
The device index, show, and new-device pages have been replaced with a redesigned interface that supports advanced query filtering, bulk tag and deployment actions, and a tabbed device detail view. The device list now includes a filter sidebar, advanced search, sorting, pagination, and a select-all checkbox for bulk operations, while the device detail page consolidates health, firmware history, console, logs, and activity into dedicated tabs with real-time connection status and firmware update progress tracking.
_lib/nerves\_hub\web/live/devices · high confidence
New sidebar-based UI for organization user management
The organization user management interface has been redesigned with a new sidebar layout, introducing dedicated pages for listing active members and outstanding invites, inviting new users, and editing existing member roles. Users can now view a table of active memberships showing names, emails, roles, and join dates, manage outstanding invitations by copying or resending links, and update user roles through a dedicated edit form, all within a consistent sidebar-wrapped view.
_lib/nerves\_hub\_web/live/org/user\templates · high confidence
New web plugs for health checks, rate limiting, and session management
This change introduces a suite of new Plug modules in the web layer to enhance reliability, security, and user experience. The \/status/alive\ health check now verifies database connectivity, returning 200 only if the database is reachable. A new rate-limiting plug (\Attack\) protects endpoints by throttling requests per IP, with optional support for respecting forwarded headers behind load balancers. Session handling is improved with a plug that prunes stale, duplicate host-only cookies to prevent login nondeterminism during domain migrations, and another that persists the user's browser timezone to the session to avoid UI flicker on initial render. Additionally, new plugs support local file uploads, device-specific 404 redirects, locale detection via Accept-Language headers, and server-side authentication for the Oban dashboard.
_lib/nerves\_hub\web/plugs · high confidence
Redesigned Certificate Authority management interface
The Certificate Authority settings pages (list, new, edit, and show) have been completely rewritten to use the new sidebar layout and Tailwind CSS styling. The new list view displays serial numbers, descriptions, device counts, and expiration dates in a table. The new and edit forms now include a toggleable Just In Time Provisioning (JITP) section that allows users to configure device descriptions, tags, and target products. The show page provides a detailed view of the CA's status, expiration settings, and a breakdown of devices by product, with updated breadcrumbs and action buttons.
_lib/nerves\_hub\_web/live/org/certificate\_authority\templates · high confidence
Redesigned error pages with new UI theme
The 400, 404, and 500 error pages have been updated to use a new visual design that aligns with the application's light theme. These pages now feature a centered layout with a product logo, specific error messages for each status code, and a link to report issues on GitHub, replacing the previous error page styling.
_lib/nerves\_hub\_web/controllers/error\html · high confidence
Refactored API authentication and resource-loading plugs
The API layer now uses dedicated, modular plugs for handling authentication and resource assignment. \FetchCurrentUser\ extracts the API token from the Authorization header and sets the \current\_scope\, while \RequireAuthenticatedUser\ enforces that a user is present before proceeding. New plugs for \Device\, \Product\, and \RefuseDeletedDevice\ standardize how these resources are loaded into connection assigns and prevent actions on soft-deleted devices, replacing the previous inline logic with a consistent, reusable structure.
_lib/nerves\_hub\web/plugs/api · high confidence
Refactored PubSub event dispatching for deployment orchestrator and device updates
The system now uses dedicated event modules (\DeploymentOrchestratorEvents\ and \DeviceEvents\) to encapsulate and broadcast state changes. For the deployment orchestrator, device lifecycle events (such as online status, updates, and additions) are dispatched via a targeted \:group\-based PubSub mechanism, allowing consumers to subscribe to specific deployment groups. For devices, the \DeviceEvents\ module centralizes broadcasts for actions like firmware updates, deployments, reboots, and identification, ensuring that payloads (including firmware URLs, checksums, and telemetry data) are consistently formatted and sent to the correct device channels.
_lib/nerves\hub/events · high confidence
Refactored console PubSub to use on-demand discovery and targeted groups
The console communication layer has been restructured to improve scalability and reduce cluster overhead. Device-side console channels now subscribe to node-local Phoenix.PubSub topics instead of joining global groups, preventing the accumulation of hundreds of thousands of rows in large fleets. To maintain connectivity, the system now discovers the device console and local shell on demand via broadcast requests rather than keeping them permanently registered in the group. Additionally, the local shell extension now joins the local shell group specifically, ensuring that UI notifications for shell attach/detach events are delivered only to the relevant user interfaces.
_lib/nerves\hub/consoles · high confidence
Refactored device connection handling into a transport-independent contract
The device link logic has been restructured into a modular, transport-independent contract (\NervesHub.DeviceLink\) that separates authentication, session management, and dispatching. This change introduces a dispatcher layer that allows device connections to be handled either locally or remotely, enabling scenarios where the connection-holding process does not have direct access to the database or platform contexts. The new \Authentication\ module centralizes device identification via X.509 certificates or HMAC shared secrets, while \DeviceInfo\ and \Session\ structs provide a flat, serializable interface for passing device state across these boundaries. This refactoring supports more flexible deployment topologies and improves the separation of concerns in how devices are authenticated and managed. Also in this area: 7 commits (0 fixes) modifying lib/nerves\_hub.
_lib/nerves\_hub/device\link · medium confidence · unverified
Refactored release migration tasks with configurable options and analytics exclusion
The release migration logic has been restructured into a new \NervesHub.Release.Tasks\ module that supports passing specific options (such as stopping at a certain migration version) to individual repositories. The migration process now explicitly starts required applications (logger, ssl, postgrex, ecto\_sql) before running, and automatically excludes the analytics repository from migrations if analytics are disabled in the configuration.
_lib/nerves\hub/release · high confidence
Refreshed email templates with consistent branding and plain-text support
All system emails (welcome, account confirmation, password reset, Google login reminders, and organization invite/notify messages) now use a unified MJML-based design featuring the NervesHub logo header, a standardized layout, and a configurable support footer. Each template also includes a plain-text version, ensuring that recipients who cannot view HTML still receive the full message content.
_lib/nerves\hub/emails · high confidence
Support Scripts management moved to LiveViews with new UI
The Support Scripts interface has been rebuilt as Phoenix LiveViews, replacing the previous implementation. This change introduces a new listing page with search, sorting, and pagination, alongside dedicated views for creating and editing scripts. Users can now manage scripts with features such as tagging, language selection (Elixir or Shell), and deletion, all within a unified sidebar layout that displays script metadata like the last editor and update time.
_lib/nerves\_hub\_web/live/support\scripts · high confidence
Updated release environment and VM configuration for distributed Erlang and memory optimization
The release environment script (rel/env.sh.eex) now supports the POD\_IP environment variable alongside PRIVATE\_IP for distributed Erlang node naming, ensuring compatibility with containerized deployments. Additionally, the VM arguments (rel/vm.args.eex) explicitly set the binary and heap allocator carrier sizes (+MBlmbcs and +MHlmbcs) to 512KB to reduce resident set size (RSS) memory usage, while deferring scheduler count configuration to runtime environment variables to optimize resource consumption across shared web and device node images.
rel · high confidence
Updated static assets and removed legacy UI resources
The application's static file directory has been refreshed: legacy JavaScript and CSS files associated with the old user interface have been removed, and unused assets have been cleaned up. New or updated static resources, including favicons, logos, and map images, are now provided. Additionally, the OpenAPI UI now utilizes Stoplight for its interface.
priv/static · medium confidence · unverified
Test coverage
1 commit adding/updating tests in test/nerves\_hub/telemetry; 3 commits adding/updating tests in test/nerves\_hub\_web; Added browser tests for Deployment Groups index and creation; Added browser tests for Slack account linking; Added browser tests for account, firmware, and UI features; Added browser tests for deployment group show page tabs and workflows; Added browser tests for device show tabs; Added browser tests for organization settings and management pages; Added browser tests for the Organizations index and creation flows; Added controller test coverage for authentication, device, and deployment features; Added fwup test fixtures for delta update scenarios; Added integration tests for the new UI devices index page; Added test coverage for NervesHub Web plugs; Added test coverage for Product Insights, Health Profiles, Error Reports, and Notifications; Added test coverage for background workers; Added test coverage for managed deployments; Added test coverage for managed deployments; Added test coverage for new firmware update tool backends; Added test coverage for the Slack integration module; Added test coverage for the accounts module; Added test fixtures for ESP-IDF application image signing; Added test fixtures for RAUC bundle signing; Added test to prevent device tab cleanup conflicts; Added test to verify database foreign key indexes; Added tests for API error JSON rendering; Added tests for API user authentication and token handling; Added tests for CA Certificate CSR validation and JITP changeset behavior; Added tests for Microsoft Teams notification card formatting; Added tests for audit log description truncation and device template error handling; Added tests for chat webhooks, Slack integration, and encrypted data types; Added tests for client IP resolution and timezone validation helpers; Added tests for configurable health profiles and product PubSub; Added tests for device channel, console, and extension behaviors; Added tests for device extension protocols and behaviors; Added tests for device list performance, subscriptions, and UI interactions; Added tests for device update event payloads and concurrency handling; Added tests for firmware upload file metadata generation; Added tests for scripts runner, filtering, and validation; Added tests for the Consoles PubSub module; Added tests for the NervesHub Slack integration; Added tests for the advanced device query system; Added tests for web and device error page rendering; Added tests for webhook delivery, destination validation, event raising, and signature verification; Comprehensive test support infrastructure for device management and firmware formats; Expanded API test coverage for core management endpoints; Expanded test coverage for core platform components; Expanded test coverage for device management and analytics components; Expanded test coverage for firmware upload, validation, and tool gating; Test suite configuration and mocking setup; Tests for configurable presigned download host; Updated SSL test fixtures for nerves\_hub\_ca v0.5.0.
Dependencies
Update Elixir to 1.20 and upgrade Phoenix to 1.8.15
The application runtime is upgraded to Elixir 1.20.0 and Erlang 29.0.1, requiring a corresponding update to the Phoenix web framework to version 1.8.15. This ensures compatibility with the latest Erlang/OTP release and aligns the project with current Elixir standards.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 53 → 50 (-2.7)
- Rubric changed (rubric-2026.11.1 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 58 → 56 (-2.4)
- Architecture 86 → 86 (+0.0)
- Maturity 61 → 61 (-1.0)
- Readiness 47 → 51 (+3.9)
- Security 58 → 59 (+1.0)
- Accessibility 54 → 43 (-10.6)
Resolved (27)
- Critical IaC: DS-0031 (Dockerfile)
- Duplicated block (16 lines × 2) (lib/nerves_hub_web/live/devices/index.ex)
- Duplicated block (19 lines × 2) (lib/nerves_hub_web/components/device_page/console_tab.ex)
- Duplicated block (5 lines × 2) (lib/nerves_hub/extensions/health.ex)
- Duplicated block (5 lines × 2) (lib/nerves_hub_web/components/device_page/console_tab.ex)
- Duplicated block (5 lines × 2) (lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex)
- Duplicated block (5 lines × 3) (lib/nerves_hub_web/live/org/integrations.ex)
- Duplicated block (6 lines × 2) (lib/nerves_hub/accounts.ex)
- High IaC: DS-0002 (Dockerfile)
- High IaC: DS-0029 (Dockerfile)
- High secret: WD-SECRET-0005 (apps/nerves_hub_www/assets/package-lock.json)
- Leaked secret: high-entropy-secret (config/test.exs)
- Leaked secret: signing-key (config/test.exs)
- Medium CVE: [GHSA redacted] (assets/package-lock.json)
- Medium CVE: [GHSA redacted] (assets/package-lock.json)
- Medium IaC: WD-DOCKER-0003 (Dockerfile)
- Medium IaC: WD-DOCKER-0003 (Dockerfile)
- Medium IaC: WD-DOCKER-0003 (Dockerfile)
- Medium IaC: WD-DOCKER-0003 (Dockerfile)
- Medium IaC: WD-DOCKER-0003 (Dockerfile)
- …and 7 more
New (172)
- Boundary-crossing change coupling: devices.ex ↔ device_json.ex (lib/nerves_hub/devices.ex)
- Change coupling: device_channel.ex ↔ extensions_channel.ex (lib/nerves_hub_web/channels/device_channel.ex)
- DeviceController.create_device (cognitive 18) (lib/nerves_hub_web/controllers/api/device_controller.ex)
- Duplicated block (14 lines × 2) (lib/nerves_hub_web/live/devices/index.ex)
- Duplicated block (17 lines × 3) (lib/nerves_hub_web.ex)
- Duplicated block (18 lines × 2) (lib/nerves_hub_web.ex)
- Duplicated block (5 lines × 2) (lib/nerves_hub/extensions/health.ex)
- Duplicated block (5 lines × 2) (lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex)
- Duplicated block (7 lines × 2) (lib/nerves_hub/accounts.ex)
- Duplicated block (9 lines × 2) (lib/nerves_hub_web/live/org/roles.ex)
- Edited copies of one member (3 members, 1+ corresponding lines) (lib/nerves_hub/devices/log_lines.ex)
- Edited copies of one member (3 members, 1+ corresponding lines) (lib/nerves_hub/integrations/discord/embeds.ex)
- Edited copies of one member (3 members, 10+ corresponding lines) (lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex)
- Edited copies of one member (3 members, 13+ corresponding lines) (lib/nerves_hub/command_palette.ex)
- Edited copies of one member (3 members, 13+ corresponding lines) (lib/nerves_hub/integrations/chat_webhooks.ex)
- Edited copies of one member (3 members, 13+ corresponding lines) (lib/nerves_hub/product_notifications.ex)
- Edited copies of one member (3 members, 13+ corresponding lines) (lib/nerves_hub_web/components/device_page/data_history_tab.ex)
- Edited copies of one member (3 members, 14+ corresponding lines) (lib/nerves_hub/integrations/chat_webhooks.ex)
- Edited copies of one member (3 members, 14+ corresponding lines) (lib/nerves_hub_web/live/org/settings.ex)
- Edited copies of one member (3 members, 15+ corresponding lines) (lib/nerves_hub/product_notifications.ex)
- …and 152 more
Changes since last survey
- 49 commits — 49 feature/other, 0 fixes
By area
- lib/nerves_hub_web — 21 commits
- (root) — 11 commits
- lib/nerves_hub — 11 commits
- test/nerves_hub_web — 3 commits
- assets/js — 1 commit
- docs/runtime_configuration.md — 1 commit
- test/nerves_hub — 1 commit
Notable commits
- change: Add a maintenance mode that takes the whole platform offline (#3223)
- change: Answer a device move to an unknown org like one you can't manage (#3255)
- change: Bump ecto to 3.14.3 for the query cache advisory (#3230)
- change: Bump lazy_html from 0.1.13 to 0.1.14 (#3240)
- change: Bump lucide from 1.65.0 to 1.66.0 (#3226)
- change: Bump lucide from 1.66.0 to 1.70.0 (#3252)
- change: Bump mimic from 2.4.2 to 2.5.0 (#3237)
- change: Bump process_hub from 0.7.0 to 0.8.0 (#3239)
- change: Bump swoosh from 1.29.0 to 1.29.3 (#3220)
- change: Cap the PBKDF2 settings a device can ask for (#3256)
- change: Change a device's update mode over the API the way the web UI does (#3261)
- change: Check permissions in the JSON API (#3076)
- change: Close consoles and shells when a device's tags change (#3079)
- change: Don't crash org index when pinned device connection status changes (#3269)
- change: Hold the rate limit clock still in throttle tests (#3250)
- change: Keep device connections up when remote dispatch is slow (#3248)
- change: Keep tokens in request paths out of logs and traces (#3259)
- change: Let a custom role see only tagged devices (#3077)
- change: Let nodes find each other over DNS as well as Postgres (#3228)
- change: Let orgs define their own roles (#3075)
- …and 29 more
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
nerves-hub/nerves_hub_web was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit f7ec66c35381b138c01ed8e3f7447211fcc69571 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.73+preprod-52de90b74216.