Skip to content

Overview

The goal of this appjar is to allow administrators to manage the application's navigation menu at runtime, without requiring code changes or redeployments.

In most applications, the navigation structure is defined at development time and cannot be changed without modifying the source code. As applications grow and evolve, this becomes a maintenance burden: adding a new section, reordering items, or restricting access to certain entries all require developer involvement. The Dynamic Menu appjar removes this constraint by moving menu management into a dedicated administration interface.

Menu items are organised in a hierarchical tree that reflects the navigation structure of the application. Items can point to internal application routes or to external URLs, and they support icons, tooltips, and optional i18n keys for multilingual labels. The order and nesting of items can be adjusted directly in the interface by dragging rows to their desired position.

Visibility

Who sees a given entry is decided per item, in one of two ways.

An item can defer to the access rules the application already declares for the view it points at, so the entry appears only for the users who could navigate to that view. This is the default for new items, and it keeps the menu consistent with the application's security configuration without duplicating it.

Alternatively, an item can carry explicit role constraints. Three types can be combined: roles that the user must have, roles of which the user needs at least one, and roles that must not be present.

Either way, an item whose conditions the current user does not meet is simply not shown in the menu, without any visible indication of its existence. Group headers and separators left empty by that filtering are removed as well, so a user never sees a heading with nothing under it.

Import and Export

The full menu configuration can be exported to a JSON file and imported back at any time. This makes it straightforward to replicate a menu configuration across environments or to back up the current state before making changes.