Skip to main content
This page explains the URL routing structure used in ChatJS.

Route Types

Route PatternDescription
/Home page, provisional chat (not yet persisted)
/chat/:idStandalone chat page
/share/:idPublic shared chat page (read-only)
/project/:projectIdProject page, provisional chat within project
/project/:projectId/chat/:chatIdChat within a project

Parsing Pathnames

Use parseChatIdFromPathname from @/providers/parse-chat-id-from-pathname to extract chat ID, project ID, and route source from any pathname.
  • useChatId() - Returns the current chat ID context including source (check source === "share" for shared routes)
See Provisional Chat IDs for how chat IDs enable seamless client-side navigation.