Skip to main content
This guide walks you through building a complete admin dashboard application with navigation, pages, and routing using App Shell.

What You’ll Build

A multi-page dashboard with:
  • A dashboard home page
  • An orders list page
  • Order detail pages with dynamic routing
  • Settings page
  • Automatic sidebar navigation

Prerequisites

Before starting, make sure you have:
  • Node.js 18+ installed
  • Basic knowledge of React and TypeScript
  • A React project set up (Next.js or Vite)

Installation

1

Install App Shell

Install the package from npm:
Or with other package managers:
2

Create Your Module Structure

Define your application modules and resources. Create a file called modules.tsx:
3

Set Up AppShell Component

Create your main App component with AppShell and SidebarLayout:
The SidebarLayout component automatically generates navigation from your modules. No additional configuration needed!
4

Add the App to Your Entry Point

For Vite, update your main.tsx:
For Next.js, update your app/layout.tsx:

Adding Nested Pages

Now let’s add more pages to make your app functional.
1

Create an Orders List Page

Add a resource to the dashboard module:
2

Add Dynamic Routes for Order Details

Create a detail page with a dynamic :id parameter:
Dynamic segments use the :paramName syntax, just like React Router. Access them with the useParams hook.
3

Connect Resources to Module

Update your dashboard module to include the orders resource with its nested detail page:
Make your pages interactive with the Link component:

Testing Your Application

Start your development server:
You should see:
  • A sidebar with “Dashboard” and “Settings” modules
  • Clicking “Dashboard” shows your home page
  • “Orders” appears under Dashboard in the sidebar
  • Clicking an order navigates to the detail page
  • The URL updates to reflect the current page

Next Steps

Now that you have a working app, explore these guides:

Common Patterns

Module Without a Landing Page

If you don’t need a landing page for a module, use a guard to redirect:

Using Data from Context

Pass data to all pages via contextData:
Make sure to define the contextData type using TypeScript module augmentation. See the AppShell component documentation for details.