Route Groups
Separate layouts for marketing, auth, and dashboard areas.
Route groups in Next.js use parenthesized folder names (group) to organize routes without affecting the URL path.
(marketing)
Public-facing pages with a marketing header and footer.
Layout:
- Fetches session via
auth()for optional user context - Wraps children with
NextAuthSesionProviderandSessionErrorHandler - Renders marketing
Header+Footer
Pages:
| Route | Component | Description |
|---|---|---|
/ | Home | Hero, features, stack, CTA sections |
/pricing | Pricing | 3-tier pricing with Stripe checkout |
/features | Features | Product feature showcase |
/about | About | Company/product information |
/faq | FAQ | Frequently asked questions |
/contact-us | Contact | Contact form (sends via SendGrid) |
/blog | Blog | Blog listing from content-collections |
/blog/[...slug] | BlogPost | MDX blog post rendering |
/privacy-policy | Privacy | Privacy policy (static) |
/terms-and-conditions | Terms | Terms of service (static) |
/cookie-policy | Cookies | Cookie policy (static) |
Subscription sub-group (subscriptions)/:
| Route | Description |
|---|---|
/success | Stripe checkout success redirect |
/cancel | Stripe checkout cancel redirect |
(auth)
Minimal layout for authentication flows — no marketing header/footer.
Pages:
| Route | Component | Description |
|---|---|---|
/login | UserLoginForm | Email + password login |
/register | UserRegisterForm | Account creation |
/reset-password | PasswordResetForm | Request password reset |
/confirm-password-reset/[uid]/[token] | ConfirmPasswordResetForm | Set new password |
/reset-username | UsernameResetForm | Request username reset |
/confirm-username-reset/[uid]/[token] | ConfirmUsernameResetForm | Set new username |
/user-activation/[uid]/[token] | UserActivationForm | Email verification |
/resend-activation | ResendActivationForm | Resend activation email |
(dashboard)
Protected area requiring authentication. Contains the main application UI.
Layout: Minimal wrapper — auth enforcement happens in the workspace layout below.
Top-level pages:
| Route | Description |
|---|---|
/dashboard | Workspace list (redirects if no workspaces) |
/dashboard/profile | User profile settings |
/dashboard/settings | Account settings |
Workspace Pages ([workspaceId]/)
The workspace layout enforces authentication and provides the sidebar shell.
| Route | Data Fetched | Description |
|---|---|---|
.../[workspaceId] | User, workspaces, metrics | Workspace home with stats |
.../details | User, workspaces, invitations, permissions | Workspace settings & members |
.../chat | User, workspace | New chat creation |
.../chat/history | User, workspace, sessions | Chat session list |
.../chat/[chatId] | User, chat session | Active chat with AI |
.../documents | User, workspace, documents | Document list |
.../documents/[docId]/view | User, workspace | Document viewer (PDF) |
.../knowledge-bases | User, workspace, KBs | Knowledge base list |
.../knowledge-bases/[kbId] | User, workspace, KB, documents | KB detail + documents |
.../teams | User, workspace, permissions | Team list |
.../teams/[teamId] | User, workspace, team, permissions | Team detail + members |
.../settings | User, workspace, subscription | Workspace subscription |
(workspaces)
Standalone workspace list page at /workspaces.
(invitations)
Invitation acceptance at /invitations/accept/[invitationId].
Shows login form if unauthenticated, or invitation details if authenticated.
(chats)
Public shareable chat sessions at /chats/[workspaceId]/[shareableLink].
No authentication required — fetches the shared session via public API.