Page - Home

abstract

Root page of DocRAG. Renders the main chat interface. No session is pre-selected — the user either picks an existing session from the sidebar or creates a new one.


Route

PropertyValue
Path/
Filefrontend/src/app/page.tsx
Auth RequiredNo
Layoutfrontend/src/app/layout.tsxThemeProviderSidebarProviderAppSidebar + {children}
Dynamic SegmentNone

Component Tree

RootLayout (layout.tsx)
└── ThemeProvider
    └── SidebarProvider
        ├── AppSidebar            ← session list, new chat button, model selector
        └── SidebarInset          ← page.tsx renders here
            └── ChatInterface     ← message list + input + knowledge base panel

Data Layer

Global State — Zustand

StoreFields ReadActions Called
useChatStorecurrentSessionId, sessions, selectedProvider, selectedModelsetCurrentSessionId, addSession, setSessions

Local State (within ChatInterface)

VariableTypePurpose
messagesMessage[]Current session message list
isStreamingbooleanSSE stream in progress
inputValuestringControlled textarea value

Page Lifecycle


Render Conditions

ConditionResult
currentSessionId === nullChatInterface shows empty/welcome state
currentSessionId setChatInterface loads and displays message history
isStreaming === trueInput disabled; streaming indicator shown

RoleLink
Global storeStore - ChatStore
Sibling pagePage - Chat Session
Settings pagePage - Settings
Chat session APIAPI-GET-v1-chat-sessions