Scaffold the Admin Dashboard

There are a lot of moving parts in setting up a brand new section of an application. We’ll tackle this together so you can see how you’d go about it in other projects. Our scaffolding will consist of these steps:

  1. Define our new Router entries.
  2. Setup an admin layout.
  3. Create the Admin.DashboardController.
  4. Create the Admin.Socket and Admin.DashboardChannel.
  5. Create admin JS and CSS.

We’ll move quickly through these steps. Once this is done, we’ll have the right foundation to build our admin dashboard.

Unit Tests for the Dashboard


You will find unit tests for most of the modules we create in the sneakers_23_admin/test/ folder. ...

Get Real-Time Phoenix now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.