Package installation
Install AppShell using your preferred package manager:Peer dependencies
AppShell requires React 19 or later as peer dependencies. Make sure you have them installed:AppShell requires React 19 or later. It is built with React 19 features and optimizations.
Peer dependency details
AppShell’spackage.json specifies:
- react-router (v7) - Client-side routing
- Tailwind CSS (v4) - Styling framework
- lucide-react - Icon library
- @tanstack/react-table - Table component foundation
- next-themes - Dark mode support
- sonner - Toast notifications
Tailwind CSS setup
AppShell uses Tailwind CSS v4 for styling. You need to import the AppShell theme in your global CSS file.About the AppShell theme
Thetheme.css file includes:
- Color palette - Tailor’s brand colors and semantic color tokens
- CSS variables - Design system tokens for spacing, typography, and more
- Component styles - Base styles for AppShell components
Authentication setup
AppShell provides built-in OAuth2/OIDC authentication through theAuthProvider component.
Get your Tailor Platform credentials
You’ll need three values from your Tailor Platform console:
- API Endpoint - Your application’s base URL
- Go to Application > Overview in Tailor Console
- Find “Accessing the API endpoint of this application”
- Use only the domain portion (e.g.,
https://xyz.erp.dev) - Do not include the
/querysuffix
- Client ID - Authentication client identifier
- Go to Application > Auth in Tailor Console
- Copy your Client ID
- Redirect URI - OAuth2 callback URL (optional)
- Defaults to
window.location.originif not provided - Must match the redirect URI configured in Tailor Auth settings
- Defaults to
Wrap your app with AuthProvider
app/dashboard/page.tsx
When
autoLogin is true, unauthenticated users are automatically redirected to the login page. The guardComponent is shown while authentication state is loading.Supported identity providers
AppShell’sAuthProvider works with any IdP configured in your Tailor Platform application:
- Tailor Platform built-in IdP
- Google Workspace
- Okta
- Auth0
- Microsoft Entra ID (Azure AD)
- Any OAuth2/OIDC-compliant provider
Framework-specific setup
Next.js (App Router)
AppShell works seamlessly with Next.js App Router using a catch-all route:Create a catch-all route
Create
app/dashboard/[[...props]]/page.tsx:app/dashboard/[[...props]]/page.tsx
Vite
AppShell works out of the box with Vite:src/App.tsx
Environment variables
For production deployments, store your Tailor Platform credentials in environment variables:Verification
To verify your installation is working:-
Start your development server:
-
Navigate to your base path (e.g.,
http://localhost:3000/dashboard) -
You should see:
- Sidebar navigation with your modules
- Breadcrumb navigation
- Your module’s component rendering
Troubleshooting
Styles not applying
Solution
Solution
Make sure you:
- Imported
@tailor-platform/app-shell/theme.cssbeforetailwindcssin your global CSS - Imported your global CSS file in your app entry point
- Restarted your development server after making CSS changes
Authentication errors
Solution
Solution
Verify that:
- Your API endpoint does not include
/query(use only the domain) - Your Client ID matches exactly what’s in Tailor Console
- Your redirect URI is configured correctly in Tailor Auth settings
- You’re using HTTPS in production (required for OAuth2)
TypeScript errors
Solution
Solution
Ensure your
tsconfig.json includes:Next steps
Quick start
Build your first AppShell application in 5 minutes
Module and resource definition
Learn how to structure your application with modules and resources
Authentication
Deep dive into authentication, user types, and access control
Routing and navigation
Master client-side navigation and route guards