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
Create Your Module Structure
Define your application modules and resources. Create a file called
modules.tsx: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!Adding Nested Pages
Now let’s add more pages to make your app functional.Adding Navigation Links
Make your pages interactive with theLink component:
Testing Your Application
Start your development server:- 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:- Custom Layouts - Learn about the Layout component for complex page structures
- Guards & Permissions - Add access control to your pages
- Internationalization - Support multiple languages
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 viacontextData: