data_structures
A database-driven menu is used to display the menu items in the sidebar of the application.
Modifying menu items is done by using the following models:
NavigationConfiguration
A user is assigned to one configuration (for instance, a payroll configuration)
NavigationGroup
On the menu UI, it is at the top level (for instance, the "Payroll" navigation group)
NavigationHeader
It is the second highest navigation level (for instance, employees)
NavigationItem
It comes under the header in the same way the header comes under group.
Please, read the rails models to learn more about how they work. Here's their ERD diagram:

Also, see this interractive schema to learn more about the structure on schema.paiehub.ca.
Note
icon_namerepresents the name of the font awesome icon.
Rails console commands
In the rails console which you access using rails c:
# Create new groups
group_attributes = {...} # infer them from present records
group = NavigationGroup.create(group_attributes)
# Find a group
group = NavigationGroup.find_by(name: 'payroll') # replace with your group
# Create headers for a group
header = group.navigation_headers.create({ ... })
# Create items for a header
item = header.navigation_items.create({ ... })
Note that you can create these records using SQL.