Alkademi Logo
Plugin System

Override System

The current implementation uses two main mechanisms: extend through plugin routes/layers, and replace core through the replaces field. There is no overrideMode field read by the current source.

Override System

The current implementation uses two main mechanisms: extend through plugin routes/layers, and replace core through the replaces field. There is no overrideMode field read by the current source.

Extend: Add a New Feature

To add a new feature, create an enabled plugin with its own routes and leave replaces empty or omitted.

export default {
  enabled: true,
  routes: [
    {
      key: 'gamification',
      path: '/dashboard/gamification',
      icon: 'i-heroicons-trophy',
      label: 'Gamification'
    }
  ]
}

The result:

  • the plugin layer is included in Nuxt;
  • plugin pages are available based on the pages/ structure;
  • dashboard menu items are added from routes;
  • built-in cores remain active.

Replace: Replace a Core

To replace a core feature, set replaces to the core ids you want to disable.

export default {
  enabled: true,
  replaces: ['program'],
  routes: [
    {
      key: 'custom-program',
      path: '/dashboard/custom-program',
      icon: 'i-heroicons-rectangle-stack',
      label: 'Custom Program'
    }
  ]
}

When auto-discovery runs, shared/utils/layers.ts will:

  1. read enabled plugins;
  2. collect every core id in replaces;
  3. skip those cores while composing extends.

With the example above, cores/program will not be loaded as a layer.

Partial Component Override

Nuxt Layers can resolve components by layer priority, but this project currently does not have a dedicated config field for "partial override". If you want to replace a specific component, do it carefully:

  • use the same component name as the target component;
  • make sure the plugin is enabled and included in the layer composition;
  • verify the result in the browser because resolution priority follows Nuxt Layers rules.

For explicit and stable replacement, use replaces.

The sidebar follows configuration instead of being hardcoded:

  • core items come from core.config.ts;
  • plugin items come from plugin.config.ts;
  • dynamic items come from sidebar.ts;
  • cores listed in replaces are not shown.

If an item from sidebar.ts has the same key as a static item, both are merged. This is useful for adding dynamic children under a plugin menu.


Ready to try? Follow the guide on Creating Your First Plugin.

Copyright © 2026