Home page

Turn off the setup checklist, or replace the home page with your own

In the Development environment, the admin panel home page displays a setup checklist. It lists the steps for setting up StellarAdmin, such as adding resources, protecting the admin panel and setting the branding.

The setup checklist on the admin panel's home page

In other environments, the home page links to the resources the user can open, in the order of the sidebar.

The admin panel home page with links to five resources

You can also add widgets to the home page.

You can hide the checklist in Development using the ShowSetupChecklist property:

admin.ConfigureHomePage(home => home.ShowSetupChecklist = false);

Replacing the home page

To replace the StellarAdmin home page entirely, add your own Areas/StellarAdmin/Views/Home/Index.cshtml to your app. This will replace StellarAdmin's home page in every environment.

We suggest that you consider adding widgets to the home page before replacing it completely.

The example below displays the number of bookings waiting for confirmation:

Areas/StellarAdmin/Views/Home/Index.cshtml
@inject ApplicationDbContext Db
@{
    ViewData["Title"] = "Dashboard";
    var pending = Db.Bookings.Count(booking => booking.Status == BookingStatus.Pending);
}

<sa-page-container>
    <sa-page-header>
        <sa-page-header-title>Welcome back</sa-page-header-title>
    </sa-page-header>
    <sa-card>
        <sa-card-header>
            <sa-card-title>@pending bookings waiting for confirmation</sa-card-title>
        </sa-card-header>
    </sa-card>
</sa-page-container>

To load data, inject a service, as in the example above, or use a view component. The folder needs the view imports.

On this page