Guides
Surfaces
Dashboard
The product shell: an org-scoped home, analytics, users and settings behind a workspace switcher.The dashboard surface is the shell of a product: a header with a workspace
switcher and a command palette, a sidebar, and the pages every SaaS starts
with. Its files are src/app/(product) and src/content/misc/kbar.ts.
It requires the orgs slice, which brings auth with it: every route but
/profile lives under an organization. Add --slices billing to sell plans;
see Billing. Without the landing surface, /
redirects to /app.
Last updated October 18, 2026- /app — resolves the signed-in user's organizations and redirects to the first.
- /app/[org] — the organization's home: stats, charts and a table.
- /app/[org]/analytics — charts.
- /app/[org]/users — the members table, with invitations.
- /app/[org]/settings — organization, account, style and security tabs.
- /app/[org]/billing — the current plan and the plans to change to, from the billing slice.
- /profile — the signed-in user's profile.
- The sidebar. src/app/(product)/components/Sidebar.tsx is navigation as data. Each entry's subPath is relative to the current organization; an entry without one is a placeholder for a route not built yet, like Reports, Roles and Permissions.
- The command palette. src/content/misc/kbar.ts exports kbar(org), a function of the slug so every entry lands in the tenant you are in:
- The workspace switcher. src/app/(product)/components/Header.tsx lists the user's organizations from useOrg() and opens NewOrgDialog to create one through POST /api/orgs.
- The charts and stats. The home and analytics pages render sample numbers. Replace them with your own queries; links inside the shell should go through orgPath(org, subPath) so they keep the slug.
- Plan features. With the billing slice and Supabase configured, analytics is gated by requireOrgFeature(org, "analytics") and shows an upgrade notice on a plan without it. Without the billing slice, that gate is removed.
Edit this page on GitHub