How etw-bank/ririsagentfrontend works
StudentAssist is a React chat frontend for asking questions about uploaded study documents. A user starts or selects a session conversation, chooses an optional subject and document ID, and sends a question; App manages session state and calls the API client, which returns an answer and citations for display. The interface also exposes retry, conversation history, and document/subject selection. The API client includes an upload helper, but the README says document upload is not part of this chat interface. Conversation history is memory-only. The map follows the shown source and README; it does not infer unsampled behavior.
Main entry points: App.tsx Session coordinator · ChatWindow.tsx Chat workspace · chat.ts Conversation types · studentAssistApi.ts StudentAssist API client
Components 12
Application state
- React entry
src/main.tsx - Session coordinator
src/App.tsx
Chat interface
- Conversation history
src/components/ConversationSidebar.tsx - Chat workspace
src/components/ChatWindow.tsx - Document selector
src/components/DocumentSelector.tsx - Subject selector
src/components/SubjectSelector.tsx - Message display
src/components/MessageBubble.tsx
API client
- StudentAssist API client
src/services/studentAssistApi.ts
Chat data
- Conversation types
src/types/chat.ts
Other components
- Student
- Browser UI
- StudentAssist API
Connections 16
- Browser UI → React entry: opens
src/main.tsx - React entry → Session coordinator: renders
src/main.tsx - Student → Session coordinator: interacts
src/App.tsx - Session coordinator → Conversation history: renders
src/App.tsx - Session coordinator → Chat workspace: renders
src/App.tsx - Chat workspace → Document selector: renders
src/components/ChatWindow.tsx - Chat workspace → Subject selector: renders
src/components/ChatWindow.tsx - Chat workspace → Message display: renders
src/components/ChatWindow.tsx - Chat workspace → Session coordinator: sends choices
src/App.tsx - Session coordinator → StudentAssist API client: requests chat
src/App.tsx - StudentAssist API client → StudentAssist API: posts chat
src/services/studentAssistApi.ts - StudentAssist API → StudentAssist API client: returns answer
README.md - Session coordinator → Conversation types: uses models
src/App.tsx - Chat workspace → Conversation types: uses models
src/components/ChatWindow.tsx - Conversation history → Conversation types: uses models
src/components/ConversationSidebar.tsx - Message display → Conversation types: uses models
src/components/MessageBubble.tsx