# `BB.LiveView.Router`
[🔗](https://github.com/beam-bots/bb_liveview/blob/main/lib/bb/live_view/router.ex#L5)

Provides router helpers for mounting the BB Dashboard.

## Usage

In your Phoenix router:

    import BB.LiveView.Router

    scope "/" do
      pipe_through :browser
      bb_dashboard "/robot", robot: MyRobot
    end

The dashboard can be mounted multiple times at different paths for different robots:

    bb_dashboard "/arm", robot: ArmRobot
    bb_dashboard "/base", robot: BaseRobot

## Options

  * `:robot` - Required. The robot module to control. Must define a `robot/0` function.

## Authentication

Protect the dashboard using standard Phoenix pipelines:

    pipeline :admin do
      plug MyAppWeb.RequireAdmin
    end

    scope "/admin" do
      pipe_through [:browser, :admin]
      bb_dashboard "/robot", robot: MyRobot
    end

# `bb_dashboard`
*macro* 

Defines routes for mounting the BB Dashboard at the given path.

See the module documentation for usage examples.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
