3 min readUpdated Mar 2, 2026

Dashboard Page Documentation

Purpose

The dashboard-page serves as the main entry point for users who access the Vantage analytics and data platform. Upon successful authentication, the page determines the appropriate dashboard to display based on the user's session. If the user is not logged in, they are redirected to the sign-in page. This mechanism ensures users are swiftly directed to their relevant dashboards or an empty dashboard as a fallback.

How It Works

  1. Authentication Check: The code retrieves the current user session. If no user is found in the session, the user is redirected to the sign-in page.

  2. Dashboard Redirection: Once authenticated, the code retrieves the default_dashboard property from the user's session. Accordingly, it redirects the user to either the specified dashboard or an empty dashboard if no default is set.

Expected Data

The dashboard-page expects the following data structure from the user session:

Settings

The following settings are integral to the functionality of the dashboard-page:

  1. Session

    • Name: Session
    • Input Type: Object
    • Description: The session object is generated upon user authentication. It includes details of the logged-in user and their associated defaults. If the user is not authenticated, this will be null.
    • Default Value: null (when no user is logged in).
  2. Redirect URL

    • Name: Redirect URL
    • Input Type: String
    • Description: This is dynamically set based on the user's default_dashboard. It directs the user to the specified dashboard route or an alternative route if the default is not defined.
    • Default Value: /dashboard/empty (if no default dashboard is found).
  3. Auth Options

    • Name: Auth Options
    • Input Type: Object
    • Description: Contains configurations for authentication, containing its settings which may include providers and callbacks to handle user sessions.
    • Default Value: Depends on the configurations made within the application’s authentication library setup.

By altering the default_dashboard in the user session, administrators can control which dashboard is displayed to the user after they log in.

Use Cases & Examples

Use Cases

  1. User Dashboard Personalization: Users can have different dashboards tailored to their roles within the organization. For example, a data analyst would typically want to see detailed analytics, while an executive might prefer summary metrics.

  2. Access Control for Multiple Dashboards: Organizations that utilize multiple dashboards for various departments can ensure users are redirected to their respective dashboard based on predefined roles.

  3. Fallback Mechanism for Unauthorized Users: If a user accesses the dashboard without being logged in, they are redirected to the sign-in page, thereby reinforcing security.

Configuration Example

Use Case: User Dashboard Personalization

Scenario: A data analyst named Jane has a default dashboard set up for her, which includes analytical charts and KPIs relevant to her role.

Sample Configuration Data:

json
{
  "user": {
    "name": "Jane Doe",
    "default_dashboard": "analytics-dashboard"
  }
}

Behavior:

This demonstrates how the dashboard-page component efficiently directs users based on their specific configurations and preferences, enhancing the overall user experience on the Vantage platform.