Dashboard
Dashboard
Dashboard layout, sidebar, and app pages.
Overview
The dashboard is the authenticated area of NextBento. It includes a sidebar, header, and multiple app pages.
Layout
app/(dashboard)/layout.tsx:
- Wraps all dashboard routes
- Renders
AppSidebarandSiteHeader - Checks auth — redirects to
/loginif not logged in - Calls
ensureSubscriptionfor plan badge - Uses
SidebarProviderfor responsive sidebar
Sidebar
components/app-sidebar.tsx — Main navigation:
- Dashboards: Dashboard 1, Dashboard 2
- Apps: Mail, Tasks, Chat, Calendar
- Users: User management
- FAQs: In-app FAQs
- Admin: Team, API Keys, Activity
- Settings: Account, Billing, etc.
Dashboard Variants
| Route | Description |
|---|---|
/dashboard | Default dashboard (redirects or main view) |
/dashboard-1 | Dashboard with section cards, chart |
/dashboard-2 | Dashboard with metrics, sales chart, transactions |
App Pages
| Route | Description |
|---|---|
/mail | Mail app (inbox-style) |
/tasks | Tasks with data table, filters |
/chat | Chat interface |
/calendar | Calendar with events |
/users | User management table |
/faqs | FAQ list with categories |
Subscription Checks
The layout fetches subscription status for:
- Plan badge in sidebar
- Trial/active/canceled state
- Usage limit alerts (
usage-limit-alert.tsx,trial-expiration-alert.tsx)
Key Components
| Component | Description |
|---|---|
components/app-sidebar.tsx | Sidebar navigation |
components/site-header.tsx | Top header with search |
components/site-footer.tsx | Dashboard footer |
components/command-search.tsx | ⌘K command palette |
components/nav-user.tsx | User menu in header |
components/feedback-modal.tsx | Feedback form |