# Custom tools

Avo makes it easy to add custom tools and pages to your dashboard.

# Generate tools

bin/rails generate avo:tool dashboard will generate the necessary files to show the new custom tool.

▶ bin/rails generate avo:tool dashboard
      create  app/views/avo/sidebar/items/_dashboard.html.erb
      insert  app/controllers/avo/tools_controller.rb
      create  app/views/avo/tools/dashboard.html.erb
       route  namespace :avo do
  get "dashboard", to: "tools#dashboard"

# Controller

If this is your first custom tool, a new ToolsController will be generated for you. Within this controller, Avo created a new method.

class Avo::ToolsController < Avo::ApplicationController
  def dashboard

You can keep this action in this controller or move it to another controller and organize it differently.

# Route


Rails.application.routes.draw do
  namespace :avo do
    get "dashboard", to: "tools#dashboard"

  authenticate :user, ->(user) { user.admin? } do
    mount Avo::Engine => Avo.configuration.root_path

The route generated is wrapped inside a namespace with the Avo.configuration.root_path name. You may move it inside your authentication block next to the Avo mounting call.

The _dashboard.html.erb partial will be added to the app/views/avo/sidebar/items directory. All the files in this directory will be loaded by Avo and displayed in the sidebar. They are displayed in alphabetical order so you may change their name to reorder the items.

# Customize the sidebar

If you want to further customize the sidebar partial you can eject it and update it to your liking. We're planning on creating a better sidebar customization experience later this year.

# Add assets

When creating custom tools or fields, you might want to import assets (javascript and stylesheets files). You can do that so easily from v1.3. Please follow this guide to bring your assets with your asset pipeline.