Skip to main content
AppShell organizes your application into a hierarchical structure of modules and resources. This architecture automatically generates sidebar navigation, breadcrumbs, and handles routing based on your structured configuration.

Core concepts

Both modules and resources share a common interface with these key properties:
  • path - The URL segment for this page
  • component - The React component to render when navigating to this route
  • guards - Optional access control functions based on permissions or feature flags
  • meta - Metadata like title and icon for navigation

Modules vs resources

Basic example

Here’s a simple application structure with two modules:
This configuration produces the following navigation:

URL structure

The hierarchy directly maps to URLs:
Sub-resources (like :id) don’t appear in the sidebar navigation but are accessible via direct links and will show in breadcrumbs.

Modules without components

Modules can omit the component property to automatically redirect to their first resource:
Navigating to /dashboard automatically redirects to /dashboard/overview.

Dynamic parameters

Use React Router’s :param syntax for dynamic URL segments:
Access parameters in your component:

Route guards

Guards control access to modules and resources based on custom logic. They execute in order and provide semantic results: pass(), hidden(), or redirectTo().

Permission-based access

Feature flag based

Redirect to login

Reusable guards

Create composable guards for complex access logic:
Guards are executed in order. The first non-pass() result stops execution and determines the access outcome.

Guard behavior

When a module or resource is hidden via guards:
  • It won’t appear in navigation menus
  • It won’t be accessible via direct URL navigation (shows 404)
  • It won’t appear in CommandPalette search results

Component props

Both module and resource components receive props from AppShell:

Error boundaries

Define custom error handling at the module or resource level:
Resource-level error boundaries override module-level boundaries, which override the global error boundary set in <AppShell>.

Routing and navigation

Learn about client-side navigation and route helpers

File-based routing

Use directory structure instead of explicit definitions